scichart 3.1.346 → 3.1.348

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.
@@ -1,4 +1,4 @@
1
1
  import { TSciChart } from "../types/TSciChart";
2
2
  import { TSciChart3D } from "../types/TSciChart3D";
3
- export declare const libraryVersion = "3.1.346";
3
+ export declare const libraryVersion = "3.1.348";
4
4
  export declare const checkBuildStamp: (wasmContext: TSciChart | TSciChart3D) => boolean;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkBuildStamp = exports.libraryVersion = void 0;
4
- var buildStamp = "2023-05-19T00:00:00";
4
+ var buildStamp = "2023-07-04T00:00:00";
5
5
  var result;
6
6
  // tslint:disable-next-line:no-var-requires
7
- exports.libraryVersion = "3.1.346";
7
+ exports.libraryVersion = "3.1.348";
8
8
  var checkBuildStamp = function (wasmContext) {
9
9
  if (result !== undefined)
10
10
  return result;
@@ -41,18 +41,24 @@ export declare class ObservableArray<T extends {
41
41
  contains(item: T): boolean;
42
42
  /**
43
43
  * Removes an item at the specified index. Raises the {@link collectionChanged} event to subscribers
44
- * @param index
44
+ * @param index The item to remove
45
+ * @param callDeleteOnChildren When true, if the items in the array implement the {@link IDeletable} interface,
46
+ * the delete() function will be called. Defaults to false for backward compatibility
45
47
  */
46
- removeAt(index: number): void;
48
+ removeAt(index: number, callDeleteOnChildren?: boolean): void;
47
49
  /**
48
50
  * Removes an item by value. Raises the {@link collectionChanged} event to subscribers
49
- * @param item
51
+ * @param item The item to remove
52
+ * @param callDeleteOnChildren When true, if the items in the array implement the {@link IDeletable} interface,
53
+ * the delete() function will be called. Defaults to false for backward compatibility
50
54
  */
51
- remove(item: T): void;
55
+ remove(item: T, callDeleteOnChildren?: boolean): void;
52
56
  /**
53
57
  * Clears the array. Raises the {@link collectionChanged} event to subscribers
58
+ * @param callDeleteOnChildren When true, if the items in the array implement the {@link IDeletable} interface,
59
+ * the delete() function will be called. Defaults to false for backward compatibility
54
60
  */
55
- clear(): void;
61
+ clear(callDeleteOnChildren?: boolean): void;
56
62
  /**
57
63
  * Gets an item at index
58
64
  * @param index
@@ -64,35 +64,54 @@ var ObservableArray = /** @class */ (function () {
64
64
  };
65
65
  /**
66
66
  * Removes an item at the specified index. Raises the {@link collectionChanged} event to subscribers
67
- * @param index
67
+ * @param index The item to remove
68
+ * @param callDeleteOnChildren When true, if the items in the array implement the {@link IDeletable} interface,
69
+ * the delete() function will be called. Defaults to false for backward compatibility
68
70
  */
69
- ObservableArray.prototype.removeAt = function (index) {
71
+ ObservableArray.prototype.removeAt = function (index, callDeleteOnChildren) {
72
+ if (callDeleteOnChildren === void 0) { callDeleteOnChildren = false; }
70
73
  if (index < 0 || index >= this.items.length) {
71
74
  return;
72
75
  }
73
76
  var item = this.items[index];
74
77
  this.items.splice(index, 1);
75
78
  this.collectionChanged.raiseEvent(new ObservableArrayChangedArgs_1.ObservableArrayChangedArgs(ObservableArrayChangedArgs_1.EObservableArrayChangedAction.Remove, undefined, [item]));
79
+ // @ts-ignore
80
+ if (callDeleteOnChildren && (item === null || item === void 0 ? void 0 : item.delete))
81
+ item.delete();
76
82
  };
77
83
  /**
78
84
  * Removes an item by value. Raises the {@link collectionChanged} event to subscribers
79
- * @param item
85
+ * @param item The item to remove
86
+ * @param callDeleteOnChildren When true, if the items in the array implement the {@link IDeletable} interface,
87
+ * the delete() function will be called. Defaults to false for backward compatibility
80
88
  */
81
- ObservableArray.prototype.remove = function (item) {
89
+ ObservableArray.prototype.remove = function (item, callDeleteOnChildren) {
90
+ if (callDeleteOnChildren === void 0) { callDeleteOnChildren = false; }
82
91
  for (var index = 0; index < this.size(); index++) {
83
92
  if (this.items[index] === item) {
84
- this.removeAt(index);
93
+ this.removeAt(index, callDeleteOnChildren);
85
94
  break;
86
95
  }
87
96
  }
88
97
  };
89
98
  /**
90
99
  * Clears the array. Raises the {@link collectionChanged} event to subscribers
100
+ * @param callDeleteOnChildren When true, if the items in the array implement the {@link IDeletable} interface,
101
+ * the delete() function will be called. Defaults to false for backward compatibility
91
102
  */
92
- ObservableArray.prototype.clear = function () {
103
+ ObservableArray.prototype.clear = function (callDeleteOnChildren) {
104
+ if (callDeleteOnChildren === void 0) { callDeleteOnChildren = false; }
93
105
  var oldItems = this.items;
94
106
  this.items = [];
95
107
  this.collectionChanged.raiseEvent(new ObservableArrayChangedArgs_1.ObservableArrayChangedArgs(ObservableArrayChangedArgs_1.EObservableArrayChangedAction.Reset, undefined, oldItems));
108
+ if (callDeleteOnChildren) {
109
+ oldItems === null || oldItems === void 0 ? void 0 : oldItems.forEach(function (item) {
110
+ // @ts-ignore
111
+ if (item === null || item === void 0 ? void 0 : item.delete)
112
+ item.delete();
113
+ });
114
+ }
96
115
  };
97
116
  /**
98
117
  * Gets an item at index