@progress/kendo-angular-dropdowns 19.0.0-develop.3 → 19.0.0-develop.31
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/autocomplete/autocomplete.component.d.ts +11 -17
- package/codemods/template-transformer/index.js +94 -0
- package/codemods/utils.js +553 -0
- package/codemods/v19/autocomplete-subtitle.js +50 -0
- package/codemods/v19/autocomplete-title.js +51 -0
- package/codemods/v19/combobox-subtitle.js +50 -0
- package/codemods/v19/combobox-title.js +52 -0
- package/codemods/v19/dropdownlist-subtitle.js +49 -0
- package/codemods/v19/dropdownlist-title.js +51 -0
- package/codemods/v19/dropdowntree-subtitle.js +49 -0
- package/codemods/v19/dropdowntree-title.js +51 -0
- package/codemods/v19/multicolumncombobox-subtitle.js +49 -0
- package/codemods/v19/multicolumncombobox-title.js +51 -0
- package/codemods/v19/multiselect-subtitle.js +49 -0
- package/codemods/v19/multiselect-title.js +51 -0
- package/codemods/v19/multiselecttree-subtitle.js +49 -0
- package/codemods/v19/multiselecttree-title.js +51 -0
- package/comboboxes/combobox.component.d.ts +12 -14
- package/common/{action-sheet.component.d.ts → adaptive-renderer.component.d.ts} +10 -13
- package/common/list.component.d.ts +8 -1
- package/common/localization/messages.d.ts +5 -5
- package/common/util.d.ts +0 -6
- package/dropdownlist/dropdownlist.component.d.ts +7 -19
- package/dropdowntrees/dropdowntree.component.d.ts +9 -16
- package/dropdowntrees/multiselecttree.component.d.ts +9 -28
- package/esm2022/autocomplete/autocomplete.component.mjs +71 -94
- package/esm2022/comboboxes/combobox.component.mjs +85 -100
- package/esm2022/comboboxes/multicolumncombobox.component.mjs +23 -26
- package/esm2022/common/{action-sheet.component.mjs → adaptive-renderer.component.mjs} +71 -107
- package/esm2022/common/list.component.mjs +300 -213
- package/esm2022/common/localization/messages.mjs +7 -7
- package/esm2022/common/searchbar.component.mjs +2 -3
- package/esm2022/common/util.mjs +0 -22
- package/esm2022/dropdownlist/dropdownlist.component.mjs +50 -123
- package/esm2022/dropdowntrees/dropdowntree.component.mjs +63 -72
- package/esm2022/dropdowntrees/multiselecttree.component.mjs +65 -122
- package/esm2022/index.mjs +1 -1
- package/esm2022/multiselect/multiselect.component.mjs +133 -190
- package/esm2022/package-metadata.mjs +2 -2
- package/fesm2022/progress-kendo-angular-dropdowns.mjs +920 -1130
- package/index.d.ts +1 -1
- package/multiselect/multiselect.component.d.ts +13 -26
- package/package.json +90 -10
- package/schematics/ngAdd/index.js +2 -2
|
@@ -33,7 +33,7 @@ import { DropDownFillMode } from '../common/models/fillmode';
|
|
|
33
33
|
import { SVGIcon } from '@progress/kendo-svg-icons';
|
|
34
34
|
import { ActionSheetComponent } from '@progress/kendo-angular-navigation';
|
|
35
35
|
import { TextBoxComponent } from '@progress/kendo-angular-inputs';
|
|
36
|
-
import {
|
|
36
|
+
import { AdaptiveRendererComponent } from '../common/adaptive-renderer.component';
|
|
37
37
|
import * as i0 from "@angular/core";
|
|
38
38
|
/**
|
|
39
39
|
* @hidden
|
|
@@ -83,7 +83,7 @@ export declare class AutoCompleteComponent implements ControlValueAccessor, OnDe
|
|
|
83
83
|
/**
|
|
84
84
|
* @hidden
|
|
85
85
|
*/
|
|
86
|
-
|
|
86
|
+
adaptiveRendererComponent: AdaptiveRendererComponent;
|
|
87
87
|
/**
|
|
88
88
|
* @hidden
|
|
89
89
|
*/
|
|
@@ -169,13 +169,12 @@ export declare class AutoCompleteComponent implements ControlValueAccessor, OnDe
|
|
|
169
169
|
* Sets the title of the ActionSheet that is rendered instead of the Popup when using small screen devices.
|
|
170
170
|
* By default the ActionSheet title uses the text provided for the label of the AutoComplete.
|
|
171
171
|
*/
|
|
172
|
-
|
|
172
|
+
adaptiveTitle: string;
|
|
173
173
|
/**
|
|
174
174
|
* Sets the subtitle of the ActionSheet that is rendered instead of the Popup when using small screen devices.
|
|
175
|
-
* By default the ActionSheet
|
|
175
|
+
* By default the ActionSheet does not render a subtitle.
|
|
176
176
|
*/
|
|
177
|
-
|
|
178
|
-
get subtitle(): string;
|
|
177
|
+
adaptiveSubtitle: string;
|
|
179
178
|
/**
|
|
180
179
|
* @hidden
|
|
181
180
|
*/
|
|
@@ -406,10 +405,6 @@ export declare class AutoCompleteComponent implements ControlValueAccessor, OnDe
|
|
|
406
405
|
* @hidden
|
|
407
406
|
*/
|
|
408
407
|
messageFor(key: string): string;
|
|
409
|
-
/**
|
|
410
|
-
* @hidden
|
|
411
|
-
*/
|
|
412
|
-
onAdaptiveTextBoxChange(text: string): void;
|
|
413
408
|
/**
|
|
414
409
|
* @hidden
|
|
415
410
|
*/
|
|
@@ -461,10 +456,6 @@ export declare class AutoCompleteComponent implements ControlValueAccessor, OnDe
|
|
|
461
456
|
* @hidden
|
|
462
457
|
*/
|
|
463
458
|
searchBarChange(text: string): void;
|
|
464
|
-
/**
|
|
465
|
-
* @hidden
|
|
466
|
-
*/
|
|
467
|
-
onFilterChange(text: string): void;
|
|
468
459
|
/**
|
|
469
460
|
* @hidden
|
|
470
461
|
*/
|
|
@@ -485,6 +476,10 @@ export declare class AutoCompleteComponent implements ControlValueAccessor, OnDe
|
|
|
485
476
|
* @hidden
|
|
486
477
|
*/
|
|
487
478
|
pageChange(event: PageChangeEvent): void;
|
|
479
|
+
/**
|
|
480
|
+
* @hidden
|
|
481
|
+
*/
|
|
482
|
+
closeActionSheet(): void;
|
|
488
483
|
protected change(value: string): void;
|
|
489
484
|
private popupMouseDownHandler;
|
|
490
485
|
private _popupSettings;
|
|
@@ -496,7 +491,6 @@ export declare class AutoCompleteComponent implements ControlValueAccessor, OnDe
|
|
|
496
491
|
private subs;
|
|
497
492
|
private valueChangeSubject;
|
|
498
493
|
private touchstartDisposeHandler;
|
|
499
|
-
private _subtitle;
|
|
500
494
|
private wrapper;
|
|
501
495
|
private _isFocused;
|
|
502
496
|
private direction;
|
|
@@ -515,8 +509,8 @@ export declare class AutoCompleteComponent implements ControlValueAccessor, OnDe
|
|
|
515
509
|
private firstFocusableIndex;
|
|
516
510
|
private findIndexPredicate;
|
|
517
511
|
private setComponentClasses;
|
|
518
|
-
private closeActionSheet;
|
|
519
512
|
private openActionSheet;
|
|
513
|
+
private blurComponent;
|
|
520
514
|
static ɵfac: i0.ɵɵFactoryDeclaration<AutoCompleteComponent, never>;
|
|
521
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AutoCompleteComponent, "kendo-autocomplete", ["kendoAutoComplete"], { "highlightFirst": { "alias": "highlightFirst"; "required": false; }; "showStickyHeader": { "alias": "showStickyHeader"; "required": false; }; "focusableId": { "alias": "focusableId"; "required": false; }; "data": { "alias": "data"; "required": false; }; "value": { "alias": "value"; "required": false; }; "valueField": { "alias": "valueField"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "adaptiveMode": { "alias": "adaptiveMode"; "required": false; }; "
|
|
515
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AutoCompleteComponent, "kendo-autocomplete", ["kendoAutoComplete"], { "highlightFirst": { "alias": "highlightFirst"; "required": false; }; "showStickyHeader": { "alias": "showStickyHeader"; "required": false; }; "focusableId": { "alias": "focusableId"; "required": false; }; "data": { "alias": "data"; "required": false; }; "value": { "alias": "value"; "required": false; }; "valueField": { "alias": "valueField"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "adaptiveMode": { "alias": "adaptiveMode"; "required": false; }; "adaptiveTitle": { "alias": "adaptiveTitle"; "required": false; }; "adaptiveSubtitle": { "alias": "adaptiveSubtitle"; "required": false; }; "popupSettings": { "alias": "popupSettings"; "required": false; }; "listHeight": { "alias": "listHeight"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "clearButton": { "alias": "clearButton"; "required": false; }; "suggest": { "alias": "suggest"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "itemDisabled": { "alias": "itemDisabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "filterable": { "alias": "filterable"; "required": false; }; "virtual": { "alias": "virtual"; "required": false; }; "size": { "alias": "size"; "required": false; }; "rounded": { "alias": "rounded"; "required": false; }; "fillMode": { "alias": "fillMode"; "required": false; }; "inputAttributes": { "alias": "inputAttributes"; "required": false; }; }, { "valueChange": "valueChange"; "filterChange": "filterChange"; "open": "open"; "opened": "opened"; "close": "close"; "closed": "closed"; "onFocus": "focus"; "onBlur": "blur"; "inputFocus": "inputFocus"; "inputBlur": "inputBlur"; }, ["template", "headerTemplate", "footerTemplate", "noDataTemplate", "groupTemplate", "fixedGroupTemplate", "suffixTemplate", "prefixTemplate"], never, true, never>;
|
|
522
516
|
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.templateTransformer = void 0;
|
|
8
|
+
const node_html_parser_1 = require("node-html-parser");
|
|
9
|
+
function templateTransformer(root, j, ...processFns) {
|
|
10
|
+
root
|
|
11
|
+
.find(j.ClassDeclaration)
|
|
12
|
+
.forEach(classPath => {
|
|
13
|
+
// Skip if no decorators
|
|
14
|
+
const classNode = classPath.node;
|
|
15
|
+
if (!classNode.decorators || !classNode.decorators.length)
|
|
16
|
+
return;
|
|
17
|
+
// Find Component decorator
|
|
18
|
+
const componentDecorator = classNode.decorators.find((decorator) => {
|
|
19
|
+
if (decorator.expression && decorator.expression.type === 'CallExpression') {
|
|
20
|
+
const callee = decorator.expression.callee;
|
|
21
|
+
// Handle direct Component identifier
|
|
22
|
+
if (callee.type === 'Identifier' && callee.name === 'Component') {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
// Handle angular.core.Component or similar
|
|
26
|
+
if (callee.type === 'MemberExpression' &&
|
|
27
|
+
callee.property &&
|
|
28
|
+
callee.property.type === 'Identifier' &&
|
|
29
|
+
callee.property.name === 'Component') {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
});
|
|
35
|
+
if (!componentDecorator || !componentDecorator.expression)
|
|
36
|
+
return;
|
|
37
|
+
const expression = componentDecorator.expression;
|
|
38
|
+
if (expression.type !== 'CallExpression' || !expression.arguments.length)
|
|
39
|
+
return;
|
|
40
|
+
const componentOptions = expression.arguments[0];
|
|
41
|
+
if (componentOptions.type !== 'ObjectExpression')
|
|
42
|
+
return;
|
|
43
|
+
// Find template and templateUrl properties
|
|
44
|
+
const props = componentOptions.properties || [];
|
|
45
|
+
const templateProp = props.find((prop) => (prop.key.type === 'Identifier' && prop.key.name === 'template') ||
|
|
46
|
+
(prop.key.type === 'StringLiteral' && prop.key.value === 'template'));
|
|
47
|
+
// const templateUrlProp = props.find((prop: any) =>
|
|
48
|
+
// (prop.key.type === 'Identifier' && prop.key.name === 'templateUrl') ||
|
|
49
|
+
// (prop.key.type === 'StringLiteral' && prop.key.value === 'templateUrl')
|
|
50
|
+
// );
|
|
51
|
+
// Process inline template
|
|
52
|
+
if (templateProp) {
|
|
53
|
+
// Extract template based on node type
|
|
54
|
+
let originalTemplate;
|
|
55
|
+
if (templateProp.value.type === 'StringLiteral' || templateProp.value.type === 'Literal') {
|
|
56
|
+
originalTemplate = templateProp.value.value;
|
|
57
|
+
}
|
|
58
|
+
else if (templateProp.value.type === 'TemplateLiteral') {
|
|
59
|
+
// For template literals, join quasis
|
|
60
|
+
if (templateProp.value.quasis && templateProp.value.quasis.length) {
|
|
61
|
+
originalTemplate = templateProp.value.quasis
|
|
62
|
+
.map((q) => q.value.cooked || q.value.raw)
|
|
63
|
+
.join('');
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
console.warn('Could not process TemplateLiteral properly');
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
console.warn(`Unsupported template type: ${templateProp.value.type}`);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const root = (0, node_html_parser_1.parse)(originalTemplate);
|
|
75
|
+
processFns.forEach(fn => {
|
|
76
|
+
fn(root);
|
|
77
|
+
});
|
|
78
|
+
// Transform template using Angular compiler
|
|
79
|
+
const transformedTemplate = root.toString();
|
|
80
|
+
if (transformedTemplate !== originalTemplate) {
|
|
81
|
+
// Update template property
|
|
82
|
+
if (templateProp.value.type === 'TemplateLiteral') {
|
|
83
|
+
// For template literals, create a new template literal
|
|
84
|
+
templateProp.value = j.templateLiteral([j.templateElement({ cooked: transformedTemplate, raw: transformedTemplate }, true)], []);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
// For string literals, update the value
|
|
88
|
+
templateProp.value.value = transformedTemplate;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
exports.templateTransformer = templateTransformer;
|