@progress/kendo-angular-treeview 14.1.1-develop.1 → 14.1.1-develop.2
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 +2 -0
- package/esm2020/localization/custom-messages.component.mjs +41 -0
- package/esm2020/localization/localized-messages.directive.mjs +37 -0
- package/esm2020/localization/messages.mjs +23 -0
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/shared.module.mjs +11 -3
- package/esm2020/treeview-group.component.mjs +14 -2
- package/esm2020/treeview.component.mjs +13 -2
- package/esm2020/treeview.module.mjs +8 -2
- package/fesm2015/progress-kendo-angular-treeview.mjs +123 -12
- package/fesm2020/progress-kendo-angular-treeview.mjs +123 -12
- package/index.d.ts +2 -0
- package/localization/custom-messages.component.d.ts +17 -0
- package/localization/localized-messages.directive.d.ts +16 -0
- package/localization/messages.d.ts +17 -0
- package/package.json +6 -6
- package/schematics/ngAdd/index.js +4 -4
- package/shared.module.d.ts +7 -5
- package/treeview-group.component.d.ts +7 -1
- package/treeview.module.d.ts +3 -1
package/esm2020/index.mjs
CHANGED
|
@@ -26,3 +26,5 @@ export { DragClueService } from './drag-and-drop/drag-clue/drag-clue.service';
|
|
|
26
26
|
export { DropHintService } from './drag-and-drop/drop-hint/drop-hint.service';
|
|
27
27
|
export { LoadMoreDirective } from './load-more/load-more.directive';
|
|
28
28
|
export { LoadMoreButtonTemplateDirective } from './load-more/load-more-button-template.directive';
|
|
29
|
+
export { CustomMessagesComponent } from './localization/custom-messages.component';
|
|
30
|
+
export { LocalizedMessagesDirective } from "./localization/localized-messages.directive";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Component, forwardRef } from "@angular/core";
|
|
6
|
+
import { TreeViewMessages } from "./messages";
|
|
7
|
+
import { LocalizationService } from "@progress/kendo-angular-l10n";
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
|
+
/**
|
|
11
|
+
* Custom component messages override default component messages
|
|
12
|
+
*/
|
|
13
|
+
export class CustomMessagesComponent extends TreeViewMessages {
|
|
14
|
+
constructor(service) {
|
|
15
|
+
super();
|
|
16
|
+
this.service = service;
|
|
17
|
+
}
|
|
18
|
+
get override() {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
23
|
+
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CustomMessagesComponent, selector: "kendo-treeview-messages", providers: [
|
|
24
|
+
{
|
|
25
|
+
provide: TreeViewMessages,
|
|
26
|
+
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
27
|
+
}
|
|
28
|
+
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CustomMessagesComponent, decorators: [{
|
|
30
|
+
type: Component,
|
|
31
|
+
args: [{
|
|
32
|
+
providers: [
|
|
33
|
+
{
|
|
34
|
+
provide: TreeViewMessages,
|
|
35
|
+
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
selector: 'kendo-treeview-messages',
|
|
39
|
+
template: ``
|
|
40
|
+
}]
|
|
41
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive, forwardRef } from "@angular/core";
|
|
6
|
+
import { TreeViewMessages } from "./messages";
|
|
7
|
+
import { LocalizationService } from "@progress/kendo-angular-l10n";
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export class LocalizedMessagesDirective extends TreeViewMessages {
|
|
14
|
+
constructor(service) {
|
|
15
|
+
super();
|
|
16
|
+
this.service = service;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
20
|
+
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: LocalizedMessagesDirective, selector: "[kendoTreeViewLocalizedMessages]", providers: [
|
|
21
|
+
{
|
|
22
|
+
provide: TreeViewMessages,
|
|
23
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
24
|
+
}
|
|
25
|
+
], usesInheritance: true, ngImport: i0 });
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
27
|
+
type: Directive,
|
|
28
|
+
args: [{
|
|
29
|
+
providers: [
|
|
30
|
+
{
|
|
31
|
+
provide: TreeViewMessages,
|
|
32
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
selector: '[kendoTreeViewLocalizedMessages]'
|
|
36
|
+
}]
|
|
37
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive, Input } from "@angular/core";
|
|
6
|
+
import { ComponentMessages } from "@progress/kendo-angular-l10n";
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export class TreeViewMessages extends ComponentMessages {
|
|
12
|
+
}
|
|
13
|
+
TreeViewMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
+
TreeViewMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: TreeViewMessages, selector: "kendo-treeview-messages-base", inputs: { loadMore: "loadMore" }, usesInheritance: true, ngImport: i0 });
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewMessages, decorators: [{
|
|
16
|
+
type: Directive,
|
|
17
|
+
args: [{
|
|
18
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
19
|
+
selector: 'kendo-treeview-messages-base'
|
|
20
|
+
}]
|
|
21
|
+
}], propDecorators: { loadMore: [{
|
|
22
|
+
type: Input
|
|
23
|
+
}] } });
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-treeview',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
13
|
-
version: '14.1.1-develop.
|
|
12
|
+
publishDate: 1699875064,
|
|
13
|
+
version: '14.1.1-develop.2',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
|
@@ -27,6 +27,8 @@ import { LoadMoreDirective } from './load-more/load-more.directive';
|
|
|
27
27
|
import { LoadMoreButtonTemplateDirective } from './load-more/load-more-button-template.directive';
|
|
28
28
|
import { InputsModule } from '@progress/kendo-angular-inputs';
|
|
29
29
|
import { IconsModule } from '@progress/kendo-angular-icons';
|
|
30
|
+
import { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
31
|
+
import { CustomMessagesComponent } from './localization/custom-messages.component';
|
|
30
32
|
import * as i0 from "@angular/core";
|
|
31
33
|
const COMPONENT_DIRECTIVES = [
|
|
32
34
|
TreeViewComponent,
|
|
@@ -48,7 +50,9 @@ const COMPONENT_DIRECTIVES = [
|
|
|
48
50
|
DropHintComponent,
|
|
49
51
|
DragAndDropEditingDirective,
|
|
50
52
|
LoadMoreDirective,
|
|
51
|
-
LoadMoreButtonTemplateDirective
|
|
53
|
+
LoadMoreButtonTemplateDirective,
|
|
54
|
+
LocalizedMessagesDirective,
|
|
55
|
+
CustomMessagesComponent,
|
|
52
56
|
];
|
|
53
57
|
/**
|
|
54
58
|
* @hidden
|
|
@@ -75,7 +79,9 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
75
79
|
DropHintComponent,
|
|
76
80
|
DragAndDropEditingDirective,
|
|
77
81
|
LoadMoreDirective,
|
|
78
|
-
LoadMoreButtonTemplateDirective
|
|
82
|
+
LoadMoreButtonTemplateDirective,
|
|
83
|
+
LocalizedMessagesDirective,
|
|
84
|
+
CustomMessagesComponent], imports: [CommonModule,
|
|
79
85
|
CheckBoxModule,
|
|
80
86
|
InputsModule,
|
|
81
87
|
IconsModule], exports: [TreeViewComponent,
|
|
@@ -97,7 +103,9 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
97
103
|
DropHintComponent,
|
|
98
104
|
DragAndDropEditingDirective,
|
|
99
105
|
LoadMoreDirective,
|
|
100
|
-
LoadMoreButtonTemplateDirective
|
|
106
|
+
LoadMoreButtonTemplateDirective,
|
|
107
|
+
LocalizedMessagesDirective,
|
|
108
|
+
CustomMessagesComponent] });
|
|
101
109
|
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SharedModule, imports: [[
|
|
102
110
|
CommonModule,
|
|
103
111
|
CheckBoxModule,
|
|
@@ -70,6 +70,7 @@ export class TreeViewGroupComponent {
|
|
|
70
70
|
this.isItemExpandable = (node, index) => this.expandDisabledNodes || !this.isItemDisabled(node, index);
|
|
71
71
|
this._data = [];
|
|
72
72
|
this.singleRecordSubscriptions = new Subscription();
|
|
73
|
+
this.localizationSubscriptions = new Subscription();
|
|
73
74
|
this.isChecked = () => 'none';
|
|
74
75
|
this.isDisabled = () => false;
|
|
75
76
|
this.hasCheckbox = () => true;
|
|
@@ -159,6 +160,7 @@ export class TreeViewGroupComponent {
|
|
|
159
160
|
this.loadMoreNodesSubscription.unsubscribe();
|
|
160
161
|
}
|
|
161
162
|
this.singleRecordSubscriptions.unsubscribe();
|
|
163
|
+
this.localizationSubscriptions.unsubscribe();
|
|
162
164
|
}
|
|
163
165
|
ngOnInit() {
|
|
164
166
|
this.subscribeToNodesChange();
|
|
@@ -168,11 +170,21 @@ export class TreeViewGroupComponent {
|
|
|
168
170
|
this.singleRecordSubscriptions.add(this.navigationService.loadMore
|
|
169
171
|
.pipe(filter(index => index === this.loadMoreButtonIndex))
|
|
170
172
|
.subscribe(this.loadMoreNodes.bind(this)));
|
|
173
|
+
this.localizationSubscriptions.add(this.localization.changes.subscribe(this.l10nChange.bind(this)));
|
|
171
174
|
}
|
|
172
175
|
ngOnChanges(changes) {
|
|
173
176
|
if (changes.parentIndex && this.loadOnDemand) {
|
|
174
177
|
this.setNodeChildren(this.mapToTreeItem(this.data));
|
|
175
178
|
}
|
|
179
|
+
if (this.localization.get('loadMore')) {
|
|
180
|
+
this.loadMoreTitle = this.localization.get('loadMore');
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
l10nChange() {
|
|
184
|
+
if (this.localization.get('loadMore')) {
|
|
185
|
+
this.loadMoreTitle = this.localization.get('loadMore');
|
|
186
|
+
}
|
|
187
|
+
this.changeDetectorRef.markForCheck();
|
|
176
188
|
}
|
|
177
189
|
fetchChildren(node, index) {
|
|
178
190
|
return this.children(node)
|
|
@@ -442,7 +454,7 @@ TreeViewGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
442
454
|
>
|
|
443
455
|
</ng-template>
|
|
444
456
|
<ng-container *ngIf="!loadMoreButtonTemplateRef">
|
|
445
|
-
|
|
457
|
+
{{ loadMoreTitle }}
|
|
446
458
|
</ng-container>
|
|
447
459
|
</span>
|
|
448
460
|
</span>
|
|
@@ -622,7 +634,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
622
634
|
>
|
|
623
635
|
</ng-template>
|
|
624
636
|
<ng-container *ngIf="!loadMoreButtonTemplateRef">
|
|
625
|
-
|
|
637
|
+
{{ loadMoreTitle }}
|
|
626
638
|
</ng-container>
|
|
627
639
|
</span>
|
|
628
640
|
</span>
|
|
@@ -35,7 +35,8 @@ import * as i7 from "@progress/kendo-angular-l10n";
|
|
|
35
35
|
import * as i8 from "@progress/kendo-angular-inputs";
|
|
36
36
|
import * as i9 from "@progress/kendo-angular-icons";
|
|
37
37
|
import * as i10 from "./treeview-group.component";
|
|
38
|
-
import * as i11 from "
|
|
38
|
+
import * as i11 from "./localization/localized-messages.directive";
|
|
39
|
+
import * as i12 from "@angular/common";
|
|
39
40
|
let nextId = 0;
|
|
40
41
|
const LOAD_MORE_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button/';
|
|
41
42
|
const providers = [
|
|
@@ -640,6 +641,11 @@ export class TreeViewComponent {
|
|
|
640
641
|
}
|
|
641
642
|
TreeViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.ExpandStateService }, { token: i2.NavigationService }, { token: i3.NodeChildrenService }, { token: i4.SelectionService }, { token: i5.TreeViewLookupService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i6.DataChangeNotificationService }, { token: i7.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
642
643
|
TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TreeViewComponent, selector: "kendo-treeview", inputs: { filterInputPlaceholder: "filterInputPlaceholder", expandDisabledNodes: "expandDisabledNodes", animate: "animate", nodeTemplateRef: ["nodeTemplate", "nodeTemplateRef"], loadMoreButtonTemplateRef: ["loadMoreButtonTemplate", "loadMoreButtonTemplateRef"], trackBy: "trackBy", nodes: "nodes", textField: "textField", hasChildren: "hasChildren", isChecked: "isChecked", isDisabled: "isDisabled", hasCheckbox: "hasCheckbox", isExpanded: "isExpanded", isSelected: "isSelected", isVisible: "isVisible", navigable: "navigable", children: "children", loadOnDemand: "loadOnDemand", filterable: "filterable", filter: "filter", size: "size", disableParentNodesOnly: "disableParentNodesOnly" }, outputs: { childrenLoaded: "childrenLoaded", onBlur: "blur", onFocus: "focus", expand: "expand", collapse: "collapse", nodeDragStart: "nodeDragStart", nodeDrag: "nodeDrag", filterStateChange: "filterStateChange", nodeDrop: "nodeDrop", nodeDragEnd: "nodeDragEnd", addItem: "addItem", removeItem: "removeItem", checkedChange: "checkedChange", selectionChange: "selectionChange", filterChange: "filterChange", nodeClick: "nodeClick", nodeDblClick: "nodeDblClick" }, host: { properties: { "class.k-treeview": "this.classNames", "attr.dir": "this.direction", "@.disabled": "this.animate" } }, providers: providers, queries: [{ propertyName: "nodeTemplateQuery", first: true, predicate: NodeTemplateDirective, descendants: true }, { propertyName: "loadMoreButtonTemplateQuery", first: true, predicate: LoadMoreButtonTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "assetsContainer", first: true, predicate: ["assetsContainer"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "searchbox", first: true, predicate: ["searchbox"], descendants: true }], exportAs: ["kendoTreeView"], usesOnChanges: true, ngImport: i0, template: `
|
|
644
|
+
<ng-container kendoTreeViewLocalizedMessages
|
|
645
|
+
i18n-loadMore="kendo.treeview.loadMore|The title of the Load More button"
|
|
646
|
+
loadMore="Load more..."
|
|
647
|
+
>
|
|
648
|
+
</ng-container>
|
|
643
649
|
<span
|
|
644
650
|
class="k-treeview-filter"
|
|
645
651
|
*ngIf="filterable"
|
|
@@ -691,7 +697,7 @@ TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
691
697
|
>
|
|
692
698
|
</ul>
|
|
693
699
|
<ng-container #assetsContainer></ng-container>
|
|
694
|
-
`, isInline: true, components: [{ type: i8.TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { type: i9.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i10.TreeViewGroupComponent, selector: "[kendoTreeViewGroup]", inputs: ["checkboxes", "expandIcons", "disabled", "selectable", "touchActions", "disableParentNodesOnly", "loadOnDemand", "trackBy", "nodes", "textField", "parentDataItem", "parentIndex", "nodeTemplateRef", "loadMoreButtonTemplateRef", "loadMoreService", "size", "expandDisabledNodes", "isChecked", "isDisabled", "hasCheckbox", "isExpanded", "isVisible", "isSelected", "children", "hasChildren"] }], directives: [{ type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.TextBoxPrefixTemplateDirective, selector: "[kendoTextBoxPrefixTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.Default });
|
|
700
|
+
`, isInline: true, components: [{ type: i8.TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { type: i9.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i10.TreeViewGroupComponent, selector: "[kendoTreeViewGroup]", inputs: ["checkboxes", "expandIcons", "disabled", "selectable", "touchActions", "disableParentNodesOnly", "loadOnDemand", "trackBy", "nodes", "textField", "parentDataItem", "parentIndex", "nodeTemplateRef", "loadMoreButtonTemplateRef", "loadMoreService", "size", "expandDisabledNodes", "isChecked", "isDisabled", "hasCheckbox", "isExpanded", "isVisible", "isSelected", "children", "hasChildren"] }], directives: [{ type: i11.LocalizedMessagesDirective, selector: "[kendoTreeViewLocalizedMessages]" }, { type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.TextBoxPrefixTemplateDirective, selector: "[kendoTextBoxPrefixTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.Default });
|
|
695
701
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewComponent, decorators: [{
|
|
696
702
|
type: Component,
|
|
697
703
|
args: [{
|
|
@@ -700,6 +706,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
700
706
|
providers: providers,
|
|
701
707
|
selector: 'kendo-treeview',
|
|
702
708
|
template: `
|
|
709
|
+
<ng-container kendoTreeViewLocalizedMessages
|
|
710
|
+
i18n-loadMore="kendo.treeview.loadMore|The title of the Load More button"
|
|
711
|
+
loadMore="Load more..."
|
|
712
|
+
>
|
|
713
|
+
</ng-container>
|
|
703
714
|
<span
|
|
704
715
|
class="k-treeview-filter"
|
|
705
716
|
*ngIf="filterable"
|
|
@@ -18,6 +18,8 @@ import { DropHintTemplateDirective } from './drag-and-drop/drop-hint/drop-hint-t
|
|
|
18
18
|
import { DragAndDropEditingDirective } from './drag-and-drop/drag-and-drop-editing.directive';
|
|
19
19
|
import { LoadMoreDirective } from './load-more/load-more.directive';
|
|
20
20
|
import { LoadMoreButtonTemplateDirective } from './load-more/load-more-button-template.directive';
|
|
21
|
+
import { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
22
|
+
import { CustomMessagesComponent } from './localization/custom-messages.component';
|
|
21
23
|
import * as i0 from "@angular/core";
|
|
22
24
|
const EXPORTS = [
|
|
23
25
|
TreeViewComponent,
|
|
@@ -33,7 +35,9 @@ const EXPORTS = [
|
|
|
33
35
|
DropHintTemplateDirective,
|
|
34
36
|
DragAndDropEditingDirective,
|
|
35
37
|
LoadMoreDirective,
|
|
36
|
-
LoadMoreButtonTemplateDirective
|
|
38
|
+
LoadMoreButtonTemplateDirective,
|
|
39
|
+
LocalizedMessagesDirective,
|
|
40
|
+
CustomMessagesComponent,
|
|
37
41
|
];
|
|
38
42
|
/**
|
|
39
43
|
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the TreeView component.
|
|
@@ -54,7 +58,9 @@ TreeViewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
54
58
|
DropHintTemplateDirective,
|
|
55
59
|
DragAndDropEditingDirective,
|
|
56
60
|
LoadMoreDirective,
|
|
57
|
-
LoadMoreButtonTemplateDirective
|
|
61
|
+
LoadMoreButtonTemplateDirective,
|
|
62
|
+
LocalizedMessagesDirective,
|
|
63
|
+
CustomMessagesComponent] });
|
|
58
64
|
TreeViewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewModule, imports: [[SharedModule]] });
|
|
59
65
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewModule, decorators: [{
|
|
60
66
|
type: NgModule,
|
|
@@ -6,7 +6,7 @@ import * as i0 from '@angular/core';
|
|
|
6
6
|
import { EventEmitter, Injectable, Directive, Optional, Component, HostBinding, Input, Output, forwardRef, isDevMode, ViewContainerRef, ChangeDetectionStrategy, ViewChild, ContentChild, Host, NgModule } from '@angular/core';
|
|
7
7
|
import { isDocumentAvailable, Keys, guid, anyChanged, hasObservers, isChanged } from '@progress/kendo-angular-common';
|
|
8
8
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
9
|
-
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
9
|
+
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { Subject, of, Subscription, EMPTY, BehaviorSubject, merge } from 'rxjs';
|
|
11
11
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
12
12
|
import { getter, setter } from '@progress/kendo-common';
|
|
@@ -28,8 +28,8 @@ const packageMetadata = {
|
|
|
28
28
|
name: '@progress/kendo-angular-treeview',
|
|
29
29
|
productName: 'Kendo UI for Angular',
|
|
30
30
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
31
|
-
publishDate:
|
|
32
|
-
version: '14.1.1-develop.
|
|
31
|
+
publishDate: 1699875064,
|
|
32
|
+
version: '14.1.1-develop.2',
|
|
33
33
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -1546,6 +1546,7 @@ class TreeViewGroupComponent {
|
|
|
1546
1546
|
this.isItemExpandable = (node, index) => this.expandDisabledNodes || !this.isItemDisabled(node, index);
|
|
1547
1547
|
this._data = [];
|
|
1548
1548
|
this.singleRecordSubscriptions = new Subscription();
|
|
1549
|
+
this.localizationSubscriptions = new Subscription();
|
|
1549
1550
|
this.isChecked = () => 'none';
|
|
1550
1551
|
this.isDisabled = () => false;
|
|
1551
1552
|
this.hasCheckbox = () => true;
|
|
@@ -1635,6 +1636,7 @@ class TreeViewGroupComponent {
|
|
|
1635
1636
|
this.loadMoreNodesSubscription.unsubscribe();
|
|
1636
1637
|
}
|
|
1637
1638
|
this.singleRecordSubscriptions.unsubscribe();
|
|
1639
|
+
this.localizationSubscriptions.unsubscribe();
|
|
1638
1640
|
}
|
|
1639
1641
|
ngOnInit() {
|
|
1640
1642
|
this.subscribeToNodesChange();
|
|
@@ -1644,11 +1646,21 @@ class TreeViewGroupComponent {
|
|
|
1644
1646
|
this.singleRecordSubscriptions.add(this.navigationService.loadMore
|
|
1645
1647
|
.pipe(filter(index => index === this.loadMoreButtonIndex))
|
|
1646
1648
|
.subscribe(this.loadMoreNodes.bind(this)));
|
|
1649
|
+
this.localizationSubscriptions.add(this.localization.changes.subscribe(this.l10nChange.bind(this)));
|
|
1647
1650
|
}
|
|
1648
1651
|
ngOnChanges(changes) {
|
|
1649
1652
|
if (changes.parentIndex && this.loadOnDemand) {
|
|
1650
1653
|
this.setNodeChildren(this.mapToTreeItem(this.data));
|
|
1651
1654
|
}
|
|
1655
|
+
if (this.localization.get('loadMore')) {
|
|
1656
|
+
this.loadMoreTitle = this.localization.get('loadMore');
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
l10nChange() {
|
|
1660
|
+
if (this.localization.get('loadMore')) {
|
|
1661
|
+
this.loadMoreTitle = this.localization.get('loadMore');
|
|
1662
|
+
}
|
|
1663
|
+
this.changeDetectorRef.markForCheck();
|
|
1652
1664
|
}
|
|
1653
1665
|
fetchChildren(node, index) {
|
|
1654
1666
|
return this.children(node)
|
|
@@ -1918,7 +1930,7 @@ TreeViewGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1918
1930
|
>
|
|
1919
1931
|
</ng-template>
|
|
1920
1932
|
<ng-container *ngIf="!loadMoreButtonTemplateRef">
|
|
1921
|
-
|
|
1933
|
+
{{ loadMoreTitle }}
|
|
1922
1934
|
</ng-container>
|
|
1923
1935
|
</span>
|
|
1924
1936
|
</span>
|
|
@@ -2098,7 +2110,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2098
2110
|
>
|
|
2099
2111
|
</ng-template>
|
|
2100
2112
|
<ng-container *ngIf="!loadMoreButtonTemplateRef">
|
|
2101
|
-
|
|
2113
|
+
{{ loadMoreTitle }}
|
|
2102
2114
|
</ng-container>
|
|
2103
2115
|
</span>
|
|
2104
2116
|
</span>
|
|
@@ -2164,6 +2176,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2164
2176
|
type: Input
|
|
2165
2177
|
}] } });
|
|
2166
2178
|
|
|
2179
|
+
/**
|
|
2180
|
+
* @hidden
|
|
2181
|
+
*/
|
|
2182
|
+
class TreeViewMessages extends ComponentMessages {
|
|
2183
|
+
}
|
|
2184
|
+
TreeViewMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
2185
|
+
TreeViewMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: TreeViewMessages, selector: "kendo-treeview-messages-base", inputs: { loadMore: "loadMore" }, usesInheritance: true, ngImport: i0 });
|
|
2186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewMessages, decorators: [{
|
|
2187
|
+
type: Directive,
|
|
2188
|
+
args: [{
|
|
2189
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
2190
|
+
selector: 'kendo-treeview-messages-base'
|
|
2191
|
+
}]
|
|
2192
|
+
}], propDecorators: { loadMore: [{
|
|
2193
|
+
type: Input
|
|
2194
|
+
}] } });
|
|
2195
|
+
|
|
2196
|
+
/**
|
|
2197
|
+
* @hidden
|
|
2198
|
+
*/
|
|
2199
|
+
class LocalizedMessagesDirective extends TreeViewMessages {
|
|
2200
|
+
constructor(service) {
|
|
2201
|
+
super();
|
|
2202
|
+
this.service = service;
|
|
2203
|
+
}
|
|
2204
|
+
}
|
|
2205
|
+
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2206
|
+
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: LocalizedMessagesDirective, selector: "[kendoTreeViewLocalizedMessages]", providers: [
|
|
2207
|
+
{
|
|
2208
|
+
provide: TreeViewMessages,
|
|
2209
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
2210
|
+
}
|
|
2211
|
+
], usesInheritance: true, ngImport: i0 });
|
|
2212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
2213
|
+
type: Directive,
|
|
2214
|
+
args: [{
|
|
2215
|
+
providers: [
|
|
2216
|
+
{
|
|
2217
|
+
provide: TreeViewMessages,
|
|
2218
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
2219
|
+
}
|
|
2220
|
+
],
|
|
2221
|
+
selector: '[kendoTreeViewLocalizedMessages]'
|
|
2222
|
+
}]
|
|
2223
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
2224
|
+
|
|
2167
2225
|
let nextId = 0;
|
|
2168
2226
|
const LOAD_MORE_DOC_LINK$1 = 'http://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button/';
|
|
2169
2227
|
const providers = [
|
|
@@ -2768,6 +2826,11 @@ class TreeViewComponent {
|
|
|
2768
2826
|
}
|
|
2769
2827
|
TreeViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: ExpandStateService }, { token: NavigationService }, { token: NodeChildrenService }, { token: SelectionService }, { token: TreeViewLookupService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: DataChangeNotificationService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2770
2828
|
TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TreeViewComponent, selector: "kendo-treeview", inputs: { filterInputPlaceholder: "filterInputPlaceholder", expandDisabledNodes: "expandDisabledNodes", animate: "animate", nodeTemplateRef: ["nodeTemplate", "nodeTemplateRef"], loadMoreButtonTemplateRef: ["loadMoreButtonTemplate", "loadMoreButtonTemplateRef"], trackBy: "trackBy", nodes: "nodes", textField: "textField", hasChildren: "hasChildren", isChecked: "isChecked", isDisabled: "isDisabled", hasCheckbox: "hasCheckbox", isExpanded: "isExpanded", isSelected: "isSelected", isVisible: "isVisible", navigable: "navigable", children: "children", loadOnDemand: "loadOnDemand", filterable: "filterable", filter: "filter", size: "size", disableParentNodesOnly: "disableParentNodesOnly" }, outputs: { childrenLoaded: "childrenLoaded", onBlur: "blur", onFocus: "focus", expand: "expand", collapse: "collapse", nodeDragStart: "nodeDragStart", nodeDrag: "nodeDrag", filterStateChange: "filterStateChange", nodeDrop: "nodeDrop", nodeDragEnd: "nodeDragEnd", addItem: "addItem", removeItem: "removeItem", checkedChange: "checkedChange", selectionChange: "selectionChange", filterChange: "filterChange", nodeClick: "nodeClick", nodeDblClick: "nodeDblClick" }, host: { properties: { "class.k-treeview": "this.classNames", "attr.dir": "this.direction", "@.disabled": "this.animate" } }, providers: providers, queries: [{ propertyName: "nodeTemplateQuery", first: true, predicate: NodeTemplateDirective, descendants: true }, { propertyName: "loadMoreButtonTemplateQuery", first: true, predicate: LoadMoreButtonTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "assetsContainer", first: true, predicate: ["assetsContainer"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "searchbox", first: true, predicate: ["searchbox"], descendants: true }], exportAs: ["kendoTreeView"], usesOnChanges: true, ngImport: i0, template: `
|
|
2829
|
+
<ng-container kendoTreeViewLocalizedMessages
|
|
2830
|
+
i18n-loadMore="kendo.treeview.loadMore|The title of the Load More button"
|
|
2831
|
+
loadMore="Load more..."
|
|
2832
|
+
>
|
|
2833
|
+
</ng-container>
|
|
2771
2834
|
<span
|
|
2772
2835
|
class="k-treeview-filter"
|
|
2773
2836
|
*ngIf="filterable"
|
|
@@ -2819,7 +2882,7 @@ TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
2819
2882
|
>
|
|
2820
2883
|
</ul>
|
|
2821
2884
|
<ng-container #assetsContainer></ng-container>
|
|
2822
|
-
`, isInline: true, components: [{ type: i8.TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { type: i9.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: TreeViewGroupComponent, selector: "[kendoTreeViewGroup]", inputs: ["checkboxes", "expandIcons", "disabled", "selectable", "touchActions", "disableParentNodesOnly", "loadOnDemand", "trackBy", "nodes", "textField", "parentDataItem", "parentIndex", "nodeTemplateRef", "loadMoreButtonTemplateRef", "loadMoreService", "size", "expandDisabledNodes", "isChecked", "isDisabled", "hasCheckbox", "isExpanded", "isVisible", "isSelected", "children", "hasChildren"] }], directives: [{ type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.TextBoxPrefixTemplateDirective, selector: "[kendoTextBoxPrefixTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.Default });
|
|
2885
|
+
`, isInline: true, components: [{ type: i8.TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { type: i9.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: TreeViewGroupComponent, selector: "[kendoTreeViewGroup]", inputs: ["checkboxes", "expandIcons", "disabled", "selectable", "touchActions", "disableParentNodesOnly", "loadOnDemand", "trackBy", "nodes", "textField", "parentDataItem", "parentIndex", "nodeTemplateRef", "loadMoreButtonTemplateRef", "loadMoreService", "size", "expandDisabledNodes", "isChecked", "isDisabled", "hasCheckbox", "isExpanded", "isVisible", "isSelected", "children", "hasChildren"] }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoTreeViewLocalizedMessages]" }, { type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.TextBoxPrefixTemplateDirective, selector: "[kendoTextBoxPrefixTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.Default });
|
|
2823
2886
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewComponent, decorators: [{
|
|
2824
2887
|
type: Component,
|
|
2825
2888
|
args: [{
|
|
@@ -2828,6 +2891,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2828
2891
|
providers: providers,
|
|
2829
2892
|
selector: 'kendo-treeview',
|
|
2830
2893
|
template: `
|
|
2894
|
+
<ng-container kendoTreeViewLocalizedMessages
|
|
2895
|
+
i18n-loadMore="kendo.treeview.loadMore|The title of the Load More button"
|
|
2896
|
+
loadMore="Load more..."
|
|
2897
|
+
>
|
|
2898
|
+
</ng-container>
|
|
2831
2899
|
<span
|
|
2832
2900
|
class="k-treeview-filter"
|
|
2833
2901
|
*ngIf="filterable"
|
|
@@ -5419,6 +5487,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
5419
5487
|
type: Input
|
|
5420
5488
|
}] } });
|
|
5421
5489
|
|
|
5490
|
+
/**
|
|
5491
|
+
* Custom component messages override default component messages
|
|
5492
|
+
*/
|
|
5493
|
+
class CustomMessagesComponent extends TreeViewMessages {
|
|
5494
|
+
constructor(service) {
|
|
5495
|
+
super();
|
|
5496
|
+
this.service = service;
|
|
5497
|
+
}
|
|
5498
|
+
get override() {
|
|
5499
|
+
return true;
|
|
5500
|
+
}
|
|
5501
|
+
}
|
|
5502
|
+
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5503
|
+
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CustomMessagesComponent, selector: "kendo-treeview-messages", providers: [
|
|
5504
|
+
{
|
|
5505
|
+
provide: TreeViewMessages,
|
|
5506
|
+
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
5507
|
+
}
|
|
5508
|
+
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
5509
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CustomMessagesComponent, decorators: [{
|
|
5510
|
+
type: Component,
|
|
5511
|
+
args: [{
|
|
5512
|
+
providers: [
|
|
5513
|
+
{
|
|
5514
|
+
provide: TreeViewMessages,
|
|
5515
|
+
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
5516
|
+
}
|
|
5517
|
+
],
|
|
5518
|
+
selector: 'kendo-treeview-messages',
|
|
5519
|
+
template: ``
|
|
5520
|
+
}]
|
|
5521
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
5522
|
+
|
|
5422
5523
|
const COMPONENT_DIRECTIVES = [
|
|
5423
5524
|
TreeViewComponent,
|
|
5424
5525
|
TreeViewGroupComponent,
|
|
@@ -5439,7 +5540,9 @@ const COMPONENT_DIRECTIVES = [
|
|
|
5439
5540
|
DropHintComponent,
|
|
5440
5541
|
DragAndDropEditingDirective,
|
|
5441
5542
|
LoadMoreDirective,
|
|
5442
|
-
LoadMoreButtonTemplateDirective
|
|
5543
|
+
LoadMoreButtonTemplateDirective,
|
|
5544
|
+
LocalizedMessagesDirective,
|
|
5545
|
+
CustomMessagesComponent,
|
|
5443
5546
|
];
|
|
5444
5547
|
/**
|
|
5445
5548
|
* @hidden
|
|
@@ -5466,7 +5569,9 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
5466
5569
|
DropHintComponent,
|
|
5467
5570
|
DragAndDropEditingDirective,
|
|
5468
5571
|
LoadMoreDirective,
|
|
5469
|
-
LoadMoreButtonTemplateDirective
|
|
5572
|
+
LoadMoreButtonTemplateDirective,
|
|
5573
|
+
LocalizedMessagesDirective,
|
|
5574
|
+
CustomMessagesComponent], imports: [CommonModule,
|
|
5470
5575
|
CheckBoxModule,
|
|
5471
5576
|
InputsModule,
|
|
5472
5577
|
IconsModule], exports: [TreeViewComponent,
|
|
@@ -5488,7 +5593,9 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
5488
5593
|
DropHintComponent,
|
|
5489
5594
|
DragAndDropEditingDirective,
|
|
5490
5595
|
LoadMoreDirective,
|
|
5491
|
-
LoadMoreButtonTemplateDirective
|
|
5596
|
+
LoadMoreButtonTemplateDirective,
|
|
5597
|
+
LocalizedMessagesDirective,
|
|
5598
|
+
CustomMessagesComponent] });
|
|
5492
5599
|
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SharedModule, imports: [[
|
|
5493
5600
|
CommonModule,
|
|
5494
5601
|
CheckBoxModule,
|
|
@@ -5527,7 +5634,9 @@ const EXPORTS = [
|
|
|
5527
5634
|
DropHintTemplateDirective,
|
|
5528
5635
|
DragAndDropEditingDirective,
|
|
5529
5636
|
LoadMoreDirective,
|
|
5530
|
-
LoadMoreButtonTemplateDirective
|
|
5637
|
+
LoadMoreButtonTemplateDirective,
|
|
5638
|
+
LocalizedMessagesDirective,
|
|
5639
|
+
CustomMessagesComponent,
|
|
5531
5640
|
];
|
|
5532
5641
|
/**
|
|
5533
5642
|
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the TreeView component.
|
|
@@ -5548,7 +5657,9 @@ TreeViewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
5548
5657
|
DropHintTemplateDirective,
|
|
5549
5658
|
DragAndDropEditingDirective,
|
|
5550
5659
|
LoadMoreDirective,
|
|
5551
|
-
LoadMoreButtonTemplateDirective
|
|
5660
|
+
LoadMoreButtonTemplateDirective,
|
|
5661
|
+
LocalizedMessagesDirective,
|
|
5662
|
+
CustomMessagesComponent] });
|
|
5552
5663
|
TreeViewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewModule, imports: [[SharedModule]] });
|
|
5553
5664
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewModule, decorators: [{
|
|
5554
5665
|
type: NgModule,
|
|
@@ -5562,5 +5673,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
5562
5673
|
* Generated bundle index. Do not edit.
|
|
5563
5674
|
*/
|
|
5564
5675
|
|
|
5565
|
-
export { CheckDirective, DataBoundComponent, DisableDirective, DragAndDropDirective, DragAndDropEditingDirective, DragClueService, DragClueTemplateDirective, DropAction, DropHintService, DropHintTemplateDirective, DropPosition, ExpandDirective, ExpandableComponent, FlatDataBindingDirective, HierarchyBindingDirective, LoadMoreButtonTemplateDirective, LoadMoreDirective, NodeTemplateDirective, SelectDirective, TreeItemDragEvent, TreeItemDragStartEvent, TreeItemDropEvent, TreeViewComponent, TreeViewModule };
|
|
5676
|
+
export { CheckDirective, CustomMessagesComponent, DataBoundComponent, DisableDirective, DragAndDropDirective, DragAndDropEditingDirective, DragClueService, DragClueTemplateDirective, DropAction, DropHintService, DropHintTemplateDirective, DropPosition, ExpandDirective, ExpandableComponent, FlatDataBindingDirective, HierarchyBindingDirective, LoadMoreButtonTemplateDirective, LoadMoreDirective, LocalizedMessagesDirective, NodeTemplateDirective, SelectDirective, TreeItemDragEvent, TreeItemDragStartEvent, TreeItemDropEvent, TreeViewComponent, TreeViewModule };
|
|
5566
5677
|
|
|
@@ -6,7 +6,7 @@ import * as i0 from '@angular/core';
|
|
|
6
6
|
import { EventEmitter, Injectable, Directive, Optional, Component, HostBinding, Input, Output, forwardRef, isDevMode, ViewContainerRef, ChangeDetectionStrategy, ViewChild, ContentChild, Host, NgModule } from '@angular/core';
|
|
7
7
|
import { isDocumentAvailable, Keys, guid, anyChanged, hasObservers, isChanged } from '@progress/kendo-angular-common';
|
|
8
8
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
9
|
-
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
9
|
+
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { Subject, of, Subscription, EMPTY, BehaviorSubject, merge } from 'rxjs';
|
|
11
11
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
12
12
|
import { getter, setter } from '@progress/kendo-common';
|
|
@@ -28,8 +28,8 @@ const packageMetadata = {
|
|
|
28
28
|
name: '@progress/kendo-angular-treeview',
|
|
29
29
|
productName: 'Kendo UI for Angular',
|
|
30
30
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
31
|
-
publishDate:
|
|
32
|
-
version: '14.1.1-develop.
|
|
31
|
+
publishDate: 1699875064,
|
|
32
|
+
version: '14.1.1-develop.2',
|
|
33
33
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -1542,6 +1542,7 @@ class TreeViewGroupComponent {
|
|
|
1542
1542
|
this.isItemExpandable = (node, index) => this.expandDisabledNodes || !this.isItemDisabled(node, index);
|
|
1543
1543
|
this._data = [];
|
|
1544
1544
|
this.singleRecordSubscriptions = new Subscription();
|
|
1545
|
+
this.localizationSubscriptions = new Subscription();
|
|
1545
1546
|
this.isChecked = () => 'none';
|
|
1546
1547
|
this.isDisabled = () => false;
|
|
1547
1548
|
this.hasCheckbox = () => true;
|
|
@@ -1631,6 +1632,7 @@ class TreeViewGroupComponent {
|
|
|
1631
1632
|
this.loadMoreNodesSubscription.unsubscribe();
|
|
1632
1633
|
}
|
|
1633
1634
|
this.singleRecordSubscriptions.unsubscribe();
|
|
1635
|
+
this.localizationSubscriptions.unsubscribe();
|
|
1634
1636
|
}
|
|
1635
1637
|
ngOnInit() {
|
|
1636
1638
|
this.subscribeToNodesChange();
|
|
@@ -1640,11 +1642,21 @@ class TreeViewGroupComponent {
|
|
|
1640
1642
|
this.singleRecordSubscriptions.add(this.navigationService.loadMore
|
|
1641
1643
|
.pipe(filter(index => index === this.loadMoreButtonIndex))
|
|
1642
1644
|
.subscribe(this.loadMoreNodes.bind(this)));
|
|
1645
|
+
this.localizationSubscriptions.add(this.localization.changes.subscribe(this.l10nChange.bind(this)));
|
|
1643
1646
|
}
|
|
1644
1647
|
ngOnChanges(changes) {
|
|
1645
1648
|
if (changes.parentIndex && this.loadOnDemand) {
|
|
1646
1649
|
this.setNodeChildren(this.mapToTreeItem(this.data));
|
|
1647
1650
|
}
|
|
1651
|
+
if (this.localization.get('loadMore')) {
|
|
1652
|
+
this.loadMoreTitle = this.localization.get('loadMore');
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
l10nChange() {
|
|
1656
|
+
if (this.localization.get('loadMore')) {
|
|
1657
|
+
this.loadMoreTitle = this.localization.get('loadMore');
|
|
1658
|
+
}
|
|
1659
|
+
this.changeDetectorRef.markForCheck();
|
|
1648
1660
|
}
|
|
1649
1661
|
fetchChildren(node, index) {
|
|
1650
1662
|
return this.children(node)
|
|
@@ -1914,7 +1926,7 @@ TreeViewGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1914
1926
|
>
|
|
1915
1927
|
</ng-template>
|
|
1916
1928
|
<ng-container *ngIf="!loadMoreButtonTemplateRef">
|
|
1917
|
-
|
|
1929
|
+
{{ loadMoreTitle }}
|
|
1918
1930
|
</ng-container>
|
|
1919
1931
|
</span>
|
|
1920
1932
|
</span>
|
|
@@ -2094,7 +2106,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2094
2106
|
>
|
|
2095
2107
|
</ng-template>
|
|
2096
2108
|
<ng-container *ngIf="!loadMoreButtonTemplateRef">
|
|
2097
|
-
|
|
2109
|
+
{{ loadMoreTitle }}
|
|
2098
2110
|
</ng-container>
|
|
2099
2111
|
</span>
|
|
2100
2112
|
</span>
|
|
@@ -2160,6 +2172,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2160
2172
|
type: Input
|
|
2161
2173
|
}] } });
|
|
2162
2174
|
|
|
2175
|
+
/**
|
|
2176
|
+
* @hidden
|
|
2177
|
+
*/
|
|
2178
|
+
class TreeViewMessages extends ComponentMessages {
|
|
2179
|
+
}
|
|
2180
|
+
TreeViewMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
2181
|
+
TreeViewMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: TreeViewMessages, selector: "kendo-treeview-messages-base", inputs: { loadMore: "loadMore" }, usesInheritance: true, ngImport: i0 });
|
|
2182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewMessages, decorators: [{
|
|
2183
|
+
type: Directive,
|
|
2184
|
+
args: [{
|
|
2185
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
2186
|
+
selector: 'kendo-treeview-messages-base'
|
|
2187
|
+
}]
|
|
2188
|
+
}], propDecorators: { loadMore: [{
|
|
2189
|
+
type: Input
|
|
2190
|
+
}] } });
|
|
2191
|
+
|
|
2192
|
+
/**
|
|
2193
|
+
* @hidden
|
|
2194
|
+
*/
|
|
2195
|
+
class LocalizedMessagesDirective extends TreeViewMessages {
|
|
2196
|
+
constructor(service) {
|
|
2197
|
+
super();
|
|
2198
|
+
this.service = service;
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2202
|
+
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: LocalizedMessagesDirective, selector: "[kendoTreeViewLocalizedMessages]", providers: [
|
|
2203
|
+
{
|
|
2204
|
+
provide: TreeViewMessages,
|
|
2205
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
2206
|
+
}
|
|
2207
|
+
], usesInheritance: true, ngImport: i0 });
|
|
2208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
2209
|
+
type: Directive,
|
|
2210
|
+
args: [{
|
|
2211
|
+
providers: [
|
|
2212
|
+
{
|
|
2213
|
+
provide: TreeViewMessages,
|
|
2214
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
2215
|
+
}
|
|
2216
|
+
],
|
|
2217
|
+
selector: '[kendoTreeViewLocalizedMessages]'
|
|
2218
|
+
}]
|
|
2219
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
2220
|
+
|
|
2163
2221
|
let nextId = 0;
|
|
2164
2222
|
const LOAD_MORE_DOC_LINK$1 = 'http://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button/';
|
|
2165
2223
|
const providers = [
|
|
@@ -2764,6 +2822,11 @@ class TreeViewComponent {
|
|
|
2764
2822
|
}
|
|
2765
2823
|
TreeViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: ExpandStateService }, { token: NavigationService }, { token: NodeChildrenService }, { token: SelectionService }, { token: TreeViewLookupService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: DataChangeNotificationService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2766
2824
|
TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TreeViewComponent, selector: "kendo-treeview", inputs: { filterInputPlaceholder: "filterInputPlaceholder", expandDisabledNodes: "expandDisabledNodes", animate: "animate", nodeTemplateRef: ["nodeTemplate", "nodeTemplateRef"], loadMoreButtonTemplateRef: ["loadMoreButtonTemplate", "loadMoreButtonTemplateRef"], trackBy: "trackBy", nodes: "nodes", textField: "textField", hasChildren: "hasChildren", isChecked: "isChecked", isDisabled: "isDisabled", hasCheckbox: "hasCheckbox", isExpanded: "isExpanded", isSelected: "isSelected", isVisible: "isVisible", navigable: "navigable", children: "children", loadOnDemand: "loadOnDemand", filterable: "filterable", filter: "filter", size: "size", disableParentNodesOnly: "disableParentNodesOnly" }, outputs: { childrenLoaded: "childrenLoaded", onBlur: "blur", onFocus: "focus", expand: "expand", collapse: "collapse", nodeDragStart: "nodeDragStart", nodeDrag: "nodeDrag", filterStateChange: "filterStateChange", nodeDrop: "nodeDrop", nodeDragEnd: "nodeDragEnd", addItem: "addItem", removeItem: "removeItem", checkedChange: "checkedChange", selectionChange: "selectionChange", filterChange: "filterChange", nodeClick: "nodeClick", nodeDblClick: "nodeDblClick" }, host: { properties: { "class.k-treeview": "this.classNames", "attr.dir": "this.direction", "@.disabled": "this.animate" } }, providers: providers, queries: [{ propertyName: "nodeTemplateQuery", first: true, predicate: NodeTemplateDirective, descendants: true }, { propertyName: "loadMoreButtonTemplateQuery", first: true, predicate: LoadMoreButtonTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "assetsContainer", first: true, predicate: ["assetsContainer"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "searchbox", first: true, predicate: ["searchbox"], descendants: true }], exportAs: ["kendoTreeView"], usesOnChanges: true, ngImport: i0, template: `
|
|
2825
|
+
<ng-container kendoTreeViewLocalizedMessages
|
|
2826
|
+
i18n-loadMore="kendo.treeview.loadMore|The title of the Load More button"
|
|
2827
|
+
loadMore="Load more..."
|
|
2828
|
+
>
|
|
2829
|
+
</ng-container>
|
|
2767
2830
|
<span
|
|
2768
2831
|
class="k-treeview-filter"
|
|
2769
2832
|
*ngIf="filterable"
|
|
@@ -2815,7 +2878,7 @@ TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
2815
2878
|
>
|
|
2816
2879
|
</ul>
|
|
2817
2880
|
<ng-container #assetsContainer></ng-container>
|
|
2818
|
-
`, isInline: true, components: [{ type: i8.TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { type: i9.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: TreeViewGroupComponent, selector: "[kendoTreeViewGroup]", inputs: ["checkboxes", "expandIcons", "disabled", "selectable", "touchActions", "disableParentNodesOnly", "loadOnDemand", "trackBy", "nodes", "textField", "parentDataItem", "parentIndex", "nodeTemplateRef", "loadMoreButtonTemplateRef", "loadMoreService", "size", "expandDisabledNodes", "isChecked", "isDisabled", "hasCheckbox", "isExpanded", "isVisible", "isSelected", "children", "hasChildren"] }], directives: [{ type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.TextBoxPrefixTemplateDirective, selector: "[kendoTextBoxPrefixTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.Default });
|
|
2881
|
+
`, isInline: true, components: [{ type: i8.TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { type: i9.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: TreeViewGroupComponent, selector: "[kendoTreeViewGroup]", inputs: ["checkboxes", "expandIcons", "disabled", "selectable", "touchActions", "disableParentNodesOnly", "loadOnDemand", "trackBy", "nodes", "textField", "parentDataItem", "parentIndex", "nodeTemplateRef", "loadMoreButtonTemplateRef", "loadMoreService", "size", "expandDisabledNodes", "isChecked", "isDisabled", "hasCheckbox", "isExpanded", "isVisible", "isSelected", "children", "hasChildren"] }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoTreeViewLocalizedMessages]" }, { type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.TextBoxPrefixTemplateDirective, selector: "[kendoTextBoxPrefixTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.Default });
|
|
2819
2882
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewComponent, decorators: [{
|
|
2820
2883
|
type: Component,
|
|
2821
2884
|
args: [{
|
|
@@ -2824,6 +2887,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2824
2887
|
providers: providers,
|
|
2825
2888
|
selector: 'kendo-treeview',
|
|
2826
2889
|
template: `
|
|
2890
|
+
<ng-container kendoTreeViewLocalizedMessages
|
|
2891
|
+
i18n-loadMore="kendo.treeview.loadMore|The title of the Load More button"
|
|
2892
|
+
loadMore="Load more..."
|
|
2893
|
+
>
|
|
2894
|
+
</ng-container>
|
|
2827
2895
|
<span
|
|
2828
2896
|
class="k-treeview-filter"
|
|
2829
2897
|
*ngIf="filterable"
|
|
@@ -5411,6 +5479,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
5411
5479
|
type: Input
|
|
5412
5480
|
}] } });
|
|
5413
5481
|
|
|
5482
|
+
/**
|
|
5483
|
+
* Custom component messages override default component messages
|
|
5484
|
+
*/
|
|
5485
|
+
class CustomMessagesComponent extends TreeViewMessages {
|
|
5486
|
+
constructor(service) {
|
|
5487
|
+
super();
|
|
5488
|
+
this.service = service;
|
|
5489
|
+
}
|
|
5490
|
+
get override() {
|
|
5491
|
+
return true;
|
|
5492
|
+
}
|
|
5493
|
+
}
|
|
5494
|
+
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5495
|
+
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CustomMessagesComponent, selector: "kendo-treeview-messages", providers: [
|
|
5496
|
+
{
|
|
5497
|
+
provide: TreeViewMessages,
|
|
5498
|
+
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
5499
|
+
}
|
|
5500
|
+
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
5501
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CustomMessagesComponent, decorators: [{
|
|
5502
|
+
type: Component,
|
|
5503
|
+
args: [{
|
|
5504
|
+
providers: [
|
|
5505
|
+
{
|
|
5506
|
+
provide: TreeViewMessages,
|
|
5507
|
+
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
5508
|
+
}
|
|
5509
|
+
],
|
|
5510
|
+
selector: 'kendo-treeview-messages',
|
|
5511
|
+
template: ``
|
|
5512
|
+
}]
|
|
5513
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
5514
|
+
|
|
5414
5515
|
const COMPONENT_DIRECTIVES = [
|
|
5415
5516
|
TreeViewComponent,
|
|
5416
5517
|
TreeViewGroupComponent,
|
|
@@ -5431,7 +5532,9 @@ const COMPONENT_DIRECTIVES = [
|
|
|
5431
5532
|
DropHintComponent,
|
|
5432
5533
|
DragAndDropEditingDirective,
|
|
5433
5534
|
LoadMoreDirective,
|
|
5434
|
-
LoadMoreButtonTemplateDirective
|
|
5535
|
+
LoadMoreButtonTemplateDirective,
|
|
5536
|
+
LocalizedMessagesDirective,
|
|
5537
|
+
CustomMessagesComponent,
|
|
5435
5538
|
];
|
|
5436
5539
|
/**
|
|
5437
5540
|
* @hidden
|
|
@@ -5458,7 +5561,9 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
5458
5561
|
DropHintComponent,
|
|
5459
5562
|
DragAndDropEditingDirective,
|
|
5460
5563
|
LoadMoreDirective,
|
|
5461
|
-
LoadMoreButtonTemplateDirective
|
|
5564
|
+
LoadMoreButtonTemplateDirective,
|
|
5565
|
+
LocalizedMessagesDirective,
|
|
5566
|
+
CustomMessagesComponent], imports: [CommonModule,
|
|
5462
5567
|
CheckBoxModule,
|
|
5463
5568
|
InputsModule,
|
|
5464
5569
|
IconsModule], exports: [TreeViewComponent,
|
|
@@ -5480,7 +5585,9 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
5480
5585
|
DropHintComponent,
|
|
5481
5586
|
DragAndDropEditingDirective,
|
|
5482
5587
|
LoadMoreDirective,
|
|
5483
|
-
LoadMoreButtonTemplateDirective
|
|
5588
|
+
LoadMoreButtonTemplateDirective,
|
|
5589
|
+
LocalizedMessagesDirective,
|
|
5590
|
+
CustomMessagesComponent] });
|
|
5484
5591
|
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SharedModule, imports: [[
|
|
5485
5592
|
CommonModule,
|
|
5486
5593
|
CheckBoxModule,
|
|
@@ -5519,7 +5626,9 @@ const EXPORTS = [
|
|
|
5519
5626
|
DropHintTemplateDirective,
|
|
5520
5627
|
DragAndDropEditingDirective,
|
|
5521
5628
|
LoadMoreDirective,
|
|
5522
|
-
LoadMoreButtonTemplateDirective
|
|
5629
|
+
LoadMoreButtonTemplateDirective,
|
|
5630
|
+
LocalizedMessagesDirective,
|
|
5631
|
+
CustomMessagesComponent,
|
|
5523
5632
|
];
|
|
5524
5633
|
/**
|
|
5525
5634
|
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the TreeView component.
|
|
@@ -5540,7 +5649,9 @@ TreeViewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
5540
5649
|
DropHintTemplateDirective,
|
|
5541
5650
|
DragAndDropEditingDirective,
|
|
5542
5651
|
LoadMoreDirective,
|
|
5543
|
-
LoadMoreButtonTemplateDirective
|
|
5652
|
+
LoadMoreButtonTemplateDirective,
|
|
5653
|
+
LocalizedMessagesDirective,
|
|
5654
|
+
CustomMessagesComponent] });
|
|
5544
5655
|
TreeViewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewModule, imports: [[SharedModule]] });
|
|
5545
5656
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeViewModule, decorators: [{
|
|
5546
5657
|
type: NgModule,
|
|
@@ -5554,5 +5665,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
5554
5665
|
* Generated bundle index. Do not edit.
|
|
5555
5666
|
*/
|
|
5556
5667
|
|
|
5557
|
-
export { CheckDirective, DataBoundComponent, DisableDirective, DragAndDropDirective, DragAndDropEditingDirective, DragClueService, DragClueTemplateDirective, DropAction, DropHintService, DropHintTemplateDirective, DropPosition, ExpandDirective, ExpandableComponent, FlatDataBindingDirective, HierarchyBindingDirective, LoadMoreButtonTemplateDirective, LoadMoreDirective, NodeTemplateDirective, SelectDirective, TreeItemDragEvent, TreeItemDragStartEvent, TreeItemDropEvent, TreeViewComponent, TreeViewModule };
|
|
5668
|
+
export { CheckDirective, CustomMessagesComponent, DataBoundComponent, DisableDirective, DragAndDropDirective, DragAndDropEditingDirective, DragClueService, DragClueTemplateDirective, DropAction, DropHintService, DropHintTemplateDirective, DropPosition, ExpandDirective, ExpandableComponent, FlatDataBindingDirective, HierarchyBindingDirective, LoadMoreButtonTemplateDirective, LoadMoreDirective, LocalizedMessagesDirective, NodeTemplateDirective, SelectDirective, TreeItemDragEvent, TreeItemDragStartEvent, TreeItemDropEvent, TreeViewComponent, TreeViewModule };
|
|
5558
5669
|
|
package/index.d.ts
CHANGED
|
@@ -44,3 +44,5 @@ export { FilterExpandSettings } from './filter-expand-settings.interface';
|
|
|
44
44
|
export { MatcherFunction } from './treeview-filter-settings';
|
|
45
45
|
export { FilterState } from './filter-state.interface';
|
|
46
46
|
export { TreeViewSize } from './size';
|
|
47
|
+
export { CustomMessagesComponent } from './localization/custom-messages.component';
|
|
48
|
+
export { LocalizedMessagesDirective } from "./localization/localized-messages.directive";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { TreeViewMessages } from "./messages";
|
|
6
|
+
import { LocalizationService } from "@progress/kendo-angular-l10n";
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* Custom component messages override default component messages
|
|
10
|
+
*/
|
|
11
|
+
export declare class CustomMessagesComponent extends TreeViewMessages {
|
|
12
|
+
protected service: LocalizationService;
|
|
13
|
+
constructor(service: LocalizationService);
|
|
14
|
+
protected get override(): boolean;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomMessagesComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CustomMessagesComponent, "kendo-treeview-messages", never, {}, {}, never, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { TreeViewMessages } from "./messages";
|
|
6
|
+
import { LocalizationService } from "@progress/kendo-angular-l10n";
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export declare class LocalizedMessagesDirective extends TreeViewMessages {
|
|
12
|
+
protected service: LocalizationService;
|
|
13
|
+
constructor(service: LocalizationService);
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LocalizedMessagesDirective, never>;
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<LocalizedMessagesDirective, "[kendoTreeViewLocalizedMessages]", never, {}, {}, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { ComponentMessages } from "@progress/kendo-angular-l10n";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* @hidden
|
|
9
|
+
*/
|
|
10
|
+
export declare class TreeViewMessages extends ComponentMessages {
|
|
11
|
+
/**
|
|
12
|
+
* The text of the `Load More` button title.
|
|
13
|
+
*/
|
|
14
|
+
loadMore: string;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TreeViewMessages, never>;
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TreeViewMessages, "kendo-treeview-messages-base", never, { "loadMore": "loadMore"; }, {}, never>;
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-treeview",
|
|
3
|
-
"version": "14.1.1-develop.
|
|
3
|
+
"version": "14.1.1-develop.2",
|
|
4
4
|
"description": "Kendo UI TreeView for Angular",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"@angular/core": "13 - 17",
|
|
24
24
|
"@angular/platform-browser": "13 - 17",
|
|
25
25
|
"@progress/kendo-licensing": "^1.0.2",
|
|
26
|
-
"@progress/kendo-angular-common": "14.1.1-develop.
|
|
27
|
-
"@progress/kendo-angular-inputs": "14.1.1-develop.
|
|
28
|
-
"@progress/kendo-angular-icons": "14.1.1-develop.
|
|
29
|
-
"@progress/kendo-angular-l10n": "14.1.1-develop.
|
|
26
|
+
"@progress/kendo-angular-common": "14.1.1-develop.2",
|
|
27
|
+
"@progress/kendo-angular-inputs": "14.1.1-develop.2",
|
|
28
|
+
"@progress/kendo-angular-icons": "14.1.1-develop.2",
|
|
29
|
+
"@progress/kendo-angular-l10n": "14.1.1-develop.2",
|
|
30
30
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"tslib": "^2.3.1",
|
|
34
|
-
"@progress/kendo-angular-schematics": "14.1.1-develop.
|
|
34
|
+
"@progress/kendo-angular-schematics": "14.1.1-develop.2",
|
|
35
35
|
"@progress/kendo-common": "^0.2.0",
|
|
36
36
|
"@progress/kendo-draggable": "^3.0.2"
|
|
37
37
|
},
|
|
@@ -4,10 +4,10 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
4
4
|
function default_1(options) {
|
|
5
5
|
const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'TreeViewModule', package: 'treeview', peerDependencies: {
|
|
6
6
|
// Peers of kendo-angular-inputs
|
|
7
|
-
'@progress/kendo-angular-buttons': '14.1.1-develop.
|
|
8
|
-
'@progress/kendo-angular-dialog': '14.1.1-develop.
|
|
9
|
-
'@progress/kendo-angular-intl': '14.1.1-develop.
|
|
10
|
-
'@progress/kendo-angular-popup': '14.1.1-develop.
|
|
7
|
+
'@progress/kendo-angular-buttons': '14.1.1-develop.2',
|
|
8
|
+
'@progress/kendo-angular-dialog': '14.1.1-develop.2',
|
|
9
|
+
'@progress/kendo-angular-intl': '14.1.1-develop.2',
|
|
10
|
+
'@progress/kendo-angular-popup': '14.1.1-develop.2',
|
|
11
11
|
'@progress/kendo-drawing': '^1.9.3',
|
|
12
12
|
// Peer dependency of icons
|
|
13
13
|
'@progress/kendo-svg-icons': '^2.0.0'
|
package/shared.module.d.ts
CHANGED
|
@@ -23,15 +23,17 @@ import * as i17 from "./drag-and-drop/drop-hint/drop-hint.component";
|
|
|
23
23
|
import * as i18 from "./drag-and-drop/drag-and-drop-editing.directive";
|
|
24
24
|
import * as i19 from "./load-more/load-more.directive";
|
|
25
25
|
import * as i20 from "./load-more/load-more-button-template.directive";
|
|
26
|
-
import * as i21 from "
|
|
27
|
-
import * as i22 from "./
|
|
28
|
-
import * as i23 from "@
|
|
29
|
-
import * as i24 from "
|
|
26
|
+
import * as i21 from "./localization/localized-messages.directive";
|
|
27
|
+
import * as i22 from "./localization/custom-messages.component";
|
|
28
|
+
import * as i23 from "@angular/common";
|
|
29
|
+
import * as i24 from "./checkbox/checkbox.module";
|
|
30
|
+
import * as i25 from "@progress/kendo-angular-inputs";
|
|
31
|
+
import * as i26 from "@progress/kendo-angular-icons";
|
|
30
32
|
/**
|
|
31
33
|
* @hidden
|
|
32
34
|
*/
|
|
33
35
|
export declare class SharedModule {
|
|
34
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<SharedModule, never>;
|
|
35
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedModule, [typeof i1.TreeViewComponent, typeof i2.TreeViewGroupComponent, typeof i3.TreeViewItemDirective, typeof i4.TreeViewItemContentDirective, typeof i5.NodeTemplateDirective, typeof i6.CheckDirective, typeof i7.DisableDirective, typeof i8.ExpandDirective, typeof i9.SelectDirective, typeof i10.HierarchyBindingDirective, typeof i11.LoadingIndicatorDirective, typeof i12.FlatDataBindingDirective, typeof i13.DragAndDropDirective, typeof i14.DragClueTemplateDirective, typeof i15.DragClueComponent, typeof i16.DropHintTemplateDirective, typeof i17.DropHintComponent, typeof i18.DragAndDropEditingDirective, typeof i19.LoadMoreDirective, typeof i20.LoadMoreButtonTemplateDirective], [typeof
|
|
37
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedModule, [typeof i1.TreeViewComponent, typeof i2.TreeViewGroupComponent, typeof i3.TreeViewItemDirective, typeof i4.TreeViewItemContentDirective, typeof i5.NodeTemplateDirective, typeof i6.CheckDirective, typeof i7.DisableDirective, typeof i8.ExpandDirective, typeof i9.SelectDirective, typeof i10.HierarchyBindingDirective, typeof i11.LoadingIndicatorDirective, typeof i12.FlatDataBindingDirective, typeof i13.DragAndDropDirective, typeof i14.DragClueTemplateDirective, typeof i15.DragClueComponent, typeof i16.DropHintTemplateDirective, typeof i17.DropHintComponent, typeof i18.DragAndDropEditingDirective, typeof i19.LoadMoreDirective, typeof i20.LoadMoreButtonTemplateDirective, typeof i21.LocalizedMessagesDirective, typeof i22.CustomMessagesComponent], [typeof i23.CommonModule, typeof i24.CheckBoxModule, typeof i25.InputsModule, typeof i26.IconsModule], [typeof i1.TreeViewComponent, typeof i2.TreeViewGroupComponent, typeof i3.TreeViewItemDirective, typeof i4.TreeViewItemContentDirective, typeof i5.NodeTemplateDirective, typeof i6.CheckDirective, typeof i7.DisableDirective, typeof i8.ExpandDirective, typeof i9.SelectDirective, typeof i10.HierarchyBindingDirective, typeof i11.LoadingIndicatorDirective, typeof i12.FlatDataBindingDirective, typeof i13.DragAndDropDirective, typeof i14.DragClueTemplateDirective, typeof i15.DragClueComponent, typeof i16.DropHintTemplateDirective, typeof i17.DropHintComponent, typeof i18.DragAndDropEditingDirective, typeof i19.LoadMoreDirective, typeof i20.LoadMoreButtonTemplateDirective, typeof i21.LocalizedMessagesDirective, typeof i22.CustomMessagesComponent]>;
|
|
36
38
|
static ɵinj: i0.ɵɵInjectorDeclaration<SharedModule>;
|
|
37
39
|
}
|
|
@@ -29,7 +29,7 @@ export declare class TreeViewGroupComponent implements OnChanges, OnInit, OnDest
|
|
|
29
29
|
protected nodeChildrenService: NodeChildrenService;
|
|
30
30
|
protected dataChangeNotification: DataChangeNotificationService;
|
|
31
31
|
protected changeDetectorRef: ChangeDetectorRef;
|
|
32
|
-
|
|
32
|
+
localization: LocalizationService;
|
|
33
33
|
/**
|
|
34
34
|
* @hidden
|
|
35
35
|
*/
|
|
@@ -42,6 +42,10 @@ export declare class TreeViewGroupComponent implements OnChanges, OnInit, OnDest
|
|
|
42
42
|
* @hidden
|
|
43
43
|
*/
|
|
44
44
|
caretAltLeftIcon: SVGIcon;
|
|
45
|
+
/**
|
|
46
|
+
* @hidden
|
|
47
|
+
*/
|
|
48
|
+
loadMoreTitle: string;
|
|
45
49
|
kGroupClass: boolean;
|
|
46
50
|
get role(): string;
|
|
47
51
|
checkboxes: boolean;
|
|
@@ -80,6 +84,7 @@ export declare class TreeViewGroupComponent implements OnChanges, OnInit, OnDest
|
|
|
80
84
|
private nodesSubscription;
|
|
81
85
|
private loadMoreNodesSubscription;
|
|
82
86
|
private singleRecordSubscriptions;
|
|
87
|
+
private localizationSubscriptions;
|
|
83
88
|
constructor(expandService: ExpandStateService, loadingService: LoadingNotificationService, indexBuilder: IndexBuilderService, treeViewLookupService: TreeViewLookupService, navigationService: NavigationService, nodeChildrenService: NodeChildrenService, dataChangeNotification: DataChangeNotificationService, changeDetectorRef: ChangeDetectorRef, localization: LocalizationService);
|
|
84
89
|
isChecked: (item: object, index: string) => CheckedState;
|
|
85
90
|
isDisabled: (item: object, index: string) => boolean;
|
|
@@ -97,6 +102,7 @@ export declare class TreeViewGroupComponent implements OnChanges, OnInit, OnDest
|
|
|
97
102
|
ngOnDestroy(): void;
|
|
98
103
|
ngOnInit(): void;
|
|
99
104
|
ngOnChanges(changes: any): void;
|
|
105
|
+
private l10nChange;
|
|
100
106
|
fetchChildren(node: any, index: string): Observable<any>;
|
|
101
107
|
get nextFields(): string[];
|
|
102
108
|
loadMoreNodes(): void;
|
package/treeview.module.d.ts
CHANGED
|
@@ -18,11 +18,13 @@ import * as i12 from "./drag-and-drop/drop-hint/drop-hint-template.directive";
|
|
|
18
18
|
import * as i13 from "./drag-and-drop/drag-and-drop-editing.directive";
|
|
19
19
|
import * as i14 from "./load-more/load-more.directive";
|
|
20
20
|
import * as i15 from "./load-more/load-more-button-template.directive";
|
|
21
|
+
import * as i16 from "./localization/localized-messages.directive";
|
|
22
|
+
import * as i17 from "./localization/custom-messages.component";
|
|
21
23
|
/**
|
|
22
24
|
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the TreeView component.
|
|
23
25
|
*/
|
|
24
26
|
export declare class TreeViewModule {
|
|
25
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<TreeViewModule, never>;
|
|
26
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<TreeViewModule, never, [typeof i1.SharedModule], [typeof i2.TreeViewComponent, typeof i3.NodeTemplateDirective, typeof i4.CheckDirective, typeof i5.DisableDirective, typeof i6.ExpandDirective, typeof i7.SelectDirective, typeof i8.HierarchyBindingDirective, typeof i9.FlatDataBindingDirective, typeof i10.DragAndDropDirective, typeof i11.DragClueTemplateDirective, typeof i12.DropHintTemplateDirective, typeof i13.DragAndDropEditingDirective, typeof i14.LoadMoreDirective, typeof i15.LoadMoreButtonTemplateDirective]>;
|
|
28
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TreeViewModule, never, [typeof i1.SharedModule], [typeof i2.TreeViewComponent, typeof i3.NodeTemplateDirective, typeof i4.CheckDirective, typeof i5.DisableDirective, typeof i6.ExpandDirective, typeof i7.SelectDirective, typeof i8.HierarchyBindingDirective, typeof i9.FlatDataBindingDirective, typeof i10.DragAndDropDirective, typeof i11.DragClueTemplateDirective, typeof i12.DropHintTemplateDirective, typeof i13.DragAndDropEditingDirective, typeof i14.LoadMoreDirective, typeof i15.LoadMoreButtonTemplateDirective, typeof i16.LocalizedMessagesDirective, typeof i17.CustomMessagesComponent]>;
|
|
27
29
|
static ɵinj: i0.ɵɵInjectorDeclaration<TreeViewModule>;
|
|
28
30
|
}
|