@progress/kendo-angular-treeview 23.3.1-develop.1 → 23.3.1-develop.3

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.
@@ -15,4 +15,5 @@ export declare class HierarchyEditingService implements EditService {
15
15
  remove({ sourceItem, sourceTree, destinationTree }: TreeItemAddRemoveArgs): void;
16
16
  private getParentNodes;
17
17
  private childrenFor;
18
+ private rebindData;
18
19
  }
@@ -28,8 +28,8 @@ const packageMetadata = {
28
28
  productName: 'Kendo UI for Angular',
29
29
  productCode: 'KENDOUIANGULAR',
30
30
  productCodes: ['KENDOUIANGULAR'],
31
- publishDate: 1775550033,
32
- version: '23.3.1-develop.1',
31
+ publishDate: 1775659009,
32
+ version: '23.3.1-develop.3',
33
33
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
34
34
  };
35
35
 
@@ -5188,6 +5188,7 @@ class FilteringBase {
5188
5188
  * @hidden
5189
5189
  */
5190
5190
  handleFilterChange(term) {
5191
+ this.currentFilterTerm = term || '';
5191
5192
  if (!this.filterData) {
5192
5193
  return;
5193
5194
  }
@@ -5359,7 +5360,12 @@ class FlatDataBindingDirective extends FilteringBase {
5359
5360
  const prop = getter(this.parentIdField);
5360
5361
  this.component.nodes = this.originalData.filter(compose(isBlank, prop));
5361
5362
  this.filterData = mapToTree(this.component.nodes, this.originalData, this.parentIdField, this.idField);
5362
- this.updateVisibleNodes(this.filterData);
5363
+ if (this.currentFilterTerm) {
5364
+ this.handleFilterChange(this.currentFilterTerm);
5365
+ }
5366
+ else {
5367
+ this.updateVisibleNodes(this.filterData);
5368
+ }
5363
5369
  }
5364
5370
  else {
5365
5371
  this.component.nodes = this.originalData.slice(0);
@@ -5409,6 +5415,7 @@ class HierarchyEditingService {
5409
5415
  destinationChildren.splice(targetIndex, 0, clonedSourceDataItem);
5410
5416
  setter(this.hierarchyBinding.childrenField)(getDataItem(destinationItem), destinationChildren);
5411
5417
  this.movedItemNewIndex = buildTreeIndex(destinationItem.item.index, targetIndex);
5418
+ this.rebindData();
5412
5419
  }
5413
5420
  else {
5414
5421
  const destinationParentNodes = this.getParentNodes(destinationItem, destinationTree);
@@ -5417,6 +5424,7 @@ class HierarchyEditingService {
5417
5424
  destinationParentNodes.splice(targetIndex, 0, clonedSourceDataItem);
5418
5425
  const parentIndex = destinationItem.parent ? destinationItem.parent.item.index : null;
5419
5426
  this.movedItemNewIndex = buildTreeIndex(parentIndex, targetIndex);
5427
+ this.rebindData();
5420
5428
  }
5421
5429
  // increment the parent page size => an item is moved into it
5422
5430
  const updatedParent = dropPosition === DropPosition.Over ? getDataItem(destinationItem) : getDataItem(destinationItem.parent);
@@ -5439,6 +5447,7 @@ class HierarchyEditingService {
5439
5447
  const sourceParentNodes = this.getParentNodes(sourceItem, sourceTree);
5440
5448
  const sourceItemIndex = sourceParentNodes.indexOf(getDataItem(sourceItem));
5441
5449
  sourceParentNodes.splice(sourceItemIndex, 1);
5450
+ this.rebindData();
5442
5451
  // emit collapse for the parent node if its last child node was spliced
5443
5452
  collapseEmptyParent(sourceItem.parent, sourceParentNodes, sourceTree);
5444
5453
  // decrement source item parent page size => an item has been removed from it
@@ -5464,6 +5473,9 @@ class HierarchyEditingService {
5464
5473
  childrenFor(dataItem) {
5465
5474
  return getter(this.hierarchyBinding.childrenField)(dataItem) || [];
5466
5475
  }
5476
+ rebindData() {
5477
+ this.hierarchyBinding.updateNodes(this.hierarchyBinding.originalData);
5478
+ }
5467
5479
  }
5468
5480
 
5469
5481
  const indexBuilder = new IndexBuilderService();
@@ -5543,14 +5555,16 @@ class HierarchyBindingDirective extends FilteringBase {
5543
5555
  * @hidden
5544
5556
  */
5545
5557
  loadOnDemand = true;
5546
- _childrenField;
5558
+ /**
5559
+ * @hidden
5560
+ */
5547
5561
  originalData = [];
5562
+ _childrenField;
5548
5563
  constructor(component, dragAndDropDirective) {
5549
5564
  super(component);
5550
5565
  this.component = component;
5551
5566
  this.dragAndDropDirective = dragAndDropDirective;
5552
- const shouldFilter = !isPresent(this.dragAndDropDirective);
5553
- this.component.isVisible = shouldFilter ? (node) => this.visibleNodes.has(node) : isVisible;
5567
+ this.component.isVisible = (node) => !this.currentFilterTerm || this.visibleNodes.has(node);
5554
5568
  }
5555
5569
  ngOnInit() {
5556
5570
  if (isPresent(this.childrenField)) {
@@ -5588,7 +5602,12 @@ class HierarchyBindingDirective extends FilteringBase {
5588
5602
  updateNodes(values) {
5589
5603
  this.originalData = values || [];
5590
5604
  this.filterData = mapToWrappers(values, this.childrenField) || [];
5591
- this.updateVisibleNodes(this.filterData);
5605
+ if (this.currentFilterTerm) {
5606
+ this.handleFilterChange(this.currentFilterTerm);
5607
+ }
5608
+ else {
5609
+ this.updateVisibleNodes(this.filterData);
5610
+ }
5592
5611
  }
5593
5612
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: HierarchyBindingDirective, deps: [{ token: DataBoundComponent }, { token: DragAndDropDirective, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
5594
5613
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.20", type: HierarchyBindingDirective, isStandalone: true, selector: "[kendoTreeViewHierarchyBinding]", inputs: { childrenField: "childrenField", nodes: "nodes", isVisible: "isVisible", loadOnDemand: "loadOnDemand" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
@@ -16,7 +16,7 @@ export declare abstract class FilteringBase {
16
16
  */
17
17
  protected filterData: TreeItemFilterState[];
18
18
  protected visibleNodes: Set<any>;
19
- private currentFilterTerm;
19
+ protected currentFilterTerm: string;
20
20
  /**
21
21
  * The settings which are applied when performing a filter on the component's data.
22
22
  */
@@ -53,8 +53,11 @@ export declare class HierarchyBindingDirective extends FilteringBase implements
53
53
  * @hidden
54
54
  */
55
55
  loadOnDemand: boolean;
56
+ /**
57
+ * @hidden
58
+ */
59
+ originalData: any[];
56
60
  private _childrenField;
57
- private originalData;
58
61
  constructor(component: DataBoundComponent, dragAndDropDirective?: DragAndDropDirective);
59
62
  ngOnInit(): void;
60
63
  ngOnChanges(changes: SimpleChanges): void;
@@ -7,7 +7,7 @@ export const packageMetadata = {
7
7
  "productCodes": [
8
8
  "KENDOUIANGULAR"
9
9
  ],
10
- "publishDate": 1775550033,
11
- "version": "23.3.1-develop.1",
10
+ "publishDate": 1775659009,
11
+ "version": "23.3.1-develop.3",
12
12
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
13
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-treeview",
3
- "version": "23.3.1-develop.1",
3
+ "version": "23.3.1-develop.3",
4
4
  "description": "Kendo UI TreeView for Angular",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -19,7 +19,7 @@
19
19
  "package": {
20
20
  "productName": "Kendo UI for Angular",
21
21
  "productCode": "KENDOUIANGULAR",
22
- "publishDate": 1775550033,
22
+ "publishDate": 1775659009,
23
23
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
24
24
  }
25
25
  },
@@ -29,15 +29,15 @@
29
29
  "@angular/core": "19 - 21",
30
30
  "@angular/platform-browser": "19 - 21",
31
31
  "@progress/kendo-licensing": "^1.10.0",
32
- "@progress/kendo-angular-common": "23.3.1-develop.1",
33
- "@progress/kendo-angular-inputs": "23.3.1-develop.1",
34
- "@progress/kendo-angular-icons": "23.3.1-develop.1",
35
- "@progress/kendo-angular-l10n": "23.3.1-develop.1",
32
+ "@progress/kendo-angular-common": "23.3.1-develop.3",
33
+ "@progress/kendo-angular-inputs": "23.3.1-develop.3",
34
+ "@progress/kendo-angular-icons": "23.3.1-develop.3",
35
+ "@progress/kendo-angular-l10n": "23.3.1-develop.3",
36
36
  "rxjs": "^6.5.3 || ^7.0.0"
37
37
  },
38
38
  "dependencies": {
39
39
  "tslib": "^2.3.1",
40
- "@progress/kendo-angular-schematics": "23.3.1-develop.1",
40
+ "@progress/kendo-angular-schematics": "23.3.1-develop.3",
41
41
  "@progress/kendo-common": "^1.0.1",
42
42
  "@progress/kendo-draggable": "^3.0.2"
43
43
  },
@@ -9,10 +9,10 @@ const schematics_1 = require("@angular-devkit/schematics");
9
9
  function default_1(options) {
10
10
  const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'TreeViewModule', package: 'treeview', peerDependencies: {
11
11
  // Peers of kendo-angular-inputs
12
- '@progress/kendo-angular-buttons': '23.3.1-develop.1',
13
- '@progress/kendo-angular-dialog': '23.3.1-develop.1',
14
- '@progress/kendo-angular-intl': '23.3.1-develop.1',
15
- '@progress/kendo-angular-popup': '23.3.1-develop.1',
12
+ '@progress/kendo-angular-buttons': '23.3.1-develop.3',
13
+ '@progress/kendo-angular-dialog': '23.3.1-develop.3',
14
+ '@progress/kendo-angular-intl': '23.3.1-develop.3',
15
+ '@progress/kendo-angular-popup': '23.3.1-develop.3',
16
16
  '@progress/kendo-drawing': '^1.9.3',
17
17
  // Peer dependency of icons
18
18
  '@progress/kendo-svg-icons': '^4.0.0'