@maplander/components 0.21.34 → 0.21.35

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.
@@ -2826,6 +2826,7 @@ var FiltersComponent = /** @class */ (function () {
2826
2826
  this._formBuilder = _formBuilder;
2827
2827
  this._converter = _converter;
2828
2828
  this.METERS_TO_SQ = 10.76391042;
2829
+ this._lastState = null;
2829
2830
  this.changeFilter = new EventEmitter();
2830
2831
  this.isOPI = this._config || false;
2831
2832
  this._subscription = new Subscription();
@@ -2875,10 +2876,34 @@ var FiltersComponent = /** @class */ (function () {
2875
2876
  * @return {?}
2876
2877
  */
2877
2878
  function (changes) {
2879
+ var e_1, _a;
2878
2880
  if (changes['utils'] && changes['utils'].currentValue) {
2879
2881
  console.log('[FiltersComponent] utils ready');
2880
2882
  this.initComponent();
2881
2883
  }
2884
+ if (changes['stateOptions'] && changes['stateOptions'].currentValue) {
2885
+ if (this._lastState !== null) {
2886
+ try {
2887
+ for (var _b = __values(this.stateOptions), _c = _b.next(); !_c.done; _c = _b.next()) {
2888
+ var stateOption = _c.value;
2889
+ if (stateOption.name === this._lastState) {
2890
+ this.filter.state = this._lastState;
2891
+ this.filtersForm.patchValue({
2892
+ state: this._lastState
2893
+ });
2894
+ break;
2895
+ }
2896
+ }
2897
+ }
2898
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
2899
+ finally {
2900
+ try {
2901
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
2902
+ }
2903
+ finally { if (e_1) throw e_1.error; }
2904
+ }
2905
+ }
2906
+ }
2882
2907
  };
2883
2908
  /**
2884
2909
  * @return {?}
@@ -2917,6 +2942,7 @@ var FiltersComponent = /** @class */ (function () {
2917
2942
  * @return {?}
2918
2943
  */
2919
2944
  function (index) {
2945
+ this._lastState = this.filter.state;
2920
2946
  this.resetFilters(index);
2921
2947
  this.applyAmenities();
2922
2948
  this.filter.type = this.propertyTypeSelected.value;
@@ -2943,6 +2969,7 @@ var FiltersComponent = /** @class */ (function () {
2943
2969
  * @return {?}
2944
2970
  */
2945
2971
  function (ev) {
2972
+ this._lastState = this.filter.state;
2946
2973
  this.filter.locationType = 'STATE';
2947
2974
  this.filter.state = null;
2948
2975
  this.filter.municipality = null;
@@ -3095,6 +3122,7 @@ var FiltersComponent = /** @class */ (function () {
3095
3122
  * @return {?}
3096
3123
  */
3097
3124
  function () {
3125
+ this._lastState = this.filter.state || null;
3098
3126
  this.filtersForm.patchValue({
3099
3127
  state: this.filter.state,
3100
3128
  offering: this.filter.offering,