Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(database: FileDatabase) {
this.treeFlattener = new MatTreeFlattener(this.transformer, this.getLevel,
this.isExpandable, this.getChildren);
// For flat tree
this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);
this.dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
// For nested tree
this.nestedTreeControl = new NestedTreeControl(this.getChildren);
this.nestedDataSource = new MatTreeNestedDataSource();
database.dataChange.subscribe(data => {
this.dataSource.data = data;
this.nestedDataSource.data = data;
});
}
},
{
value: 'self-group',
label: '本用户组的数据'
},
{
value: 'self-group-subordinate',
label: '本用户组及下属用户组的数据'
},
{
value: 'all',
label: '全部数据'
}
];
this.treeFlattener = new MatTreeFlattener(
this.transformer,
this.getLevel,
this.isExpandable,
this.getChildren
);
this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);
this.dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
database.dataChange.subscribe(data => {
this.dataSource.data = data;
});
}
constructor(private _database: LoadmoreDatabase) {
this.treeFlattener = new MatTreeFlattener(this.transformer, this.getLevel,
this.isExpandable, this.getChildren);
this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);
this.dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
_database.dataChange.subscribe(data => {
this.dataSource.data = data;
});
_database.initialize();
}
constructor(private _database: ChecklistDatabase) {
this.treeFlattener = new MatTreeFlattener(this.transformer, this.getLevel,
this.isExpandable, this.getChildren);
this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);
this.dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
_database.dataChange.subscribe(data => {
this.dataSource.data = data;
});
}
combo = null;
}
const e: ExtendedKeyboardEvent = event;
e.returnValue = false;
return e;
}));
try {
const storedExpandedFolderIds = JSON.parse(localStorage.getItem('rmm7expandedfolderids'));
if (storedExpandedFolderIds && storedExpandedFolderIds.length > 0) {
this.storedexpandedFolderIds = storedExpandedFolderIds;
}
} catch (e) {}
this.folders = this.messagelistservice.folderCountSubject;
this.treeControl = new FlatTreeControl(this._getLevel, this._isExpandable);
this.treeFlattener = new MatTreeFlattener(
(node: FolderNode, level: number): FolderCountEntry => {
return node.data;
},
this._getLevel,
this._isExpandable,
(node: FolderNode) => node.children
);
this.dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
const foldertreedataobservable = this.folders
.pipe(
map(folders => folders.filter(f => f.folderPath.indexOf('Drafts') !== 0)),
map((folders) => {
const treedata: FolderNode[] = [];
let currentFolderLevel = 0;
constructor(private database: Database) {
this.treeFlattener = new MatTreeFlattener(this.transformer, this._getLevel,
this._isExpandable, this._getChildren);
this.treeControl = new FlatTreeControl(this._getLevel, this._isExpandable);
this.dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
database.dataChange.subscribe(data => this.dataSource.data = data);
}
constructor(private _database: LoadmoreDatabase) {
this.treeFlattener = new MatTreeFlattener(this.transformer, this.getLevel,
this.isExpandable, this.getChildren);
this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);
this.dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
_database.dataChange.subscribe(data => {
this.dataSource.data = data;
});
_database.initialize();
}
constructor(private dataSharingService: DataSharingService) {
this.treeFlattener = new MatTreeFlattener(this.transformer, this.getLevel,
this.isExpandable, this.getChildren);
this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);
this.dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
this.course = this.dataSharingService.getDataForKey('course');
this.dataSource.data = this.buildFileTree(this.preBuildJSON(), 0);
}
if (!!this.selectedEntities && this.selectedEntities.length > 0 && level > 0) {
const found = _.find(this.selectedEntities, entity => entity.id === node.parentId)
if (!!found) {
selectableNode.checked = found == selectableNode.id
if (selectableNode.checked) {
this.checkEntitieslistSelection.select(selectableNode)
}
}
}
return selectableNode;
}
treeControl = new FlatTreeControl(
node => node.level, node => node.expandable);
treeFlattener = new MatTreeFlattener(
this.transformer, node => node.level, node => node.expandable, (node: SelectableBackupNode) => node.subShortModels);
dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
hasChild = (_: number, node: BackupNode) => node.expandable || node.level === 0;
hasSelected(node: BackupNode) {
return this.checkEntitieslistSelection.isSelected(node)
}
onTreeChange($event, node: BackupNode) {
this.checkEntitieslistSelection.toggle(node)
const found = this.selectedEntities.find(a => a.id === node.id)
const canRemove = !!found
if (canRemove) {
this.selectedEntities = ArrayUtils.removeOneItem(this.selectedEntities, a => a.id === node.id)
this.selectedEntities$.next(this.selectedEntities)
}