@rxap/tree 12.4.0 → 13.0.0-next.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/esm2020/index.mjs +6 -0
- package/esm2020/lib/tokens.mjs +3 -0
- package/esm2020/lib/tree-content.directive.mjs +20 -0
- package/esm2020/lib/tree.component.mjs +157 -0
- package/esm2020/lib/tree.component.module.mjs +67 -0
- package/esm2020/lib/tree.data-source.mjs +331 -0
- package/esm2020/rxap-tree.mjs +5 -0
- package/fesm2015/{rxap-tree.js → rxap-tree.mjs} +48 -49
- package/fesm2015/rxap-tree.mjs.map +1 -0
- package/fesm2020/rxap-tree.mjs +567 -0
- package/fesm2020/rxap-tree.mjs.map +1 -0
- package/package.json +39 -25
- package/src/schematics/ng-add/index.js +1 -1
- package/src/schematics/ng-add/index.js.map +1 -1
- package/bundles/rxap-tree.umd.js +0 -1051
- package/bundles/rxap-tree.umd.js.map +0 -1
- package/esm2015/index.js +0 -6
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/tokens.js +0 -3
- package/esm2015/lib/tokens.js.map +0 -1
- package/esm2015/lib/tree-content.directive.js +0 -20
- package/esm2015/lib/tree-content.directive.js.map +0 -1
- package/esm2015/lib/tree.component.js +0 -165
- package/esm2015/lib/tree.component.js.map +0 -1
- package/esm2015/lib/tree.component.module.js +0 -68
- package/esm2015/lib/tree.component.module.js.map +0 -1
- package/esm2015/lib/tree.data-source.js +0 -348
- package/esm2015/lib/tree.data-source.js.map +0 -1
- package/esm2015/rxap-tree.js +0 -5
- package/esm2015/rxap-tree.js.map +0 -1
- package/fesm2015/rxap-tree.js.map +0 -1
package/bundles/rxap-tree.umd.js
DELETED
|
@@ -1,1051 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('@angular/cdk/tree'), require('@angular/cdk/collections'), require('rxjs/operators'), require('@rxap/data-source'), require('@rxap/utilities'), require('@angular/core'), require('@rxap/utilities/rxjs'), require('@angular/cdk/portal'), require('@angular/material/progress-bar'), require('@angular/material/tree'), require('@angular/material/icon'), require('@angular/material/checkbox'), require('@angular/material/button'), require('@angular/material/progress-spinner'), require('@angular/material/divider'), require('@angular/flex-layout/flex'), require('@angular/common'), require('@angular/flex-layout/extended'), require('@rxap/material-directives/icon'), require('@rxap/contenteditable'), require('@angular/flex-layout')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@rxap/tree', ['exports', 'rxjs', '@angular/cdk/tree', '@angular/cdk/collections', 'rxjs/operators', '@rxap/data-source', '@rxap/utilities', '@angular/core', '@rxap/utilities/rxjs', '@angular/cdk/portal', '@angular/material/progress-bar', '@angular/material/tree', '@angular/material/icon', '@angular/material/checkbox', '@angular/material/button', '@angular/material/progress-spinner', '@angular/material/divider', '@angular/flex-layout/flex', '@angular/common', '@angular/flex-layout/extended', '@rxap/material-directives/icon', '@rxap/contenteditable', '@angular/flex-layout'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.rxap = global.rxap || {}, global.rxap.tree = {}), global.rxjs, global.ng.cdk.tree, global.ng.cdk.collections, global.rxjs.operators, global.dataSource, global.utilities, global.ng.core, global.rxjs$1, global.ng.cdk.portal, global.ng.material.progressBar, global.ng.material.tree, global.ng.material.icon, global.ng.material.checkbox, global.ng.material.button, global.ng.material.progressSpinner, global.ng.material.divider, global.ng.flexLayout.flex, global.ng.common, global.ng.flexLayout.extended, global.i11, global.i12, global.ng.flexLayout));
|
|
5
|
-
}(this, (function (exports, rxjs, tree, collections, operators, dataSource, utilities, i0, rxjs$1, i13, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, flexLayout) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () {
|
|
17
|
-
return e[k];
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
n['default'] = e;
|
|
24
|
-
return Object.freeze(n);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
28
|
-
var i13__namespace = /*#__PURE__*/_interopNamespace(i13);
|
|
29
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
30
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
31
|
-
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
32
|
-
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
33
|
-
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
34
|
-
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
35
|
-
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
36
|
-
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
37
|
-
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
38
|
-
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
39
|
-
var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
|
|
40
|
-
var i12__namespace = /*#__PURE__*/_interopNamespace(i12);
|
|
41
|
-
|
|
42
|
-
/*! *****************************************************************************
|
|
43
|
-
Copyright (c) Microsoft Corporation.
|
|
44
|
-
|
|
45
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
46
|
-
purpose with or without fee is hereby granted.
|
|
47
|
-
|
|
48
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
49
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
50
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
51
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
52
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
53
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
54
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
55
|
-
***************************************************************************** */
|
|
56
|
-
/* global Reflect, Promise */
|
|
57
|
-
var extendStatics = function (d, b) {
|
|
58
|
-
extendStatics = Object.setPrototypeOf ||
|
|
59
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
60
|
-
function (d, b) { for (var p in b)
|
|
61
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
62
|
-
d[p] = b[p]; };
|
|
63
|
-
return extendStatics(d, b);
|
|
64
|
-
};
|
|
65
|
-
function __extends(d, b) {
|
|
66
|
-
if (typeof b !== "function" && b !== null)
|
|
67
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
68
|
-
extendStatics(d, b);
|
|
69
|
-
function __() { this.constructor = d; }
|
|
70
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
71
|
-
}
|
|
72
|
-
var __assign = function () {
|
|
73
|
-
__assign = Object.assign || function __assign(t) {
|
|
74
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
75
|
-
s = arguments[i];
|
|
76
|
-
for (var p in s)
|
|
77
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
78
|
-
t[p] = s[p];
|
|
79
|
-
}
|
|
80
|
-
return t;
|
|
81
|
-
};
|
|
82
|
-
return __assign.apply(this, arguments);
|
|
83
|
-
};
|
|
84
|
-
function __rest(s, e) {
|
|
85
|
-
var t = {};
|
|
86
|
-
for (var p in s)
|
|
87
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
88
|
-
t[p] = s[p];
|
|
89
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
90
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
91
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
92
|
-
t[p[i]] = s[p[i]];
|
|
93
|
-
}
|
|
94
|
-
return t;
|
|
95
|
-
}
|
|
96
|
-
function __decorate(decorators, target, key, desc) {
|
|
97
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
98
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
99
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
100
|
-
else
|
|
101
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
102
|
-
if (d = decorators[i])
|
|
103
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
104
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
105
|
-
}
|
|
106
|
-
function __param(paramIndex, decorator) {
|
|
107
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
108
|
-
}
|
|
109
|
-
function __metadata(metadataKey, metadataValue) {
|
|
110
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
111
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
112
|
-
}
|
|
113
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
114
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
115
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
116
|
-
function fulfilled(value) { try {
|
|
117
|
-
step(generator.next(value));
|
|
118
|
-
}
|
|
119
|
-
catch (e) {
|
|
120
|
-
reject(e);
|
|
121
|
-
} }
|
|
122
|
-
function rejected(value) { try {
|
|
123
|
-
step(generator["throw"](value));
|
|
124
|
-
}
|
|
125
|
-
catch (e) {
|
|
126
|
-
reject(e);
|
|
127
|
-
} }
|
|
128
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
129
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
function __generator(thisArg, body) {
|
|
133
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
134
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
135
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
136
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
137
|
-
function step(op) {
|
|
138
|
-
if (f)
|
|
139
|
-
throw new TypeError("Generator is already executing.");
|
|
140
|
-
while (_)
|
|
141
|
-
try {
|
|
142
|
-
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)
|
|
143
|
-
return t;
|
|
144
|
-
if (y = 0, t)
|
|
145
|
-
op = [op[0] & 2, t.value];
|
|
146
|
-
switch (op[0]) {
|
|
147
|
-
case 0:
|
|
148
|
-
case 1:
|
|
149
|
-
t = op;
|
|
150
|
-
break;
|
|
151
|
-
case 4:
|
|
152
|
-
_.label++;
|
|
153
|
-
return { value: op[1], done: false };
|
|
154
|
-
case 5:
|
|
155
|
-
_.label++;
|
|
156
|
-
y = op[1];
|
|
157
|
-
op = [0];
|
|
158
|
-
continue;
|
|
159
|
-
case 7:
|
|
160
|
-
op = _.ops.pop();
|
|
161
|
-
_.trys.pop();
|
|
162
|
-
continue;
|
|
163
|
-
default:
|
|
164
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
165
|
-
_ = 0;
|
|
166
|
-
continue;
|
|
167
|
-
}
|
|
168
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
169
|
-
_.label = op[1];
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
173
|
-
_.label = t[1];
|
|
174
|
-
t = op;
|
|
175
|
-
break;
|
|
176
|
-
}
|
|
177
|
-
if (t && _.label < t[2]) {
|
|
178
|
-
_.label = t[2];
|
|
179
|
-
_.ops.push(op);
|
|
180
|
-
break;
|
|
181
|
-
}
|
|
182
|
-
if (t[2])
|
|
183
|
-
_.ops.pop();
|
|
184
|
-
_.trys.pop();
|
|
185
|
-
continue;
|
|
186
|
-
}
|
|
187
|
-
op = body.call(thisArg, _);
|
|
188
|
-
}
|
|
189
|
-
catch (e) {
|
|
190
|
-
op = [6, e];
|
|
191
|
-
y = 0;
|
|
192
|
-
}
|
|
193
|
-
finally {
|
|
194
|
-
f = t = 0;
|
|
195
|
-
}
|
|
196
|
-
if (op[0] & 5)
|
|
197
|
-
throw op[1];
|
|
198
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
202
|
-
if (k2 === undefined)
|
|
203
|
-
k2 = k;
|
|
204
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
205
|
-
}) : (function (o, m, k, k2) {
|
|
206
|
-
if (k2 === undefined)
|
|
207
|
-
k2 = k;
|
|
208
|
-
o[k2] = m[k];
|
|
209
|
-
});
|
|
210
|
-
function __exportStar(m, o) {
|
|
211
|
-
for (var p in m)
|
|
212
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
213
|
-
__createBinding(o, m, p);
|
|
214
|
-
}
|
|
215
|
-
function __values(o) {
|
|
216
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
217
|
-
if (m)
|
|
218
|
-
return m.call(o);
|
|
219
|
-
if (o && typeof o.length === "number")
|
|
220
|
-
return {
|
|
221
|
-
next: function () {
|
|
222
|
-
if (o && i >= o.length)
|
|
223
|
-
o = void 0;
|
|
224
|
-
return { value: o && o[i++], done: !o };
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
228
|
-
}
|
|
229
|
-
function __read(o, n) {
|
|
230
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
231
|
-
if (!m)
|
|
232
|
-
return o;
|
|
233
|
-
var i = m.call(o), r, ar = [], e;
|
|
234
|
-
try {
|
|
235
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
236
|
-
ar.push(r.value);
|
|
237
|
-
}
|
|
238
|
-
catch (error) {
|
|
239
|
-
e = { error: error };
|
|
240
|
-
}
|
|
241
|
-
finally {
|
|
242
|
-
try {
|
|
243
|
-
if (r && !r.done && (m = i["return"]))
|
|
244
|
-
m.call(i);
|
|
245
|
-
}
|
|
246
|
-
finally {
|
|
247
|
-
if (e)
|
|
248
|
-
throw e.error;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
return ar;
|
|
252
|
-
}
|
|
253
|
-
/** @deprecated */
|
|
254
|
-
function __spread() {
|
|
255
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
256
|
-
ar = ar.concat(__read(arguments[i]));
|
|
257
|
-
return ar;
|
|
258
|
-
}
|
|
259
|
-
/** @deprecated */
|
|
260
|
-
function __spreadArrays() {
|
|
261
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
262
|
-
s += arguments[i].length;
|
|
263
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
264
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
265
|
-
r[k] = a[j];
|
|
266
|
-
return r;
|
|
267
|
-
}
|
|
268
|
-
function __spreadArray(to, from) {
|
|
269
|
-
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
270
|
-
to[j] = from[i];
|
|
271
|
-
return to;
|
|
272
|
-
}
|
|
273
|
-
function __await(v) {
|
|
274
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
275
|
-
}
|
|
276
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
277
|
-
if (!Symbol.asyncIterator)
|
|
278
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
279
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
280
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
281
|
-
function verb(n) { if (g[n])
|
|
282
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
283
|
-
function resume(n, v) { try {
|
|
284
|
-
step(g[n](v));
|
|
285
|
-
}
|
|
286
|
-
catch (e) {
|
|
287
|
-
settle(q[0][3], e);
|
|
288
|
-
} }
|
|
289
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
290
|
-
function fulfill(value) { resume("next", value); }
|
|
291
|
-
function reject(value) { resume("throw", value); }
|
|
292
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
293
|
-
resume(q[0][0], q[0][1]); }
|
|
294
|
-
}
|
|
295
|
-
function __asyncDelegator(o) {
|
|
296
|
-
var i, p;
|
|
297
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
298
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
299
|
-
}
|
|
300
|
-
function __asyncValues(o) {
|
|
301
|
-
if (!Symbol.asyncIterator)
|
|
302
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
303
|
-
var m = o[Symbol.asyncIterator], i;
|
|
304
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
305
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
306
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
307
|
-
}
|
|
308
|
-
function __makeTemplateObject(cooked, raw) {
|
|
309
|
-
if (Object.defineProperty) {
|
|
310
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
311
|
-
}
|
|
312
|
-
else {
|
|
313
|
-
cooked.raw = raw;
|
|
314
|
-
}
|
|
315
|
-
return cooked;
|
|
316
|
-
}
|
|
317
|
-
;
|
|
318
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
319
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
320
|
-
}) : function (o, v) {
|
|
321
|
-
o["default"] = v;
|
|
322
|
-
};
|
|
323
|
-
function __importStar(mod) {
|
|
324
|
-
if (mod && mod.__esModule)
|
|
325
|
-
return mod;
|
|
326
|
-
var result = {};
|
|
327
|
-
if (mod != null)
|
|
328
|
-
for (var k in mod)
|
|
329
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
330
|
-
__createBinding(result, mod, k);
|
|
331
|
-
__setModuleDefault(result, mod);
|
|
332
|
-
return result;
|
|
333
|
-
}
|
|
334
|
-
function __importDefault(mod) {
|
|
335
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
336
|
-
}
|
|
337
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
338
|
-
if (kind === "a" && !f)
|
|
339
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
340
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
341
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
342
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
343
|
-
}
|
|
344
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
345
|
-
if (kind === "m")
|
|
346
|
-
throw new TypeError("Private method is not writable");
|
|
347
|
-
if (kind === "a" && !f)
|
|
348
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
349
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
350
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
351
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
function isSelectionChange(obj) {
|
|
355
|
-
return !!obj && obj.hasOwnProperty('added') && obj.hasOwnProperty('removed');
|
|
356
|
-
}
|
|
357
|
-
var RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD = new i0.InjectionToken('rxap/tree/data-source/root-remote-method');
|
|
358
|
-
var RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD = new i0.InjectionToken('rxap/tree/data-source/children-remote-method');
|
|
359
|
-
var TreeDataSource = /** @class */ (function (_super) {
|
|
360
|
-
__extends(TreeDataSource, _super);
|
|
361
|
-
function TreeDataSource(rootRemoteMethod, childrenRemoteMethod, metadata) {
|
|
362
|
-
if (metadata === void 0) { metadata = null; }
|
|
363
|
-
var _this = _super.call(this, metadata) || this;
|
|
364
|
-
_this.rootRemoteMethod = rootRemoteMethod;
|
|
365
|
-
_this.childrenRemoteMethod = childrenRemoteMethod;
|
|
366
|
-
_this.tree$ = new rxjs.BehaviorSubject([]);
|
|
367
|
-
_this._expandedLocalStorageSubscription = null;
|
|
368
|
-
_this._selectedLocalStorageSubscription = null;
|
|
369
|
-
// TODO : änlich problem wie bei der redundaten expand SelectionModel.
|
|
370
|
-
// im localStorage wird nur die id gespeichert.
|
|
371
|
-
_this._preSelected = [];
|
|
372
|
-
_this._data$ = new rxjs.BehaviorSubject([]);
|
|
373
|
-
_this.loading$ = new rxjs$1.ToggleSubject(true);
|
|
374
|
-
_this.toDisplay = function () { return 'to display function not defined'; };
|
|
375
|
-
_this.getIcon = function () { return null; };
|
|
376
|
-
_this.hasDetails = function () { return true; };
|
|
377
|
-
_this.matchFilter = function () { return true; };
|
|
378
|
-
_this._refreshMatchFilter = new rxjs.Subject();
|
|
379
|
-
_this.tree$
|
|
380
|
-
.pipe(operators.map(function (tree) { return tree
|
|
381
|
-
.map(function (child) { return _this.flatTree(child); })
|
|
382
|
-
.reduce(function (acc, nodes) { return __spreadArray(__spreadArray([], __read(acc)), __read(nodes)); }, []); }))
|
|
383
|
-
.subscribe(_this._data$);
|
|
384
|
-
// TODO add new SelectModel class that saves the select model to the localStorage
|
|
385
|
-
_this.initSelected();
|
|
386
|
-
_this.initExpanded();
|
|
387
|
-
return _this;
|
|
388
|
-
}
|
|
389
|
-
TreeDataSource.prototype.getTreeRoot = function () {
|
|
390
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
391
|
-
var root, rootNodes;
|
|
392
|
-
var _this = this;
|
|
393
|
-
return __generator(this, function (_b) {
|
|
394
|
-
switch (_b.label) {
|
|
395
|
-
case 0:
|
|
396
|
-
this.loading$.enable();
|
|
397
|
-
return [4 /*yield*/, this.getRoot()];
|
|
398
|
-
case 1:
|
|
399
|
-
root = _b.sent();
|
|
400
|
-
if (!Array.isArray(root)) return [3 /*break*/, 3];
|
|
401
|
-
return [4 /*yield*/, Promise.all(root.map(function (node) { return _this._toNode(node); }))];
|
|
402
|
-
case 2:
|
|
403
|
-
rootNodes = _b.sent();
|
|
404
|
-
return [3 /*break*/, 5];
|
|
405
|
-
case 3: return [4 /*yield*/, this._toNode(root)];
|
|
406
|
-
case 4:
|
|
407
|
-
rootNodes = [_b.sent()];
|
|
408
|
-
_b.label = 5;
|
|
409
|
-
case 5:
|
|
410
|
-
this.tree$.next(rootNodes);
|
|
411
|
-
this.loading$.disable();
|
|
412
|
-
return [2 /*return*/, rootNodes];
|
|
413
|
-
}
|
|
414
|
-
});
|
|
415
|
-
});
|
|
416
|
-
};
|
|
417
|
-
TreeDataSource.prototype.selectNode = function (node) {
|
|
418
|
-
if (!this.selected.isMultipleSelection()) {
|
|
419
|
-
if (this.selected.hasValue()) {
|
|
420
|
-
var currentSelectedNode = this.selected.selected[0];
|
|
421
|
-
currentSelectedNode.deselect();
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
this.selected.select(node);
|
|
425
|
-
return Promise.resolve();
|
|
426
|
-
};
|
|
427
|
-
TreeDataSource.prototype.setTreeControl = function (treeControl) {
|
|
428
|
-
this.treeControl = treeControl;
|
|
429
|
-
};
|
|
430
|
-
TreeDataSource.prototype.setMatchFilter = function (matchFilter) {
|
|
431
|
-
this.matchFilter = matchFilter;
|
|
432
|
-
};
|
|
433
|
-
TreeDataSource.prototype.setToDisplay = function (toDisplay) {
|
|
434
|
-
if (toDisplay === void 0) { toDisplay = this.toDisplay; }
|
|
435
|
-
this.toDisplay = toDisplay;
|
|
436
|
-
};
|
|
437
|
-
TreeDataSource.prototype.setGetIcon = function (getIcon) {
|
|
438
|
-
if (getIcon === void 0) { getIcon = this.getIcon; }
|
|
439
|
-
this.getIcon = getIcon;
|
|
440
|
-
};
|
|
441
|
-
TreeDataSource.prototype.setHasDetails = function (hasDetails) {
|
|
442
|
-
if (hasDetails === void 0) { hasDetails = this.hasDetails; }
|
|
443
|
-
this.hasDetails = hasDetails;
|
|
444
|
-
};
|
|
445
|
-
TreeDataSource.prototype.deselectNode = function (node) {
|
|
446
|
-
this.selected.deselect(node);
|
|
447
|
-
return Promise.resolve();
|
|
448
|
-
};
|
|
449
|
-
// - the SelectModel that stores the selection into the local storage?
|
|
450
|
-
TreeDataSource.prototype._toNode = function (item, depth, onExpand, onCollapse, onSelect, onDeselect) {
|
|
451
|
-
if (depth === void 0) { depth = 0; }
|
|
452
|
-
if (onExpand === void 0) { onExpand = this.expandNode.bind(this); }
|
|
453
|
-
if (onCollapse === void 0) { onCollapse = this.collapseNode.bind(this); }
|
|
454
|
-
if (onSelect === void 0) { onSelect = this.selectNode.bind(this); }
|
|
455
|
-
if (onDeselect === void 0) { onDeselect = this.deselectNode.bind(this); }
|
|
456
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
457
|
-
var node;
|
|
458
|
-
var _this = this;
|
|
459
|
-
return __generator(this, function (_b) {
|
|
460
|
-
switch (_b.label) {
|
|
461
|
-
case 0: return [4 /*yield*/, this.toNode(item, depth, onExpand, onCollapse, onSelect, onDeselect)];
|
|
462
|
-
case 1:
|
|
463
|
-
node = _b.sent();
|
|
464
|
-
if (this.expanded.isSelected(node.id)) {
|
|
465
|
-
node
|
|
466
|
-
.expand()
|
|
467
|
-
.then(function () {
|
|
468
|
-
// TODO : remove redundant this.expanded SelectionModel. Only store expanded nodes in this.treeControl.expansionModel
|
|
469
|
-
// das problem ist das ich beim speicher in localStorage nur die id speicher.
|
|
470
|
-
// Des wegen kann ich beim laden aus dem localStorage this.treeControl.expansionModel
|
|
471
|
-
// nicht einfach mit den expanend nodes fullen. Da dort das node object benötigt wird
|
|
472
|
-
// möglich lösungen:
|
|
473
|
-
// - das node object läde die entity mithilfe der id automatisch nach
|
|
474
|
-
_this.treeControl.expansionModel.select(node);
|
|
475
|
-
console.debug("Restore expand for node '" + node.id + "' SUCCESSFULLY");
|
|
476
|
-
})
|
|
477
|
-
.catch(function () { return console.debug("Restore expand for node '" + node.id + "' FAILED"); });
|
|
478
|
-
}
|
|
479
|
-
if (!this._preSelected.includes(node.id)) return [3 /*break*/, 3];
|
|
480
|
-
return [4 /*yield*/, node
|
|
481
|
-
.select()
|
|
482
|
-
.then(function () { return console.debug("Restore select for node '" + node.id + "' SUCCESSFULLY"); })
|
|
483
|
-
.catch(function () { return console.debug("Restore select for node '" + node.id + "' FAILED"); })];
|
|
484
|
-
case 2:
|
|
485
|
-
_b.sent();
|
|
486
|
-
_b.label = 3;
|
|
487
|
-
case 3: return [2 /*return*/, node];
|
|
488
|
-
}
|
|
489
|
-
});
|
|
490
|
-
});
|
|
491
|
-
};
|
|
492
|
-
TreeDataSource.prototype.expandNode = function (node) {
|
|
493
|
-
var _a;
|
|
494
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
495
|
-
var children, _b, _c;
|
|
496
|
-
var _this = this;
|
|
497
|
-
return __generator(this, function (_d) {
|
|
498
|
-
switch (_d.label) {
|
|
499
|
-
case 0:
|
|
500
|
-
if (!(node.item.hasChildren && !((_a = node.item.children) === null || _a === void 0 ? void 0 : _a.length))) return [3 /*break*/, 3];
|
|
501
|
-
node.isLoading$.enable();
|
|
502
|
-
return [4 /*yield*/, this.getChildren(node)];
|
|
503
|
-
case 1:
|
|
504
|
-
children = _d.sent();
|
|
505
|
-
// add the loaded children to the item object
|
|
506
|
-
node.item.children = children;
|
|
507
|
-
_c = (_b = node).addChildren;
|
|
508
|
-
return [4 /*yield*/, Promise.all(children.map(function (child) { return _this._toNode(child, node.depth + 1, node.onExpand, node.onCollapse); }))];
|
|
509
|
-
case 2:
|
|
510
|
-
_c.apply(_b, [_d.sent()]);
|
|
511
|
-
node.isLoading$.disable();
|
|
512
|
-
_d.label = 3;
|
|
513
|
-
case 3:
|
|
514
|
-
this.expanded.select(node.id);
|
|
515
|
-
this.tree$.next(this.tree$.value);
|
|
516
|
-
return [2 /*return*/];
|
|
517
|
-
}
|
|
518
|
-
});
|
|
519
|
-
});
|
|
520
|
-
};
|
|
521
|
-
TreeDataSource.prototype.getChildren = function (node) {
|
|
522
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
523
|
-
return __generator(this, function (_b) {
|
|
524
|
-
return [2 /*return*/, this.childrenRemoteMethod.call(node)];
|
|
525
|
-
});
|
|
526
|
-
});
|
|
527
|
-
};
|
|
528
|
-
TreeDataSource.prototype.getRoot = function () {
|
|
529
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
530
|
-
var rootParameters;
|
|
531
|
-
return __generator(this, function (_b) {
|
|
532
|
-
switch (_b.label) {
|
|
533
|
-
case 0: return [4 /*yield*/, this.getRootParameters()];
|
|
534
|
-
case 1:
|
|
535
|
-
rootParameters = _b.sent();
|
|
536
|
-
return [2 /*return*/, this.rootRemoteMethod.call(rootParameters)];
|
|
537
|
-
}
|
|
538
|
-
});
|
|
539
|
-
});
|
|
540
|
-
};
|
|
541
|
-
TreeDataSource.prototype.getRootParameters = function () {
|
|
542
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
543
|
-
return __generator(this, function (_b) {
|
|
544
|
-
return [2 /*return*/, undefined];
|
|
545
|
-
});
|
|
546
|
-
});
|
|
547
|
-
};
|
|
548
|
-
// TODO : find better solution to allow the overwrite of the toNode method
|
|
549
|
-
// without losing the custom preselect and preexpand function
|
|
550
|
-
TreeDataSource.prototype.getNodeById = function (id) {
|
|
551
|
-
function getNodeById(node, nodeId) {
|
|
552
|
-
if (node.id === nodeId) {
|
|
553
|
-
return node;
|
|
554
|
-
}
|
|
555
|
-
if (node.hasNode(nodeId)) {
|
|
556
|
-
return node.getNode(nodeId);
|
|
557
|
-
}
|
|
558
|
-
else {
|
|
559
|
-
return null;
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
return (this.tree$.value
|
|
563
|
-
.map(function (node) { return getNodeById(node, id); })
|
|
564
|
-
.filter(Boolean)[0] || null);
|
|
565
|
-
};
|
|
566
|
-
TreeDataSource.prototype.toNode = function (item, depth, onExpand, onCollapse, onSelect, onDeselect) {
|
|
567
|
-
if (depth === void 0) { depth = 0; }
|
|
568
|
-
if (onExpand === void 0) { onExpand = this.expandNode.bind(this); }
|
|
569
|
-
if (onCollapse === void 0) { onCollapse = this.collapseNode.bind(this); }
|
|
570
|
-
if (onSelect === void 0) { onSelect = this.selectNode.bind(this); }
|
|
571
|
-
if (onDeselect === void 0) { onDeselect = this.deselectNode.bind(this); }
|
|
572
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
573
|
-
return __generator(this, function (_b) {
|
|
574
|
-
return [2 /*return*/, rxjs$1.Node.ToNode(item, depth, onExpand, onCollapse, this.toDisplay, this.getIcon, onSelect, onDeselect, this.hasDetails)];
|
|
575
|
-
});
|
|
576
|
-
});
|
|
577
|
-
};
|
|
578
|
-
TreeDataSource.prototype.collapseNode = function (node) {
|
|
579
|
-
this.expanded.deselect(node.id);
|
|
580
|
-
this.tree$.next(this.tree$.value);
|
|
581
|
-
return Promise.resolve();
|
|
582
|
-
};
|
|
583
|
-
TreeDataSource.prototype.flatTree = function (tree) {
|
|
584
|
-
var _this = this;
|
|
585
|
-
function flat(acc, list) {
|
|
586
|
-
return __spreadArray(__spreadArray([], __read(acc)), __read(list));
|
|
587
|
-
}
|
|
588
|
-
var flatTree = function (node) {
|
|
589
|
-
if (!Array.isArray(node.children)) {
|
|
590
|
-
console.log(node);
|
|
591
|
-
throw new Error('Node has not defined children');
|
|
592
|
-
}
|
|
593
|
-
if (node.expanded || _this.expanded.isSelected(node.id)) {
|
|
594
|
-
return __spreadArray([
|
|
595
|
-
node
|
|
596
|
-
], __read(node.children.map(function (child) { return flatTree(child); }).reduce(flat, [])));
|
|
597
|
-
}
|
|
598
|
-
else {
|
|
599
|
-
return [node];
|
|
600
|
-
}
|
|
601
|
-
};
|
|
602
|
-
return flatTree(tree);
|
|
603
|
-
};
|
|
604
|
-
TreeDataSource.prototype.destroy = function () {
|
|
605
|
-
_super.prototype.destroy.call(this);
|
|
606
|
-
// TODO : add subscription handler to BaseDataSource
|
|
607
|
-
if (this._expandedLocalStorageSubscription) {
|
|
608
|
-
this._expandedLocalStorageSubscription.unsubscribe();
|
|
609
|
-
}
|
|
610
|
-
if (this._selectedLocalStorageSubscription) {
|
|
611
|
-
this._selectedLocalStorageSubscription.unsubscribe();
|
|
612
|
-
}
|
|
613
|
-
};
|
|
614
|
-
TreeDataSource.prototype.refreshMatchFilter = function () {
|
|
615
|
-
this._refreshMatchFilter.next();
|
|
616
|
-
};
|
|
617
|
-
TreeDataSource.prototype._connect = function (collectionViewer) {
|
|
618
|
-
var _this = this;
|
|
619
|
-
this.treeControl.expansionModel.changed.subscribe(function (change) {
|
|
620
|
-
if (isSelectionChange(change)) {
|
|
621
|
-
if (change.added) {
|
|
622
|
-
change.added.forEach(function (node) { return node.expand(); });
|
|
623
|
-
}
|
|
624
|
-
if (change.removed) {
|
|
625
|
-
change.removed
|
|
626
|
-
.slice()
|
|
627
|
-
.reverse()
|
|
628
|
-
.forEach(function (node) { return node.collapse(); });
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
});
|
|
632
|
-
var loadRoot = Promise.resolve();
|
|
633
|
-
if (this.tree$.value.length === 0) {
|
|
634
|
-
loadRoot = this.getTreeRoot();
|
|
635
|
-
}
|
|
636
|
-
return rxjs.from(loadRoot).pipe(operators.tap(function (rootNodes) {
|
|
637
|
-
if (rootNodes) {
|
|
638
|
-
var promises = [];
|
|
639
|
-
if (_this.metadata.selectMultiple) {
|
|
640
|
-
if (!_this.selected.hasValue()) {
|
|
641
|
-
promises.push.apply(promises, __spreadArray([], __read(rootNodes
|
|
642
|
-
.filter(function (node) { return node.hasDetails; })
|
|
643
|
-
.map(function (node) { return node.select(); }))));
|
|
644
|
-
}
|
|
645
|
-
if (!_this.expanded.hasValue()) {
|
|
646
|
-
promises.push.apply(promises, __spreadArray([], __read(rootNodes
|
|
647
|
-
.filter(function (node) { return node.hasChildren; })
|
|
648
|
-
.map(function (node) { return node.expand(); }))));
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
else if (rootNodes.length) {
|
|
652
|
-
var rootNode = rootNodes[0];
|
|
653
|
-
if (!_this.selected.hasValue()) {
|
|
654
|
-
// TODO : rename hasDetails to isSelectable
|
|
655
|
-
if (rootNode.hasDetails) {
|
|
656
|
-
promises.push(rootNode.select());
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
if (!_this.expanded.hasValue()) {
|
|
660
|
-
promises.push(rootNode.expand());
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
return Promise.all(promises);
|
|
664
|
-
}
|
|
665
|
-
return Promise.resolve();
|
|
666
|
-
}), operators.switchMap(function () { return rxjs.merge(collectionViewer.viewChange, _this._data$).pipe(operators.map(function () { return _this._data$.value; })); }), operators.switchMap(function (nodeList) { return _this._refreshMatchFilter.pipe(operators.startWith(null), operators.map(function () { return nodeList.filter(function (node) { return _this.matchFilter(node); }); })); }));
|
|
667
|
-
};
|
|
668
|
-
TreeDataSource.prototype.refresh = function () {
|
|
669
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
670
|
-
var rootNodes, loadExpandedNodes, selected;
|
|
671
|
-
var _b;
|
|
672
|
-
var _this = this;
|
|
673
|
-
return __generator(this, function (_c) {
|
|
674
|
-
switch (_c.label) {
|
|
675
|
-
case 0: return [4 /*yield*/, this.getTreeRoot()];
|
|
676
|
-
case 1:
|
|
677
|
-
rootNodes = _c.sent();
|
|
678
|
-
loadExpandedNodes = function (children) { return __awaiter(_this, void 0, void 0, function () {
|
|
679
|
-
var children_1, children_1_1, child, e_1_1;
|
|
680
|
-
var e_1, _b;
|
|
681
|
-
return __generator(this, function (_c) {
|
|
682
|
-
switch (_c.label) {
|
|
683
|
-
case 0:
|
|
684
|
-
_c.trys.push([0, 7, 8, 9]);
|
|
685
|
-
children_1 = __values(children), children_1_1 = children_1.next();
|
|
686
|
-
_c.label = 1;
|
|
687
|
-
case 1:
|
|
688
|
-
if (!!children_1_1.done) return [3 /*break*/, 6];
|
|
689
|
-
child = children_1_1.value;
|
|
690
|
-
if (!this.expanded.isSelected(child.id)) return [3 /*break*/, 3];
|
|
691
|
-
// call the node method to ensure that the expanded property of
|
|
692
|
-
// Node is set.
|
|
693
|
-
return [4 /*yield*/, child.expand()];
|
|
694
|
-
case 2:
|
|
695
|
-
// call the node method to ensure that the expanded property of
|
|
696
|
-
// Node is set.
|
|
697
|
-
_c.sent();
|
|
698
|
-
_c.label = 3;
|
|
699
|
-
case 3:
|
|
700
|
-
if (!child.hasChildren) return [3 /*break*/, 5];
|
|
701
|
-
return [4 /*yield*/, loadExpandedNodes(child.children)];
|
|
702
|
-
case 4:
|
|
703
|
-
_c.sent();
|
|
704
|
-
_c.label = 5;
|
|
705
|
-
case 5:
|
|
706
|
-
children_1_1 = children_1.next();
|
|
707
|
-
return [3 /*break*/, 1];
|
|
708
|
-
case 6: return [3 /*break*/, 9];
|
|
709
|
-
case 7:
|
|
710
|
-
e_1_1 = _c.sent();
|
|
711
|
-
e_1 = { error: e_1_1 };
|
|
712
|
-
return [3 /*break*/, 9];
|
|
713
|
-
case 8:
|
|
714
|
-
try {
|
|
715
|
-
if (children_1_1 && !children_1_1.done && (_b = children_1.return)) _b.call(children_1);
|
|
716
|
-
}
|
|
717
|
-
finally { if (e_1) throw e_1.error; }
|
|
718
|
-
return [7 /*endfinally*/];
|
|
719
|
-
case 9: return [2 /*return*/];
|
|
720
|
-
}
|
|
721
|
-
});
|
|
722
|
-
}); };
|
|
723
|
-
return [4 /*yield*/, Promise.all(rootNodes
|
|
724
|
-
.filter(function (node) { return node.hasChildren; })
|
|
725
|
-
.map(function (node) { return loadExpandedNodes(node.children); }))];
|
|
726
|
-
case 2:
|
|
727
|
-
_c.sent();
|
|
728
|
-
selected = this.selected.selected
|
|
729
|
-
.map(function (node) { return _this.getNodeById(node.id); })
|
|
730
|
-
.filter(Boolean);
|
|
731
|
-
this.selected.clear();
|
|
732
|
-
(_b = this.selected).select.apply(_b, __spreadArray([], __read(selected)));
|
|
733
|
-
return [2 /*return*/];
|
|
734
|
-
}
|
|
735
|
-
});
|
|
736
|
-
});
|
|
737
|
-
};
|
|
738
|
-
TreeDataSource.prototype.initSelected = function () {
|
|
739
|
-
var _this = this;
|
|
740
|
-
var key = utilities.joinPath('rxap/tree', this.id, 'selected');
|
|
741
|
-
if (this.metadata.cacheSelected) {
|
|
742
|
-
if (localStorage.getItem(key)) {
|
|
743
|
-
try {
|
|
744
|
-
this._preSelected = JSON.parse(localStorage.getItem(key));
|
|
745
|
-
}
|
|
746
|
-
catch (e) {
|
|
747
|
-
console.debug('parse expanded tree data source nodes failed');
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
this.selected = new collections.SelectionModel(!!this.metadata.selectMultiple, []);
|
|
752
|
-
if (this.metadata.cacheSelected) {
|
|
753
|
-
this._selectedLocalStorageSubscription = this.selected.changed
|
|
754
|
-
.pipe(operators.tap(function () { return localStorage.setItem(key, JSON.stringify(_this.selected.selected.map(function (s) { return s.id; }))); }))
|
|
755
|
-
.subscribe();
|
|
756
|
-
}
|
|
757
|
-
};
|
|
758
|
-
TreeDataSource.prototype.reset = function () {
|
|
759
|
-
this.selected.clear();
|
|
760
|
-
this.expanded.clear();
|
|
761
|
-
return this.getTreeRoot();
|
|
762
|
-
};
|
|
763
|
-
TreeDataSource.prototype.initExpanded = function () {
|
|
764
|
-
var _this = this;
|
|
765
|
-
var key = utilities.joinPath('rxap/tree', this.id, 'expanded');
|
|
766
|
-
var expanded = [];
|
|
767
|
-
if (this.metadata.cacheExpanded) {
|
|
768
|
-
if (localStorage.getItem(key)) {
|
|
769
|
-
try {
|
|
770
|
-
expanded = JSON.parse(localStorage.getItem(key));
|
|
771
|
-
}
|
|
772
|
-
catch (e) {
|
|
773
|
-
console.debug('parse expanded tree data source nodes failed');
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
this.expanded = new collections.SelectionModel(this.metadata.expandMultiple !== false, expanded);
|
|
778
|
-
if (this.metadata.cacheExpanded) {
|
|
779
|
-
this._expandedLocalStorageSubscription = this.expanded.changed
|
|
780
|
-
.pipe(operators.tap(function () { return localStorage.setItem(key, JSON.stringify(_this.expanded.selected)); }))
|
|
781
|
-
.subscribe();
|
|
782
|
-
}
|
|
783
|
-
};
|
|
784
|
-
return TreeDataSource;
|
|
785
|
-
}(dataSource.BaseDataSource));
|
|
786
|
-
TreeDataSource.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeDataSource, deps: [{ token: RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD }, { token: RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD }, { token: dataSource.RXAP_DATA_SOURCE_METADATA }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
787
|
-
TreeDataSource.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeDataSource });
|
|
788
|
-
__decorate([
|
|
789
|
-
utilities.Required,
|
|
790
|
-
__metadata("design:type", tree.FlatTreeControl)
|
|
791
|
-
], TreeDataSource.prototype, "treeControl", void 0);
|
|
792
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeDataSource, decorators: [{
|
|
793
|
-
type: i0.Injectable
|
|
794
|
-
}], ctorParameters: function () {
|
|
795
|
-
return [{ type: undefined, decorators: [{
|
|
796
|
-
type: i0.Inject,
|
|
797
|
-
args: [RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD]
|
|
798
|
-
}] }, { type: undefined, decorators: [{
|
|
799
|
-
type: i0.Inject,
|
|
800
|
-
args: [RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD]
|
|
801
|
-
}] }, { type: undefined, decorators: [{
|
|
802
|
-
type: i0.Inject,
|
|
803
|
-
args: [dataSource.RXAP_DATA_SOURCE_METADATA]
|
|
804
|
-
}] }];
|
|
805
|
-
}, propDecorators: { treeControl: [] } });
|
|
806
|
-
|
|
807
|
-
var TreeContentDirective = /** @class */ (function () {
|
|
808
|
-
function TreeContentDirective(template) {
|
|
809
|
-
this.template = template;
|
|
810
|
-
}
|
|
811
|
-
return TreeContentDirective;
|
|
812
|
-
}());
|
|
813
|
-
TreeContentDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeContentDirective, deps: [{ token: i0.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
814
|
-
TreeContentDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: TreeContentDirective, selector: "ng-template[rxapTreeContent]", ngImport: i0__namespace });
|
|
815
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeContentDirective, decorators: [{
|
|
816
|
-
type: i0.Directive,
|
|
817
|
-
args: [{
|
|
818
|
-
// tslint:disable-next-line:directive-selector
|
|
819
|
-
selector: 'ng-template[rxapTreeContent]',
|
|
820
|
-
}]
|
|
821
|
-
}], ctorParameters: function () {
|
|
822
|
-
return [{ type: i0__namespace.TemplateRef, decorators: [{
|
|
823
|
-
type: i0.Inject,
|
|
824
|
-
args: [i0.TemplateRef]
|
|
825
|
-
}] }];
|
|
826
|
-
} });
|
|
827
|
-
|
|
828
|
-
var RXAP_TREE_CONTENT_EDITABLE_METHOD = new i0.InjectionToken('rxap/tree-content-editable-method');
|
|
829
|
-
|
|
830
|
-
var TreeComponent = /** @class */ (function () {
|
|
831
|
-
function TreeComponent(viewContainerRef, cdr, contentEditableMethod, renderer) {
|
|
832
|
-
this.viewContainerRef = viewContainerRef;
|
|
833
|
-
this.cdr = cdr;
|
|
834
|
-
this.renderer = renderer;
|
|
835
|
-
this.multiple = false;
|
|
836
|
-
this.hideLeafIcon = false;
|
|
837
|
-
this.details = new i0.EventEmitter();
|
|
838
|
-
this.portal = null;
|
|
839
|
-
this.getLevel = function (node) { return node.depth; };
|
|
840
|
-
this.isExpandable = function (node) { return node.hasChildren; };
|
|
841
|
-
this.hasChild = function (_, nodeData) { return nodeData.hasChildren; };
|
|
842
|
-
/**
|
|
843
|
-
* Indicates that the divider is moved with mouse down
|
|
844
|
-
* @private
|
|
845
|
-
*/
|
|
846
|
-
this._moveDivider = false;
|
|
847
|
-
/**
|
|
848
|
-
* Holds the current tree container width.
|
|
849
|
-
* If null the move divider feature was not yet used and the initial
|
|
850
|
-
* container width is not calculated
|
|
851
|
-
* @private
|
|
852
|
-
*/
|
|
853
|
-
this._treeContainerWidth = null;
|
|
854
|
-
this.treeControl = new tree.FlatTreeControl(this.getLevel, this.isExpandable);
|
|
855
|
-
this.contentEditableMethod = contentEditableMethod;
|
|
856
|
-
}
|
|
857
|
-
Object.defineProperty(TreeComponent.prototype, "nodeDisplayEditable", {
|
|
858
|
-
get: function () {
|
|
859
|
-
return !!this.contentEditableMethod;
|
|
860
|
-
},
|
|
861
|
-
enumerable: false,
|
|
862
|
-
configurable: true
|
|
863
|
-
});
|
|
864
|
-
TreeComponent.prototype.ngOnInit = function () {
|
|
865
|
-
var _this = this;
|
|
866
|
-
var _a;
|
|
867
|
-
this.dataSource.setTreeControl(this.treeControl);
|
|
868
|
-
this.dataSource.setToDisplay(this.toDisplay);
|
|
869
|
-
this.dataSource.setGetIcon(this.getIcon);
|
|
870
|
-
this.dataSource.setHasDetails(this.hasDetails);
|
|
871
|
-
this.multiple = (_a = this.dataSource.metadata.selectMultiple) !== null && _a !== void 0 ? _a : this.multiple;
|
|
872
|
-
if (this.dataSource.selected.hasValue()) {
|
|
873
|
-
this.dataSource.selected.selected.forEach(function (node) { return _this.openDetails(node); });
|
|
874
|
-
}
|
|
875
|
-
};
|
|
876
|
-
TreeComponent.prototype.ngAfterContentInit = function () {
|
|
877
|
-
var _this = this;
|
|
878
|
-
this.dataSource.selected.changed
|
|
879
|
-
.pipe(operators.map(function ($event) { return $event.source.selected; }), operators.startWith(this.dataSource.selected.selected), operators.tap(function (selected) { return selected.forEach(function (node) { return _this.openDetails(node); }); }))
|
|
880
|
-
.subscribe();
|
|
881
|
-
};
|
|
882
|
-
TreeComponent.prototype.openDetails = function (node) {
|
|
883
|
-
if (this.content) {
|
|
884
|
-
this.portal = new i13.TemplatePortal(this.content.template, this.viewContainerRef, {
|
|
885
|
-
$implicit: node.item,
|
|
886
|
-
node: node,
|
|
887
|
-
});
|
|
888
|
-
this.cdr.markForCheck();
|
|
889
|
-
}
|
|
890
|
-
this.details.emit(node.item);
|
|
891
|
-
};
|
|
892
|
-
TreeComponent.prototype.onContentEditableChange = function (value, node) {
|
|
893
|
-
var _a;
|
|
894
|
-
return (_a = this.contentEditableMethod) === null || _a === void 0 ? void 0 : _a.call(value, node.item, node);
|
|
895
|
-
};
|
|
896
|
-
TreeComponent.prototype.onMousedown = function () {
|
|
897
|
-
this._moveDivider = true;
|
|
898
|
-
};
|
|
899
|
-
TreeComponent.prototype.onMouseup = function () {
|
|
900
|
-
this._moveDivider = false;
|
|
901
|
-
};
|
|
902
|
-
TreeComponent.prototype.onMousemove = function ($event) {
|
|
903
|
-
if (this._moveDivider) {
|
|
904
|
-
if (!this._treeContainerWidth) {
|
|
905
|
-
this._treeContainerWidth = this.treeContainer.nativeElement.clientWidth;
|
|
906
|
-
}
|
|
907
|
-
this._treeContainerWidth = $event.clientX - 75;
|
|
908
|
-
var width = this._treeContainerWidth + 'px';
|
|
909
|
-
this.renderer.setStyle(this.treeContainer.nativeElement, 'max-width', width);
|
|
910
|
-
this.renderer.setStyle(this.treeContainer.nativeElement, 'min-width', width);
|
|
911
|
-
this.renderer.setStyle(this.treeContainer.nativeElement, 'flex-basis', width);
|
|
912
|
-
}
|
|
913
|
-
};
|
|
914
|
-
return TreeComponent;
|
|
915
|
-
}());
|
|
916
|
-
TreeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponent, deps: [{ token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: RXAP_TREE_CONTENT_EDITABLE_METHOD, optional: true }, { token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
917
|
-
TreeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: TreeComponent, selector: "rxap-tree", inputs: { dataSource: "dataSource", contentEditableMethod: "contentEditableMethod", toDisplay: "toDisplay", getIcon: "getIcon", multiple: "multiple", hasDetails: "hasDetails", hideLeafIcon: "hideLeafIcon" }, outputs: { details: "details" }, host: { listeners: { "mouseup": "onMouseup()", "mousemove": "onMousemove($event)" } }, queries: [{ propertyName: "content", first: true, predicate: TreeContentDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "treeContainer", first: true, predicate: ["treeContainer"], descendants: true, static: true }], ngImport: i0__namespace, template: "<div class=\"container\" fxLayout=\"row\">\n <div #treeContainer class=\"tree-container\" fxFlex=\"nogrow\">\n <mat-progress-bar *ngIf=\"!dataSource || (dataSource.loading$ | async)\" mode=\"indeterminate\"></mat-progress-bar>\n <mat-tree *ngIf=\"dataSource; else loading\" [dataSource]=\"dataSource\" [treeControl]=\"treeControl\" class=\"tree-view\">\n\n <!-- Node without children -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon [fxHide]=\"hideLeafIcon\" fxFlex=\"40px\">subdirectory_arrow_right</mat-icon>\n <mat-icon *ngIf=\"node.icon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template [ngIf]=\"multiple\">\n <mat-checkbox (change)=\"node.toggleSelect()\" [checked]=\"node.selected\" [disabled]=\"!node.hasDetails\" fxFlex=\"nogrow\">{{ node.display }}</mat-checkbox>\n </ng-template>\n <ng-template [ngIf]=\"!multiple\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [disabled]=\"!node.hasDetails\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n </div>\n </mat-tree-node>\n\n <!-- Node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button [attr.aria-label]=\"'toggle ' + node.filename\" mat-icon-button matTreeNodeToggle>\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon *ngIf=\"node.icon; else withoutIcon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template #withoutIcon>\n <div fxFlex=\"0\"></div>\n </ng-template>\n <ng-template [ngIfElse]=\"withoutDetails\" [ngIf]=\"node.hasDetails\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n <ng-template #withoutDetails>\n <span\n (change)=\"onContentEditableChange($event, node)\"\n [disabled]=\"!nodeDisplayEditable\"\n fxFlex=\"nogrow\"\n rxapContenteditable>\n {{ node.display }}\n </span>\n </ng-template>\n <mat-progress-spinner\n *ngIf=\"node.isLoading$ | async\"\n [diameter]=\"16\"\n fxFlex=\"nogrow\"\n fxFlexOffset=\"16px\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n </div>\n </mat-tree-node>\n\n </mat-tree>\n </div>\n\n <div (mousedown)=\"onMousedown()\"\n class=\"divider\"\n fxFlex=\"nogrow\">\n <mat-divider\n [vertical]=\"true\"\n >\n </mat-divider>\n </div>\n\n <div class=\"details\" fxFlex=\"grow\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-template #loading>Load data source</ng-template>\n", styles: [".container{height:100%}.tree-view{background-color:transparent;background-color:initial}.details,.tree-container{max-height:calc(100vh - 64px - 32px);overflow-y:auto}.tree-container{min-width:256px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.divider{cursor:ew-resize;padding:12px}.divider ::ng-deep .mat-divider{height:100%}"], components: [{ type: i1__namespace.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "mode", "value", "bufferValue"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { type: i2__namespace.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { type: i3__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4__namespace.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i5__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i6__namespace.MatProgressSpinner, selector: "mat-progress-spinner", inputs: ["color", "mode", "diameter", "strokeWidth", "value"], exportAs: ["matProgressSpinner"] }, { type: i7__namespace.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], directives: [{ type: i8__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i8__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { type: i2__namespace.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { type: i2__namespace.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { type: i8__namespace.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i10__namespace.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { type: i11__namespace.IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }, { type: i2__namespace.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { type: i12__namespace.ContenteditableDirective, selector: "[rxapContenteditable]", inputs: ["rxapContenteditable", "disabled"], outputs: ["change"] }, { type: i8__namespace.DefaultFlexOffsetDirective, selector: " [fxFlexOffset], [fxFlexOffset.xs], [fxFlexOffset.sm], [fxFlexOffset.md], [fxFlexOffset.lg], [fxFlexOffset.xl], [fxFlexOffset.lt-sm], [fxFlexOffset.lt-md], [fxFlexOffset.lt-lg], [fxFlexOffset.lt-xl], [fxFlexOffset.gt-xs], [fxFlexOffset.gt-sm], [fxFlexOffset.gt-md], [fxFlexOffset.gt-lg]", inputs: ["fxFlexOffset", "fxFlexOffset.xs", "fxFlexOffset.sm", "fxFlexOffset.md", "fxFlexOffset.lg", "fxFlexOffset.xl", "fxFlexOffset.lt-sm", "fxFlexOffset.lt-md", "fxFlexOffset.lt-lg", "fxFlexOffset.lt-xl", "fxFlexOffset.gt-xs", "fxFlexOffset.gt-sm", "fxFlexOffset.gt-md", "fxFlexOffset.gt-lg"] }, { type: i13__namespace.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
918
|
-
__decorate([
|
|
919
|
-
utilities.Required,
|
|
920
|
-
__metadata("design:type", TreeDataSource)
|
|
921
|
-
], TreeComponent.prototype, "dataSource", void 0);
|
|
922
|
-
__decorate([
|
|
923
|
-
utilities.DebounceCall(100),
|
|
924
|
-
__metadata("design:type", Function),
|
|
925
|
-
__metadata("design:paramtypes", [rxjs$1.Node]),
|
|
926
|
-
__metadata("design:returntype", void 0)
|
|
927
|
-
], TreeComponent.prototype, "openDetails", null);
|
|
928
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponent, decorators: [{
|
|
929
|
-
type: i0.Component,
|
|
930
|
-
args: [{
|
|
931
|
-
// tslint:disable-next-line:component-selector
|
|
932
|
-
selector: 'rxap-tree',
|
|
933
|
-
templateUrl: './tree.component.html',
|
|
934
|
-
styleUrls: ['./tree.component.scss'],
|
|
935
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
936
|
-
}]
|
|
937
|
-
}], ctorParameters: function () {
|
|
938
|
-
return [{ type: i0__namespace.ViewContainerRef, decorators: [{
|
|
939
|
-
type: i0.Inject,
|
|
940
|
-
args: [i0.ViewContainerRef]
|
|
941
|
-
}] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
|
|
942
|
-
type: i0.Inject,
|
|
943
|
-
args: [i0.ChangeDetectorRef]
|
|
944
|
-
}] }, { type: undefined, decorators: [{
|
|
945
|
-
type: i0.Optional
|
|
946
|
-
}, {
|
|
947
|
-
type: i0.Inject,
|
|
948
|
-
args: [RXAP_TREE_CONTENT_EDITABLE_METHOD]
|
|
949
|
-
}] }, { type: i0__namespace.Renderer2 }];
|
|
950
|
-
}, propDecorators: { dataSource: [{
|
|
951
|
-
type: i0.Input
|
|
952
|
-
}], contentEditableMethod: [{
|
|
953
|
-
type: i0.Input
|
|
954
|
-
}], toDisplay: [{
|
|
955
|
-
type: i0.Input
|
|
956
|
-
}], getIcon: [{
|
|
957
|
-
type: i0.Input
|
|
958
|
-
}], multiple: [{
|
|
959
|
-
type: i0.Input
|
|
960
|
-
}], hasDetails: [{
|
|
961
|
-
type: i0.Input
|
|
962
|
-
}], content: [{
|
|
963
|
-
type: i0.ContentChild,
|
|
964
|
-
args: [TreeContentDirective, { static: true }]
|
|
965
|
-
}], hideLeafIcon: [{
|
|
966
|
-
type: i0.Input
|
|
967
|
-
}], details: [{
|
|
968
|
-
type: i0.Output
|
|
969
|
-
}], treeContainer: [{
|
|
970
|
-
type: i0.ViewChild,
|
|
971
|
-
args: ['treeContainer', { static: true }]
|
|
972
|
-
}], openDetails: [], onMouseup: [{
|
|
973
|
-
type: i0.HostListener,
|
|
974
|
-
args: ['mouseup']
|
|
975
|
-
}], onMousemove: [{
|
|
976
|
-
type: i0.HostListener,
|
|
977
|
-
args: ['mousemove', ['$event']]
|
|
978
|
-
}] } });
|
|
979
|
-
|
|
980
|
-
var TreeComponentModule = /** @class */ (function () {
|
|
981
|
-
function TreeComponentModule() {
|
|
982
|
-
}
|
|
983
|
-
return TreeComponentModule;
|
|
984
|
-
}());
|
|
985
|
-
TreeComponentModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponentModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
986
|
-
TreeComponentModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponentModule, declarations: [TreeComponent, TreeContentDirective], imports: [i9.CommonModule,
|
|
987
|
-
i2.MatTreeModule,
|
|
988
|
-
i5.MatButtonModule,
|
|
989
|
-
i3.MatIconModule,
|
|
990
|
-
flexLayout.FlexLayoutModule,
|
|
991
|
-
i7.MatDividerModule,
|
|
992
|
-
i6.MatProgressSpinnerModule,
|
|
993
|
-
i13.PortalModule,
|
|
994
|
-
i12.ContenteditableDirectiveModule,
|
|
995
|
-
i11.IconDirectiveModule,
|
|
996
|
-
i4.MatCheckboxModule,
|
|
997
|
-
i1.MatProgressBarModule], exports: [TreeComponent, TreeContentDirective] });
|
|
998
|
-
TreeComponentModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponentModule, imports: [[
|
|
999
|
-
i9.CommonModule,
|
|
1000
|
-
i2.MatTreeModule,
|
|
1001
|
-
i5.MatButtonModule,
|
|
1002
|
-
i3.MatIconModule,
|
|
1003
|
-
flexLayout.FlexLayoutModule,
|
|
1004
|
-
i7.MatDividerModule,
|
|
1005
|
-
i6.MatProgressSpinnerModule,
|
|
1006
|
-
i13.PortalModule,
|
|
1007
|
-
i12.ContenteditableDirectiveModule,
|
|
1008
|
-
i11.IconDirectiveModule,
|
|
1009
|
-
i4.MatCheckboxModule,
|
|
1010
|
-
i1.MatProgressBarModule
|
|
1011
|
-
]] });
|
|
1012
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponentModule, decorators: [{
|
|
1013
|
-
type: i0.NgModule,
|
|
1014
|
-
args: [{
|
|
1015
|
-
imports: [
|
|
1016
|
-
i9.CommonModule,
|
|
1017
|
-
i2.MatTreeModule,
|
|
1018
|
-
i5.MatButtonModule,
|
|
1019
|
-
i3.MatIconModule,
|
|
1020
|
-
flexLayout.FlexLayoutModule,
|
|
1021
|
-
i7.MatDividerModule,
|
|
1022
|
-
i6.MatProgressSpinnerModule,
|
|
1023
|
-
i13.PortalModule,
|
|
1024
|
-
i12.ContenteditableDirectiveModule,
|
|
1025
|
-
i11.IconDirectiveModule,
|
|
1026
|
-
i4.MatCheckboxModule,
|
|
1027
|
-
i1.MatProgressBarModule
|
|
1028
|
-
],
|
|
1029
|
-
declarations: [TreeComponent, TreeContentDirective],
|
|
1030
|
-
exports: [TreeComponent, TreeContentDirective],
|
|
1031
|
-
entryComponents: [TreeComponent]
|
|
1032
|
-
}]
|
|
1033
|
-
}] });
|
|
1034
|
-
|
|
1035
|
-
/**
|
|
1036
|
-
* Generated bundle index. Do not edit.
|
|
1037
|
-
*/
|
|
1038
|
-
|
|
1039
|
-
exports.RXAP_TREE_CONTENT_EDITABLE_METHOD = RXAP_TREE_CONTENT_EDITABLE_METHOD;
|
|
1040
|
-
exports.RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD = RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD;
|
|
1041
|
-
exports.RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD = RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD;
|
|
1042
|
-
exports.TreeComponent = TreeComponent;
|
|
1043
|
-
exports.TreeComponentModule = TreeComponentModule;
|
|
1044
|
-
exports.TreeContentDirective = TreeContentDirective;
|
|
1045
|
-
exports.TreeDataSource = TreeDataSource;
|
|
1046
|
-
exports.isSelectionChange = isSelectionChange;
|
|
1047
|
-
|
|
1048
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1049
|
-
|
|
1050
|
-
})));
|
|
1051
|
-
//# sourceMappingURL=rxap-tree.umd.js.map
|