@singularsystems/neo-react 1.0.0-beta.5 → 1.0.0-beta.7

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.
@@ -27,11 +27,11 @@ var ReactModelCreator = /** @class */ (function (_super) {
27
27
  model.isSuspended = false;
28
28
  };
29
29
  ReactModelCreator.prototype.setupObject = function (typeInfo, object, options) {
30
- var _a, _b, _c;
30
+ var _a, _b;
31
31
  var annotations = {};
32
32
  var observables = {};
33
- for (var _i = 0, _d = typeInfo.properties; _i < _d.length; _i++) {
34
- var propertyInfo = _d[_i];
33
+ for (var _i = 0, _c = typeInfo.properties; _i < _c.length; _i++) {
34
+ var propertyInfo = _c[_i];
35
35
  if (propertyInfo.isObservable !== false) {
36
36
  var propertyName = propertyInfo.propertyName, makeObservable_1 = (_a = propertyInfo.isObservable) !== null && _a !== void 0 ? _a : options.makeObservable;
37
37
  var propertyInstance = void 0;
@@ -56,9 +56,9 @@ var ReactModelCreator = /** @class */ (function (_super) {
56
56
  }
57
57
  }
58
58
  }
59
- for (var _e = 0, _f = Array.from(typeInfo.methods.values()); _e < _f.length; _e++) {
60
- var methodInfo = _f[_e];
61
- if ((_c = (_b = methodInfo.isAction) !== null && _b !== void 0 ? _b : options.autoActions) !== null && _c !== void 0 ? _c : options.makeObservable) {
59
+ for (var _d = 0, _e = Array.from(typeInfo.methods.values()); _d < _e.length; _d++) {
60
+ var methodInfo = _e[_d];
61
+ if ((_b = methodInfo.isAction) !== null && _b !== void 0 ? _b : options.autoActions) {
62
62
  annotations[methodInfo.name] = action;
63
63
  }
64
64
  }
@@ -35,7 +35,7 @@ var TabContainer = /** @class */ (function (_super) {
35
35
  this.tabManager.initialise();
36
36
  };
37
37
  TabContainer.prototype.componentWillUnmount = function () {
38
- this.tabManager.destroy();
38
+ this.tabManager.onUnmount();
39
39
  };
40
40
  TabContainer.prototype.render = function () {
41
41
  var _a = this.props, tabManager = _a.tabManager, selectedTab = _a.selectedTab, variant = _a.variant, fillMode = _a.fillMode, align = _a.align, verticalSizes = _a.verticalSizes, keepMounted = _a.keepMounted, domProps = __rest(_a, ["tabManager", "selectedTab", "variant", "fillMode", "align", "verticalSizes", "keepMounted"]);
@@ -1,4 +1,4 @@
1
- import { Model } from '@singularsystems/neo-core';
1
+ import { Misc, Model } from '@singularsystems/neo-core';
2
2
  import { ICancellableEvent } from '../Misc';
3
3
  export interface ITabManager {
4
4
  selectedTab: string;
@@ -14,13 +14,13 @@ export interface ITabManager {
14
14
  export interface ITabManagerInternal extends ITabManager {
15
15
  initialise(): void;
16
16
  tabMounted(tabKey: string, onLeave?: (e: ICancellableEvent) => void): void;
17
- destroy(): void;
17
+ onUnmount(): void;
18
18
  }
19
19
  /**
20
20
  * Tab manager used to manage a tab component.
21
21
  * @param T string union type of tab names.
22
22
  */
23
- export declare class TabManager<T extends string = string> {
23
+ export declare class TabManager<T extends string = string> implements Misc.IDisposable {
24
24
  private autoSelectFirstTab;
25
25
  private reactionDisposer;
26
26
  observable: Model.IObservableValue<T>;
@@ -33,7 +33,7 @@ export declare class TabManager<T extends string = string> {
33
33
  /** Called by tab container. */
34
34
  private initialise;
35
35
  /** Called by tab container. */
36
- private destroy;
36
+ private onUnmount;
37
37
  get selectedTab(): T;
38
38
  set selectedTab(value: T);
39
39
  /**
@@ -61,4 +61,5 @@ export declare class TabManager<T extends string = string> {
61
61
  resetAll(reInitialise?: boolean): void;
62
62
  private tabs;
63
63
  private onTabChanged;
64
+ dispose(): void;
64
65
  }
@@ -33,8 +33,7 @@ var TabManager = /** @class */ (function () {
33
33
  }
34
34
  };
35
35
  /** Called by tab container. */
36
- TabManager.prototype.destroy = function () {
37
- this.reactionDisposer();
36
+ TabManager.prototype.onUnmount = function () {
38
37
  };
39
38
  Object.defineProperty(TabManager.prototype, "selectedTab", {
40
39
  get: function () {
@@ -142,6 +141,9 @@ var TabManager = /** @class */ (function () {
142
141
  }
143
142
  }
144
143
  };
144
+ TabManager.prototype.dispose = function () {
145
+ this.reactionDisposer();
146
+ };
145
147
  return TabManager;
146
148
  }());
147
149
  export { TabManager };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singularsystems/neo-react",
3
- "version": "1.0.0-beta.5",
3
+ "version": "1.0.0-beta.7",
4
4
  "description": "React application logic and components for the Neo client library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",