@xh/hoist 52.0.0 → 52.0.2

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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # Changelog
2
2
 
3
- ## v52.0.0 - 2022-10-10
3
+ ## v52.0.2 - 2022-10-13
4
+
5
+ ### 🐞 Bug Fixes
6
+
7
+ * Form field dirty checking now uses lodash `isEqual` to compare initial and current values,
8
+ avoiding false positives with Array values.
9
+
10
+ ## v52.0.1 - 2022-10-10
4
11
 
5
12
  ### 🎁 New Features
6
13
 
@@ -4,13 +4,13 @@
4
4
  *
5
5
  * Copyright © 2022 Extremely Heavy Industries Inc.
6
6
  */
7
- import {managed, HoistModel, TaskObserver} from '@xh/hoist/core';
8
- import {Rule, ValidationState, genDisplayName, required} from '@xh/hoist/data';
9
- import {action, computed, observable, runInAction, makeObservable} from '@xh/hoist/mobx';
7
+ import {HoistModel, managed, TaskObserver} from '@xh/hoist/core';
8
+ import {genDisplayName, required, Rule, ValidationState} from '@xh/hoist/data';
9
+ import {action, computed, makeObservable, observable, runInAction} from '@xh/hoist/mobx';
10
10
  import {wait} from '@xh/hoist/promise';
11
- import {withDefault, executeIfFunction} from '@xh/hoist/utils/js';
12
- import {compact, flatten, isEmpty, isFunction, isNil} from 'lodash';
11
+ import {executeIfFunction, withDefault} from '@xh/hoist/utils/js';
13
12
  import {createObservableRef} from '@xh/hoist/utils/react';
13
+ import {compact, flatten, isEmpty, isEqual, isFunction, isNil} from 'lodash';
14
14
 
15
15
  /**
16
16
  * Abstract Base class for FieldModels.
@@ -210,7 +210,7 @@ export class BaseFieldModel extends HoistModel {
210
210
 
211
211
  /** @member {boolean} - true if value has been changed since last reset/init. */
212
212
  get isDirty() {
213
- return this.value !== this.initialValue;
213
+ return !isEqual(this.value, this.initialValue);
214
214
  }
215
215
 
216
216
  //-------------------------
package/data/Store.js CHANGED
@@ -774,6 +774,7 @@ export class Store extends HoistBase {
774
774
 
775
775
  /** Destroy this store, cleaning up any resources used. */
776
776
  destroy() {
777
+ super.destroy();
777
778
  Store._unregisterInstance(this);
778
779
  }
779
780
 
package/data/cube/Cube.js CHANGED
@@ -241,6 +241,7 @@ export class Cube extends HoistBase {
241
241
 
242
242
  destroy() {
243
243
  this._connectedViews.forEach(v => v.disconnect());
244
+ super.destroy();
244
245
  }
245
246
  }
246
247
 
package/data/cube/View.js CHANGED
@@ -412,6 +412,7 @@ export class View extends HoistBase {
412
412
 
413
413
  destroy() {
414
414
  this.disconnect();
415
+ super.destroy();
415
416
  }
416
417
  }
417
418
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "52.0.0",
3
+ "version": "52.0.2",
4
4
  "description": "Hoist add-on for building and deploying React Applications.",
5
5
  "repository": "github:xh/hoist-react",
6
6
  "homepage": "https://xh.io",