treenode.ts 0.7.0 → 0.8.0
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/dist/{treenode.ts.d.ts → index.d.mts} +170 -157
- package/dist/index.d.ts +170 -3
- package/dist/index.js +415 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +390 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +14 -6
- package/dist/IParseable.d.ts +0 -8
- package/dist/IParseable.d.ts.map +0 -1
- package/dist/IParseable.js +0 -3
- package/dist/IParseable.js.map +0 -1
- package/dist/TreeNode.d.ts +0 -146
- package/dist/TreeNode.d.ts.map +0 -1
- package/dist/TreeNode.js +0 -489
- package/dist/TreeNode.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/tsdoc-metadata.json +0 -11
package/dist/TreeNode.js
DELETED
|
@@ -1,489 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
39
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
40
|
-
if (ar || !(i in from)) {
|
|
41
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
42
|
-
ar[i] = from[i];
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.TreeNode = void 0;
|
|
49
|
-
/**
|
|
50
|
-
* @public
|
|
51
|
-
*/
|
|
52
|
-
var TreeNode = /** @class */ (function () {
|
|
53
|
-
function TreeNode(model, parent, children) {
|
|
54
|
-
if (parent === void 0) { parent = null; }
|
|
55
|
-
if (children === void 0) { children = []; }
|
|
56
|
-
this.model = model;
|
|
57
|
-
this.parent = parent;
|
|
58
|
-
this.children = children;
|
|
59
|
-
this._index = 0;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Parses object into a tree and returns the root node.
|
|
63
|
-
*/
|
|
64
|
-
TreeNode.parse = function (tree) {
|
|
65
|
-
var node = new TreeNode(tree.model);
|
|
66
|
-
tree.children.forEach(function (child) { return node.add(TreeNode.parse(child)); });
|
|
67
|
-
return node;
|
|
68
|
-
};
|
|
69
|
-
Object.defineProperty(TreeNode.prototype, "index", {
|
|
70
|
-
/**
|
|
71
|
-
* Index of the node among its siblings.
|
|
72
|
-
*/
|
|
73
|
-
get: function () {
|
|
74
|
-
return this._index;
|
|
75
|
-
},
|
|
76
|
-
enumerable: false,
|
|
77
|
-
configurable: true
|
|
78
|
-
});
|
|
79
|
-
Object.defineProperty(TreeNode.prototype, "indices", {
|
|
80
|
-
/**
|
|
81
|
-
* Indices from the root to the node.
|
|
82
|
-
*/
|
|
83
|
-
get: function () {
|
|
84
|
-
var indices = [];
|
|
85
|
-
var node = this;
|
|
86
|
-
while (node.parent) {
|
|
87
|
-
indices.push(node.index);
|
|
88
|
-
node = node.parent;
|
|
89
|
-
}
|
|
90
|
-
return indices.reverse();
|
|
91
|
-
},
|
|
92
|
-
enumerable: false,
|
|
93
|
-
configurable: true
|
|
94
|
-
});
|
|
95
|
-
Object.defineProperty(TreeNode.prototype, "pathKey", {
|
|
96
|
-
/**
|
|
97
|
-
* Compressed path key: positive = run of first-children, negative = child index.
|
|
98
|
-
* e.g. [0,0,0,1,0,0] -> "3,-1,2"
|
|
99
|
-
*/
|
|
100
|
-
get: function () {
|
|
101
|
-
var indices = this.indices;
|
|
102
|
-
if (indices.length === 0)
|
|
103
|
-
return '';
|
|
104
|
-
var parts = [];
|
|
105
|
-
var zeroCount = 0;
|
|
106
|
-
for (var _i = 0, indices_1 = indices; _i < indices_1.length; _i++) {
|
|
107
|
-
var idx = indices_1[_i];
|
|
108
|
-
if (idx === 0) {
|
|
109
|
-
zeroCount++;
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
if (zeroCount > 0) {
|
|
113
|
-
parts.push(zeroCount);
|
|
114
|
-
zeroCount = 0;
|
|
115
|
-
}
|
|
116
|
-
parts.push(-idx);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
if (zeroCount > 0) {
|
|
120
|
-
parts.push(zeroCount);
|
|
121
|
-
}
|
|
122
|
-
return parts.join(',');
|
|
123
|
-
},
|
|
124
|
-
enumerable: false,
|
|
125
|
-
configurable: true
|
|
126
|
-
});
|
|
127
|
-
Object.defineProperty(TreeNode.prototype, "hasChildren", {
|
|
128
|
-
/**
|
|
129
|
-
* Returns true if the node has children.
|
|
130
|
-
*/
|
|
131
|
-
get: function () {
|
|
132
|
-
return this.children.length > 0;
|
|
133
|
-
},
|
|
134
|
-
enumerable: false,
|
|
135
|
-
configurable: true
|
|
136
|
-
});
|
|
137
|
-
Object.defineProperty(TreeNode.prototype, "isRoot", {
|
|
138
|
-
/**
|
|
139
|
-
* Returns true if the node is the root (has no parent).
|
|
140
|
-
*/
|
|
141
|
-
get: function () {
|
|
142
|
-
return this.parent === null;
|
|
143
|
-
},
|
|
144
|
-
enumerable: false,
|
|
145
|
-
configurable: true
|
|
146
|
-
});
|
|
147
|
-
Object.defineProperty(TreeNode.prototype, "isLeaf", {
|
|
148
|
-
/**
|
|
149
|
-
* Returns true if the node is a leaf (has no children).
|
|
150
|
-
*/
|
|
151
|
-
get: function () {
|
|
152
|
-
return !this.hasChildren;
|
|
153
|
-
},
|
|
154
|
-
enumerable: false,
|
|
155
|
-
configurable: true
|
|
156
|
-
});
|
|
157
|
-
Object.defineProperty(TreeNode.prototype, "root", {
|
|
158
|
-
/**
|
|
159
|
-
* Returns the root node of the tree.
|
|
160
|
-
*/
|
|
161
|
-
get: function () {
|
|
162
|
-
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
163
|
-
var node = this;
|
|
164
|
-
while (node.parent) {
|
|
165
|
-
node = node.parent;
|
|
166
|
-
}
|
|
167
|
-
return node;
|
|
168
|
-
},
|
|
169
|
-
enumerable: false,
|
|
170
|
-
configurable: true
|
|
171
|
-
});
|
|
172
|
-
Object.defineProperty(TreeNode.prototype, "depth", {
|
|
173
|
-
/**
|
|
174
|
-
* Returns the depth of the node (root is 0).
|
|
175
|
-
*/
|
|
176
|
-
get: function () {
|
|
177
|
-
return this.parent ? this.parent.depth + 1 : 0;
|
|
178
|
-
},
|
|
179
|
-
enumerable: false,
|
|
180
|
-
configurable: true
|
|
181
|
-
});
|
|
182
|
-
Object.defineProperty(TreeNode.prototype, "siblings", {
|
|
183
|
-
/**
|
|
184
|
-
* Returns siblings of this node (excluding self).
|
|
185
|
-
*/
|
|
186
|
-
get: function () {
|
|
187
|
-
var _this = this;
|
|
188
|
-
if (this.isRoot)
|
|
189
|
-
return [];
|
|
190
|
-
return this.parent.children.filter(function (child) { return child !== _this; });
|
|
191
|
-
},
|
|
192
|
-
enumerable: false,
|
|
193
|
-
configurable: true
|
|
194
|
-
});
|
|
195
|
-
/**
|
|
196
|
-
* Add node as a child.
|
|
197
|
-
*/
|
|
198
|
-
TreeNode.prototype.add = function (child) {
|
|
199
|
-
child.parent = this;
|
|
200
|
-
child._index = this.children.length;
|
|
201
|
-
this.children.push(child);
|
|
202
|
-
return child;
|
|
203
|
-
};
|
|
204
|
-
/**
|
|
205
|
-
* Add model as a child.
|
|
206
|
-
*/
|
|
207
|
-
TreeNode.prototype.addModel = function (model) {
|
|
208
|
-
return this.add(new TreeNode(model));
|
|
209
|
-
};
|
|
210
|
-
/**
|
|
211
|
-
* Remove current node and its children from the tree and return.
|
|
212
|
-
*/
|
|
213
|
-
TreeNode.prototype.drop = function () {
|
|
214
|
-
if (!this.isRoot) {
|
|
215
|
-
var idx = this._index;
|
|
216
|
-
this.parent.children.splice(idx, 1);
|
|
217
|
-
// Update indices of subsequent siblings
|
|
218
|
-
for (var i = idx; i < this.parent.children.length; i++) {
|
|
219
|
-
this.parent.children[i]._index = i;
|
|
220
|
-
}
|
|
221
|
-
this.parent = null;
|
|
222
|
-
this._index = 0;
|
|
223
|
-
}
|
|
224
|
-
return this;
|
|
225
|
-
};
|
|
226
|
-
/**
|
|
227
|
-
* Returns a deep copy of structure, shallow copy of model.
|
|
228
|
-
*/
|
|
229
|
-
TreeNode.prototype.clone = function () {
|
|
230
|
-
var node = new TreeNode(this.model);
|
|
231
|
-
node.children = this.children.map(function (child, i) {
|
|
232
|
-
var newChild = child.clone();
|
|
233
|
-
newChild.parent = node;
|
|
234
|
-
newChild._index = i;
|
|
235
|
-
return newChild;
|
|
236
|
-
});
|
|
237
|
-
return node;
|
|
238
|
-
};
|
|
239
|
-
/**
|
|
240
|
-
* Returns a node given a list of indices
|
|
241
|
-
*/
|
|
242
|
-
TreeNode.prototype.fetch = function (indices) {
|
|
243
|
-
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
244
|
-
var node = this;
|
|
245
|
-
for (var _i = 0, indices_2 = indices; _i < indices_2.length; _i++) {
|
|
246
|
-
var i = indices_2[_i];
|
|
247
|
-
node = node.children[i];
|
|
248
|
-
if (!node)
|
|
249
|
-
return null;
|
|
250
|
-
}
|
|
251
|
-
return node;
|
|
252
|
-
};
|
|
253
|
-
/**
|
|
254
|
-
* Returns a node given a pathKey string.
|
|
255
|
-
* @see pathKey
|
|
256
|
-
*/
|
|
257
|
-
TreeNode.prototype.fetchByPathKey = function (pathKey) {
|
|
258
|
-
if (pathKey === '')
|
|
259
|
-
return this;
|
|
260
|
-
var indices = [];
|
|
261
|
-
var parts = pathKey.split(',').map(Number);
|
|
262
|
-
for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {
|
|
263
|
-
var part = parts_1[_i];
|
|
264
|
-
if (part >= 0) {
|
|
265
|
-
for (var i = 0; i < part; i++) {
|
|
266
|
-
indices.push(0);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
else {
|
|
270
|
-
indices.push(-part);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
return this.fetch(indices);
|
|
274
|
-
};
|
|
275
|
-
/**
|
|
276
|
-
* Returns list of nodes to the root.
|
|
277
|
-
*/
|
|
278
|
-
TreeNode.prototype.path = function () {
|
|
279
|
-
var path = [];
|
|
280
|
-
var node = this;
|
|
281
|
-
while (node) {
|
|
282
|
-
path.push(node);
|
|
283
|
-
node = node.parent;
|
|
284
|
-
}
|
|
285
|
-
return path.reverse();
|
|
286
|
-
};
|
|
287
|
-
/**
|
|
288
|
-
* Iterates over a node's children and returns a new root node.
|
|
289
|
-
*/
|
|
290
|
-
TreeNode.prototype.map = function (callback) {
|
|
291
|
-
var node = new TreeNode(callback(this));
|
|
292
|
-
node.children = this.children.map(function (child, i) {
|
|
293
|
-
var newChild = child.map(callback);
|
|
294
|
-
newChild.parent = node;
|
|
295
|
-
newChild._index = i;
|
|
296
|
-
return newChild;
|
|
297
|
-
});
|
|
298
|
-
return node;
|
|
299
|
-
};
|
|
300
|
-
/**
|
|
301
|
-
* Iterates over a node's children and returns a new root node.
|
|
302
|
-
*/
|
|
303
|
-
TreeNode.prototype.mapAsync = function (callback, parent) {
|
|
304
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
305
|
-
var node, _a, _b;
|
|
306
|
-
var _this = this;
|
|
307
|
-
return __generator(this, function (_c) {
|
|
308
|
-
switch (_c.label) {
|
|
309
|
-
case 0:
|
|
310
|
-
_a = TreeNode.bind;
|
|
311
|
-
return [4 /*yield*/, callback(this, parent)];
|
|
312
|
-
case 1:
|
|
313
|
-
node = new (_a.apply(TreeNode, [void 0, _c.sent()]))();
|
|
314
|
-
_b = node;
|
|
315
|
-
return [4 /*yield*/, Promise.all(this.children.map(function (child, i) { return __awaiter(_this, void 0, void 0, function () {
|
|
316
|
-
var newChild;
|
|
317
|
-
return __generator(this, function (_a) {
|
|
318
|
-
switch (_a.label) {
|
|
319
|
-
case 0: return [4 /*yield*/, child.mapAsync(callback, node)];
|
|
320
|
-
case 1:
|
|
321
|
-
newChild = _a.sent();
|
|
322
|
-
newChild.parent = node;
|
|
323
|
-
newChild._index = i;
|
|
324
|
-
return [2 /*return*/, newChild];
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
}); }))];
|
|
328
|
-
case 2:
|
|
329
|
-
_b.children = _c.sent();
|
|
330
|
-
return [2 /*return*/, node];
|
|
331
|
-
}
|
|
332
|
-
});
|
|
333
|
-
});
|
|
334
|
-
};
|
|
335
|
-
/**
|
|
336
|
-
* Breadth-first search, return true in the callback to end iteration.
|
|
337
|
-
*/
|
|
338
|
-
TreeNode.prototype.breadth = function (callback) {
|
|
339
|
-
var queue = [this];
|
|
340
|
-
var head = 0;
|
|
341
|
-
while (head < queue.length) {
|
|
342
|
-
var node = queue[head++];
|
|
343
|
-
if (callback(node))
|
|
344
|
-
return node;
|
|
345
|
-
for (var i = 0, childCount = node.children.length; i < childCount; i++) {
|
|
346
|
-
queue.push(node.children[i]);
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
return null;
|
|
350
|
-
};
|
|
351
|
-
/**
|
|
352
|
-
* Depth-first pre-order search, return true in the callback to end iteration.
|
|
353
|
-
*/
|
|
354
|
-
TreeNode.prototype.pre = function (callback) {
|
|
355
|
-
if (callback(this))
|
|
356
|
-
return this;
|
|
357
|
-
for (var i = 0, childCount = this.children.length; i < childCount; i++) {
|
|
358
|
-
var node = this.children[i].pre(callback);
|
|
359
|
-
if (node)
|
|
360
|
-
return node;
|
|
361
|
-
}
|
|
362
|
-
return null;
|
|
363
|
-
};
|
|
364
|
-
/**
|
|
365
|
-
* Depth-first post-order search, return true in the callback to end iteration.
|
|
366
|
-
*/
|
|
367
|
-
TreeNode.prototype.post = function (callback) {
|
|
368
|
-
for (var i = 0, childCount = this.children.length; i < childCount; i++) {
|
|
369
|
-
var node = this.children[i].post(callback);
|
|
370
|
-
if (node)
|
|
371
|
-
return node;
|
|
372
|
-
}
|
|
373
|
-
if (callback(this))
|
|
374
|
-
return this;
|
|
375
|
-
return null;
|
|
376
|
-
};
|
|
377
|
-
/**
|
|
378
|
-
* Find the first node matching the predicate.
|
|
379
|
-
*/
|
|
380
|
-
TreeNode.prototype.find = function (predicate, method) {
|
|
381
|
-
if (method === void 0) { method = "pre"; }
|
|
382
|
-
return this[method](function (node) { return predicate(node); });
|
|
383
|
-
};
|
|
384
|
-
/**
|
|
385
|
-
* Find all nodes matching the predicate.
|
|
386
|
-
*/
|
|
387
|
-
TreeNode.prototype.findAll = function (predicate, method) {
|
|
388
|
-
if (method === void 0) { method = "pre"; }
|
|
389
|
-
var results = [];
|
|
390
|
-
this[method](function (node) {
|
|
391
|
-
if (predicate(node))
|
|
392
|
-
results.push(node);
|
|
393
|
-
});
|
|
394
|
-
return results;
|
|
395
|
-
};
|
|
396
|
-
/**
|
|
397
|
-
* Returns a list of nodes.
|
|
398
|
-
*/
|
|
399
|
-
TreeNode.prototype.flatten = function (method) {
|
|
400
|
-
var list = [];
|
|
401
|
-
this[method].call(this, function (node) {
|
|
402
|
-
list.push(node);
|
|
403
|
-
});
|
|
404
|
-
return list;
|
|
405
|
-
};
|
|
406
|
-
/**
|
|
407
|
-
* Returns a nested array representation of the tree.
|
|
408
|
-
* - Leaf -> value
|
|
409
|
-
* - Single child -> [model, ...childResult]
|
|
410
|
-
* - Multiple leaf children -> [model, [leaves...]]
|
|
411
|
-
* - Multiple mixed children -> [model, child1Result, child2Result, ...]
|
|
412
|
-
*/
|
|
413
|
-
TreeNode.prototype.toNestedArray = function () {
|
|
414
|
-
if (this.isLeaf) {
|
|
415
|
-
return this.model;
|
|
416
|
-
}
|
|
417
|
-
if (this.children.length === 1) {
|
|
418
|
-
var childResult = this.children[0].toNestedArray();
|
|
419
|
-
if (Array.isArray(childResult)) {
|
|
420
|
-
return __spreadArray([this.model], childResult, true);
|
|
421
|
-
}
|
|
422
|
-
return [this.model, childResult];
|
|
423
|
-
}
|
|
424
|
-
// Multiple children
|
|
425
|
-
var allLeaves = this.children.every(function (c) { return c.isLeaf; });
|
|
426
|
-
if (allLeaves) {
|
|
427
|
-
return [this.model, this.children.map(function (c) { return c.model; })];
|
|
428
|
-
}
|
|
429
|
-
return __spreadArray([this.model], this.children.map(function (c) { return c.toNestedArray(); }), true);
|
|
430
|
-
};
|
|
431
|
-
/**
|
|
432
|
-
* Creates a tree from a nested array representation.
|
|
433
|
-
* @see toNestedArray
|
|
434
|
-
*/
|
|
435
|
-
TreeNode.fromNestedArray = function (input) {
|
|
436
|
-
if (!Array.isArray(input)) {
|
|
437
|
-
return new TreeNode(input);
|
|
438
|
-
}
|
|
439
|
-
var model = input[0], rest = input.slice(1);
|
|
440
|
-
var node = new TreeNode(model);
|
|
441
|
-
if (rest.length === 0) {
|
|
442
|
-
return node;
|
|
443
|
-
}
|
|
444
|
-
if (rest.length === 1 && Array.isArray(rest[0])) {
|
|
445
|
-
var inner = rest[0];
|
|
446
|
-
var hasArrays_1 = inner.some(function (x) { return Array.isArray(x); });
|
|
447
|
-
if (!hasArrays_1) {
|
|
448
|
-
// Multiple leaf children
|
|
449
|
-
for (var _i = 0, _a = inner; _i < _a.length; _i++) {
|
|
450
|
-
var leaf = _a[_i];
|
|
451
|
-
node.addModel(leaf);
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
else {
|
|
455
|
-
// Single non-leaf child
|
|
456
|
-
node.add(TreeNode.fromNestedArray(inner));
|
|
457
|
-
}
|
|
458
|
-
return node;
|
|
459
|
-
}
|
|
460
|
-
var hasArrays = rest.some(function (x) { return Array.isArray(x); });
|
|
461
|
-
if (!hasArrays) {
|
|
462
|
-
// Chain: [model, a, b, c] = model -> a -> b -> c
|
|
463
|
-
var current = node;
|
|
464
|
-
for (var _b = 0, _c = rest; _b < _c.length; _b++) {
|
|
465
|
-
var val = _c[_b];
|
|
466
|
-
current = current.addModel(val);
|
|
467
|
-
}
|
|
468
|
-
return node;
|
|
469
|
-
}
|
|
470
|
-
// Multiple children with at least one non-leaf
|
|
471
|
-
for (var _d = 0, rest_1 = rest; _d < rest_1.length; _d++) {
|
|
472
|
-
var childResult = rest_1[_d];
|
|
473
|
-
node.add(TreeNode.fromNestedArray(childResult));
|
|
474
|
-
}
|
|
475
|
-
return node;
|
|
476
|
-
};
|
|
477
|
-
/**
|
|
478
|
-
* Returns an object representation of the tree.
|
|
479
|
-
*/
|
|
480
|
-
TreeNode.prototype.toObject = function () {
|
|
481
|
-
return {
|
|
482
|
-
model: this.model,
|
|
483
|
-
children: this.children.map(function (child) { return child.toObject(); }),
|
|
484
|
-
};
|
|
485
|
-
};
|
|
486
|
-
return TreeNode;
|
|
487
|
-
}());
|
|
488
|
-
exports.TreeNode = TreeNode;
|
|
489
|
-
//# sourceMappingURL=TreeNode.js.map
|
package/dist/TreeNode.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TreeNode.js","sourceRoot":"","sources":["../src/TreeNode.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA;;GAEG;AACH;IAGE,kBACS,KAAQ,EACR,MAAiC,EACjC,QAA4B;QAD5B,uBAAA,EAAA,aAAiC;QACjC,yBAAA,EAAA,aAA4B;QAF5B,UAAK,GAAL,KAAK,CAAG;QACR,WAAM,GAAN,MAAM,CAA2B;QACjC,aAAQ,GAAR,QAAQ,CAAoB;QAL7B,WAAM,GAA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C,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QAED,+CAA+C;QAC/C,KAA0B,UAAI,EAAJ,aAAI,EAAJ,kBAAI,EAAJ,IAAI,EAAE,CAAC;YAA5B,IAAM,WAAW,aAAA;YACpB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAI,WAA6B,CAAC,CAAC,CAAC;QACvE,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,2BAAQ,GAAR;QACE,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,QAAQ,EAAE,EAAhB,CAAgB,CAAC;SACzD,CAAC;IACJ,CAAC;IACH,eAAC;AAAD,CAAC,AAnZD,IAmZC;AAnZY,4BAAQ"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/tsdoc-metadata.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.55.2"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|