@abp/ng.core 5.1.2 → 5.2.0-rc.1

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.
@@ -350,16 +350,18 @@ class RestService {
350
350
  .pipe(catchError(err => (skipHandleError ? throwError(err) : this.handleError(err))));
351
351
  }
352
352
  getParams(params, encoder) {
353
- const httpParams = encoder ? new HttpParams({ encoder }) : new HttpParams();
354
- return Object.keys(params).reduce((acc, key) => {
353
+ const filteredParams = Object.keys(params).reduce((acc, key) => {
355
354
  const value = params[key];
356
355
  if (isUndefinedOrEmptyString(value))
357
356
  return acc;
358
357
  if (value === null && !this.options.sendNullsAsQueryParam)
359
358
  return acc;
360
- acc = acc.set(key, value);
359
+ acc[key] = value;
361
360
  return acc;
362
- }, httpParams);
361
+ }, {});
362
+ return encoder
363
+ ? new HttpParams({ encoder, fromObject: filteredParams })
364
+ : new HttpParams({ fromObject: filteredParams });
363
365
  }
364
366
  }
365
367
  RestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: RestService, deps: [{ token: CORE_OPTIONS }, { token: i1.HttpClient }, { token: EnvironmentService }, { token: HttpErrorReporterService }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -600,10 +602,16 @@ class LocalizationService {
600
602
  }
601
603
  /**
602
604
  * Returns currently selected language
605
+ * Even though this looks like it's redundant to return the same value as `getLanguage()`,
606
+ * it's actually not. This could be invoked any time, and the latestLang could be different from the
607
+ * sessionState.getLanguage() value.
603
608
  */
604
609
  get currentLang() {
605
610
  return this.latestLang || this.sessionState.getLanguage();
606
611
  }
612
+ get currentLang$() {
613
+ return this.sessionState.getLanguage$();
614
+ }
607
615
  get languageChange$() {
608
616
  return this._languageChange$.asObservable();
609
617
  }