@progress/kendo-angular-layout 19.0.0-develop.9 → 19.0.1-develop.1
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/codemods/template-transformer/index.js +94 -0
- package/codemods/utils.js +553 -0
- package/codemods/v19/tabstrip-mousescrollspeed.js +56 -0
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/tabstrip/constants.mjs +0 -4
- package/esm2022/tabstrip/models/scrollable-settings.mjs +2 -3
- package/esm2022/tabstrip/tabstrip.service.mjs +11 -11
- package/esm2022/tilelayout/keyboard-navigation.service.mjs +1 -1
- package/esm2022/tilelayout/tilelayout.component.mjs +4 -4
- package/fesm2022/progress-kendo-angular-layout.mjs +19 -24
- package/package.json +24 -9
- package/tabstrip/constants.d.ts +0 -4
- package/tabstrip/models/scrollable-settings.d.ts +0 -5
- package/tabstrip/tabstrip.service.d.ts +4 -4
- package/tilelayout/tilelayout.component.d.ts +3 -3
@@ -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;
|
@@ -0,0 +1,553 @@
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
8
|
+
};
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
+
exports.tsComponentPropertyRemoval = exports.tsPropertyRemoval = exports.templateAttributeRemoval = exports.htmlAttributeRemoval = exports.htmlAttributeValueTransformer = exports.tsPropertyValueTransformer = exports.templateAttributeValueTransformer = exports.htmlAttributeTransformer = exports.htmlBoundAttributeTransformer = exports.htmlStaticAttributeTransformer = exports.tsPropertyTransformer = exports.templateAttributeTransformer = exports.templateBoundAttributeTransformer = exports.templateStaticAttributeTransformer = void 0;
|
11
|
+
const node_html_parser_1 = __importDefault(require("node-html-parser"));
|
12
|
+
const templateStaticAttributeTransformer = (root, tagName, attributeName, newAttributeName) => {
|
13
|
+
const elements = Array.from(root.getElementsByTagName(tagName)) || [];
|
14
|
+
for (const element of elements) {
|
15
|
+
// Handle static attributes like title="foo"
|
16
|
+
const staticAttr = element.getAttribute(attributeName);
|
17
|
+
if (staticAttr) {
|
18
|
+
element.setAttribute(newAttributeName, staticAttr);
|
19
|
+
element.removeAttribute(attributeName);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
};
|
23
|
+
exports.templateStaticAttributeTransformer = templateStaticAttributeTransformer;
|
24
|
+
const templateBoundAttributeTransformer = (root, tagName, attributeName, newAttributeName) => {
|
25
|
+
const elements = Array.from(root.getElementsByTagName(tagName)) || [];
|
26
|
+
for (const element of elements) {
|
27
|
+
// Handle bound attributes like [title]="foo" or [title]="'foo'"
|
28
|
+
const boundAttr = element.getAttribute(`[${attributeName}]`);
|
29
|
+
if (boundAttr) {
|
30
|
+
element.setAttribute(`[${newAttributeName}]`, boundAttr);
|
31
|
+
element.removeAttribute(`[${attributeName}]`);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
};
|
35
|
+
exports.templateBoundAttributeTransformer = templateBoundAttributeTransformer;
|
36
|
+
const templateAttributeTransformer = (root, tagName, attributeName, newAttributeName) => {
|
37
|
+
(0, exports.templateBoundAttributeTransformer)(root, tagName, attributeName, newAttributeName);
|
38
|
+
(0, exports.templateStaticAttributeTransformer)(root, tagName, attributeName, newAttributeName);
|
39
|
+
};
|
40
|
+
exports.templateAttributeTransformer = templateAttributeTransformer;
|
41
|
+
const tsPropertyTransformer = (root, j, componentType, propertyName, newPropertyName) => {
|
42
|
+
// Find all class properties that are of type DropDownListComponent
|
43
|
+
const properties = new Set();
|
44
|
+
// Find properties with type annotations
|
45
|
+
root
|
46
|
+
.find(j.ClassProperty, {
|
47
|
+
typeAnnotation: {
|
48
|
+
typeAnnotation: {
|
49
|
+
typeName: {
|
50
|
+
name: componentType
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
})
|
55
|
+
.forEach(path => {
|
56
|
+
if (path.node.key.type === 'Identifier') {
|
57
|
+
properties.add(path.node.key.name);
|
58
|
+
}
|
59
|
+
});
|
60
|
+
// Find function parameters of type componentType
|
61
|
+
const parameters = new Set();
|
62
|
+
root
|
63
|
+
.find(j.FunctionDeclaration)
|
64
|
+
.forEach(path => {
|
65
|
+
if (path.node.params) {
|
66
|
+
path.node.params.forEach(param => {
|
67
|
+
if (param.type === 'Identifier' &&
|
68
|
+
param.typeAnnotation &&
|
69
|
+
param.typeAnnotation.typeAnnotation?.type === 'TSTypeReference' &&
|
70
|
+
param.typeAnnotation.typeAnnotation.typeName.type === 'Identifier' &&
|
71
|
+
param.typeAnnotation.typeAnnotation.typeName.name === componentType) {
|
72
|
+
parameters.add(param.name);
|
73
|
+
}
|
74
|
+
});
|
75
|
+
}
|
76
|
+
});
|
77
|
+
// Also check method declarations in classes
|
78
|
+
root
|
79
|
+
.find(j.ClassMethod)
|
80
|
+
.forEach(path => {
|
81
|
+
if (path.node.params) {
|
82
|
+
path.node.params.forEach(param => {
|
83
|
+
if (param.type === 'Identifier' &&
|
84
|
+
param.typeAnnotation &&
|
85
|
+
param.typeAnnotation.typeAnnotation?.type === 'TSTypeReference' &&
|
86
|
+
param.typeAnnotation.typeAnnotation.typeName.type === 'Identifier' &&
|
87
|
+
param.typeAnnotation.typeAnnotation.typeName.name === componentType) {
|
88
|
+
parameters.add(param.name);
|
89
|
+
}
|
90
|
+
});
|
91
|
+
}
|
92
|
+
});
|
93
|
+
// Find all member expressions where title property is accessed on any componentType instance
|
94
|
+
root
|
95
|
+
.find(j.MemberExpression, {
|
96
|
+
property: {
|
97
|
+
type: 'Identifier',
|
98
|
+
name: propertyName
|
99
|
+
}
|
100
|
+
})
|
101
|
+
.filter(path => {
|
102
|
+
// Filter to only include accesses on properties that are componentType instances
|
103
|
+
if (path.node.object.type === 'MemberExpression' &&
|
104
|
+
path.node.object.property.type === 'Identifier') {
|
105
|
+
// handle properties of this
|
106
|
+
if (path.node.object.object.type === 'ThisExpression' &&
|
107
|
+
properties.has(path.node.object.property.name)) {
|
108
|
+
return true;
|
109
|
+
}
|
110
|
+
}
|
111
|
+
// Handle function parameters
|
112
|
+
if (path.node.object.type === 'Identifier' &&
|
113
|
+
parameters.has(path.node.object.name)) {
|
114
|
+
return true;
|
115
|
+
}
|
116
|
+
return false;
|
117
|
+
})
|
118
|
+
.forEach(path => {
|
119
|
+
// Replace old property name with new property name
|
120
|
+
if (path.node.property.type === 'Identifier') {
|
121
|
+
path.node.property.name = newPropertyName;
|
122
|
+
}
|
123
|
+
});
|
124
|
+
};
|
125
|
+
exports.tsPropertyTransformer = tsPropertyTransformer;
|
126
|
+
const htmlStaticAttributeTransformer = (fileInfo, tagName, oldName, newName) => {
|
127
|
+
const fileContent = fileInfo.source;
|
128
|
+
const root = (0, node_html_parser_1.default)(fileContent);
|
129
|
+
let modified = false;
|
130
|
+
const elements = Array.from(root.querySelectorAll(tagName));
|
131
|
+
for (const element of elements) {
|
132
|
+
const staticAttr = element.getAttribute(oldName);
|
133
|
+
if (staticAttr) {
|
134
|
+
element.removeAttribute(oldName);
|
135
|
+
element.setAttribute(newName, staticAttr);
|
136
|
+
modified = true;
|
137
|
+
}
|
138
|
+
}
|
139
|
+
if (modified) {
|
140
|
+
return root.toString();
|
141
|
+
}
|
142
|
+
return fileContent;
|
143
|
+
};
|
144
|
+
exports.htmlStaticAttributeTransformer = htmlStaticAttributeTransformer;
|
145
|
+
const htmlBoundAttributeTransformer = (fileInfo, tagName, oldName, newName) => {
|
146
|
+
const fileContent = fileInfo.source;
|
147
|
+
const root = (0, node_html_parser_1.default)(fileContent);
|
148
|
+
let modified = false;
|
149
|
+
const elements = Array.from(root.querySelectorAll(tagName));
|
150
|
+
for (const element of elements) {
|
151
|
+
const boundAttr = element.getAttribute(`[${oldName}]`);
|
152
|
+
if (boundAttr) {
|
153
|
+
element.removeAttribute(`[${oldName}]`);
|
154
|
+
element.setAttribute(`[${newName}]`, boundAttr);
|
155
|
+
modified = true;
|
156
|
+
}
|
157
|
+
}
|
158
|
+
if (modified) {
|
159
|
+
return root.toString();
|
160
|
+
}
|
161
|
+
return fileContent;
|
162
|
+
};
|
163
|
+
exports.htmlBoundAttributeTransformer = htmlBoundAttributeTransformer;
|
164
|
+
const htmlAttributeTransformer = (fileInfo, tagName, oldName, newName) => {
|
165
|
+
let content = (0, exports.htmlBoundAttributeTransformer)(fileInfo, tagName, oldName, newName);
|
166
|
+
content = (0, exports.htmlStaticAttributeTransformer)({ path: fileInfo.path, source: content }, tagName, oldName, newName);
|
167
|
+
return content;
|
168
|
+
};
|
169
|
+
exports.htmlAttributeTransformer = htmlAttributeTransformer;
|
170
|
+
const templateAttributeValueTransformer = (root, tagName, attributeName, oldAttributeValue, newAttributeValue) => {
|
171
|
+
const elements = Array.from(root.getElementsByTagName(tagName)) || [];
|
172
|
+
for (const element of elements) {
|
173
|
+
// Handle bound attributes (e.g., [showText]="'overflow'")
|
174
|
+
const boundAttr = element.getAttribute(`[${attributeName}]`);
|
175
|
+
if (boundAttr === `'${oldAttributeValue}'`) {
|
176
|
+
// For bound literals like [showText]="'overflow'" or [showText]="\"overflow\""
|
177
|
+
element.setAttribute(`[${attributeName}]`, boundAttr.replace(oldAttributeValue, newAttributeValue));
|
178
|
+
}
|
179
|
+
// Handle static attributes like title="foo"
|
180
|
+
const staticAttrValue = element.getAttribute(attributeName);
|
181
|
+
if (staticAttrValue === oldAttributeValue) {
|
182
|
+
element.setAttribute(attributeName, newAttributeValue);
|
183
|
+
}
|
184
|
+
}
|
185
|
+
};
|
186
|
+
exports.templateAttributeValueTransformer = templateAttributeValueTransformer;
|
187
|
+
const tsPropertyValueTransformer = (root, j, typeName, oldValue, newValue) => {
|
188
|
+
// 1. Find all class properties with the specified type
|
189
|
+
root
|
190
|
+
.find(j.ClassProperty)
|
191
|
+
.filter(path => {
|
192
|
+
// Check if the property has a type annotation matching the specified type
|
193
|
+
if (path.node.typeAnnotation?.typeAnnotation &&
|
194
|
+
path.node.typeAnnotation.typeAnnotation.type === 'TSTypeReference' &&
|
195
|
+
path.node.typeAnnotation.typeAnnotation.typeName &&
|
196
|
+
path.node.typeAnnotation.typeAnnotation.typeName.type === 'Identifier' &&
|
197
|
+
path.node.typeAnnotation.typeAnnotation.typeName.name === typeName) {
|
198
|
+
return true;
|
199
|
+
}
|
200
|
+
return false;
|
201
|
+
})
|
202
|
+
.forEach(path => {
|
203
|
+
// Update the value if it matches the old value
|
204
|
+
if (path.node.value &&
|
205
|
+
path.node.value.type === 'StringLiteral' &&
|
206
|
+
path.node.value.value === oldValue) {
|
207
|
+
path.node.value.value = newValue;
|
208
|
+
}
|
209
|
+
});
|
210
|
+
// 2. Find all assignments to variables of the specified type
|
211
|
+
const variablesOfType = new Set();
|
212
|
+
// First, collect all variables with the specified type
|
213
|
+
root
|
214
|
+
.find(j.VariableDeclarator)
|
215
|
+
.filter(path => {
|
216
|
+
if (path.node.id.type === 'Identifier' &&
|
217
|
+
path.node.id.typeAnnotation?.typeAnnotation &&
|
218
|
+
path.node.id.typeAnnotation.typeAnnotation.type === 'TSTypeReference' &&
|
219
|
+
path.node.id.typeAnnotation.typeAnnotation.typeName.type === 'Identifier' &&
|
220
|
+
path.node.id.typeAnnotation.typeAnnotation.typeName.name === typeName) {
|
221
|
+
return true;
|
222
|
+
}
|
223
|
+
return false;
|
224
|
+
})
|
225
|
+
.forEach(path => {
|
226
|
+
if (path.node.id.type === 'Identifier') {
|
227
|
+
variablesOfType.add(path.node.id.name);
|
228
|
+
// Also update the initial value if it matches
|
229
|
+
if (path.node.init &&
|
230
|
+
path.node.init.type === 'StringLiteral' &&
|
231
|
+
path.node.init.value === oldValue) {
|
232
|
+
path.node.init.value = newValue;
|
233
|
+
}
|
234
|
+
}
|
235
|
+
});
|
236
|
+
// 3. Update literals in assignment expressions
|
237
|
+
root
|
238
|
+
.find(j.AssignmentExpression)
|
239
|
+
.filter(path => {
|
240
|
+
// Only process string literals with the old value
|
241
|
+
return path.node.right.type === 'StringLiteral' &&
|
242
|
+
path.node.right.value === oldValue;
|
243
|
+
})
|
244
|
+
.forEach(path => {
|
245
|
+
// Update the value
|
246
|
+
path.node.right.value = newValue;
|
247
|
+
});
|
248
|
+
// 4. Also look for string literals in attributes within JSX elements
|
249
|
+
root
|
250
|
+
.find(j.JSXAttribute, {
|
251
|
+
value: {
|
252
|
+
type: 'StringLiteral',
|
253
|
+
value: oldValue
|
254
|
+
}
|
255
|
+
})
|
256
|
+
.forEach(path => {
|
257
|
+
if (path.node.value?.type === 'StringLiteral') {
|
258
|
+
path.node.value.value = newValue;
|
259
|
+
}
|
260
|
+
});
|
261
|
+
};
|
262
|
+
exports.tsPropertyValueTransformer = tsPropertyValueTransformer;
|
263
|
+
const htmlAttributeValueTransformer = (fileInfo, tagName, attributeName, oldValue, newValue) => {
|
264
|
+
// Read file content from fileInfo
|
265
|
+
const fileContent = fileInfo.source;
|
266
|
+
// Parse the HTML content
|
267
|
+
const root = (0, node_html_parser_1.default)(fileContent);
|
268
|
+
// Find all elements matching the tagName
|
269
|
+
const elements = root.querySelectorAll(tagName);
|
270
|
+
let modified = false;
|
271
|
+
// Process each element
|
272
|
+
for (const element of elements) {
|
273
|
+
// Handle static attributes (e.g., showText="overflow")
|
274
|
+
const staticAttr = element.getAttribute(attributeName);
|
275
|
+
if (staticAttr === oldValue) {
|
276
|
+
element.setAttribute(attributeName, newValue);
|
277
|
+
modified = true;
|
278
|
+
console.log(`Modified static attribute ${attributeName} from "${oldValue}" to "${newValue}" in element:`, element.toString().substring(0, 100));
|
279
|
+
}
|
280
|
+
// Handle bound attributes (e.g., [showText]="overflow")
|
281
|
+
const boundAttr = element.getAttribute(`[${attributeName}]`);
|
282
|
+
if (boundAttr) {
|
283
|
+
// For bound literals like [showText]="'overflow'" or [showText]="\"overflow\""
|
284
|
+
if (boundAttr === `'${oldValue}'` || boundAttr === `"${oldValue}"`) {
|
285
|
+
const updatedValue = boundAttr.replace(oldValue, newValue);
|
286
|
+
element.setAttribute(`[${attributeName}]`, updatedValue);
|
287
|
+
modified = true;
|
288
|
+
console.log(`Modified bound attribute [${attributeName}] from "${boundAttr}" to "${updatedValue}" in element:`, element.toString().substring(0, 100));
|
289
|
+
}
|
290
|
+
}
|
291
|
+
}
|
292
|
+
// Return modified content if changes were made
|
293
|
+
if (modified) {
|
294
|
+
const updatedContent = root.toString();
|
295
|
+
return updatedContent;
|
296
|
+
}
|
297
|
+
// Return original content if no changes were made or if there was an error
|
298
|
+
return fileContent;
|
299
|
+
};
|
300
|
+
exports.htmlAttributeValueTransformer = htmlAttributeValueTransformer;
|
301
|
+
const htmlAttributeRemoval = (fileInfo, tagName, attributeName, propertyToRemove) => {
|
302
|
+
const filePath = fileInfo.path;
|
303
|
+
const fileContent = fileInfo.source;
|
304
|
+
const root = (0, node_html_parser_1.default)(fileContent);
|
305
|
+
// Use the same logic as templateAttributeRemoval
|
306
|
+
const elements = root.querySelectorAll(tagName);
|
307
|
+
for (const element of elements) {
|
308
|
+
// Look for bound attribute (e.g., [scrollable]="...")
|
309
|
+
const boundAttr = element.getAttribute(`[${attributeName}]`);
|
310
|
+
if (boundAttr) {
|
311
|
+
// Check if it's an object literal
|
312
|
+
if (boundAttr.trim().startsWith('{') && boundAttr.trim().endsWith('}')) {
|
313
|
+
// Process object literal like {mouseScrollSpeed: 10000}
|
314
|
+
const objectLiteral = boundAttr.trim();
|
315
|
+
// Build a regex that matches the property and its value
|
316
|
+
// This handles various formats like {prop: value}, { prop: value }, etc.
|
317
|
+
const propRegex = new RegExp(`\\s*${propertyToRemove}\\s*:\\s*[^,}]+\\s*(,\\s*)?`, 'g');
|
318
|
+
// Remove the property and any trailing comma
|
319
|
+
let newObjectLiteral = objectLiteral.replace(propRegex, '');
|
320
|
+
// Fix syntax if we removed the last property with trailing comma
|
321
|
+
newObjectLiteral = newObjectLiteral.replace(/,\s*}$/, '}');
|
322
|
+
// If the object is now empty, remove the attribute completely
|
323
|
+
if (newObjectLiteral === '{}') {
|
324
|
+
element.removeAttribute(`[${attributeName}]`);
|
325
|
+
}
|
326
|
+
else {
|
327
|
+
element.setAttribute(`[${attributeName}]`, newObjectLiteral);
|
328
|
+
}
|
329
|
+
}
|
330
|
+
// Check if it's a variable reference to an object
|
331
|
+
else {
|
332
|
+
// For variable references, we can't modify them in the template
|
333
|
+
// We should warn the user or handle this case specially
|
334
|
+
console.warn(`Cannot remove property from variable reference: ${boundAttr} in file ${filePath}`);
|
335
|
+
}
|
336
|
+
}
|
337
|
+
}
|
338
|
+
// Return the modified HTML content
|
339
|
+
return root.toString();
|
340
|
+
};
|
341
|
+
exports.htmlAttributeRemoval = htmlAttributeRemoval;
|
342
|
+
/**
|
343
|
+
* Removes a specified property from an object binding in HTML templates
|
344
|
+
*
|
345
|
+
* @param root - The HTML root element
|
346
|
+
* @param tagName - The tag to search for (e.g., 'kendo-tabstrip')
|
347
|
+
* @param attributeName - The attribute containing the object binding (e.g., 'scrollable')
|
348
|
+
* @param propertyToRemove - The property to remove from the object (e.g., 'mouseScrollSpeed')
|
349
|
+
*/
|
350
|
+
const templateAttributeRemoval = (root, tagName, attributeName, propertyToRemove) => {
|
351
|
+
const elements = root.querySelectorAll(tagName);
|
352
|
+
for (const element of elements) {
|
353
|
+
// Look for bound attribute (e.g., [scrollable]="...")
|
354
|
+
const boundAttr = element.getAttribute(`[${attributeName}]`);
|
355
|
+
if (boundAttr) {
|
356
|
+
// Check if it's an object literal
|
357
|
+
if (boundAttr.trim().startsWith('{') && boundAttr.trim().endsWith('}')) {
|
358
|
+
// Process object literal like {mouseScrollSpeed: 10000}
|
359
|
+
const objectLiteral = boundAttr.trim();
|
360
|
+
// Build a regex that matches the property and its value
|
361
|
+
// This handles various formats like {prop: value}, { prop: value }, etc.
|
362
|
+
const propRegex = new RegExp(`\\s*${propertyToRemove}\\s*:\\s*[^,}]+\\s*(,\\s*)?`, 'g');
|
363
|
+
// Remove the property and any trailing comma
|
364
|
+
let newObjectLiteral = objectLiteral.replace(propRegex, '');
|
365
|
+
// Fix syntax if we removed the last property with trailing comma
|
366
|
+
newObjectLiteral = newObjectLiteral.replace(/,\s*}$/, '}');
|
367
|
+
// If the object is now empty, remove the attribute completely
|
368
|
+
if (newObjectLiteral === '{}') {
|
369
|
+
element.removeAttribute(`[${attributeName}]`);
|
370
|
+
}
|
371
|
+
else {
|
372
|
+
element.setAttribute(`[${attributeName}]`, newObjectLiteral);
|
373
|
+
}
|
374
|
+
}
|
375
|
+
// Check if it's a variable reference to an object
|
376
|
+
else {
|
377
|
+
// For variable references, we can't modify them in the template
|
378
|
+
// We should warn the user or handle this case specially
|
379
|
+
console.warn(`Cannot remove property from variable reference: ${boundAttr}`);
|
380
|
+
}
|
381
|
+
}
|
382
|
+
}
|
383
|
+
};
|
384
|
+
exports.templateAttributeRemoval = templateAttributeRemoval;
|
385
|
+
/**
|
386
|
+
* Removes a property from object literals of a specified type
|
387
|
+
*
|
388
|
+
* @param root - The AST root
|
389
|
+
* @param j - The JSCodeshift instance
|
390
|
+
* @param typeName - The type to target (e.g., 'TabStripScrollableSettings')
|
391
|
+
* @param propertyToRemove - The property to remove (e.g., 'mouseScrollSpeed')
|
392
|
+
*/
|
393
|
+
function tsPropertyRemoval(rootSource, j, typeName, propertyName) {
|
394
|
+
// Find class properties that have the specified type
|
395
|
+
rootSource
|
396
|
+
.find(j.ClassProperty, {
|
397
|
+
typeAnnotation: {
|
398
|
+
typeAnnotation: {
|
399
|
+
typeName: {
|
400
|
+
name: typeName
|
401
|
+
}
|
402
|
+
}
|
403
|
+
}
|
404
|
+
})
|
405
|
+
.forEach(path => {
|
406
|
+
// Check if there's an object literal initializer
|
407
|
+
if (path.node.value && path.node.value.type === 'ObjectExpression') {
|
408
|
+
const properties = path.node.value.properties;
|
409
|
+
// Find the property we want to remove - safely handle different property types
|
410
|
+
const propIndex = properties.findIndex((p) => p.type === 'ObjectProperty' &&
|
411
|
+
p.key &&
|
412
|
+
p.key.type === 'Identifier' &&
|
413
|
+
p.key.name === propertyName);
|
414
|
+
if (propIndex !== -1) {
|
415
|
+
// If property exists, remove it
|
416
|
+
// Case 1: If it's the only property, remove the entire class property
|
417
|
+
if (properties.length === 1) {
|
418
|
+
j(path).remove();
|
419
|
+
}
|
420
|
+
// Case 2: If there are other properties, just remove this one property
|
421
|
+
else {
|
422
|
+
properties.splice(propIndex, 1);
|
423
|
+
}
|
424
|
+
}
|
425
|
+
}
|
426
|
+
});
|
427
|
+
// Also handle property assignments (e.g., in methods like ngOnInit)
|
428
|
+
rootSource
|
429
|
+
.find(j.AssignmentExpression, {
|
430
|
+
left: {
|
431
|
+
type: 'MemberExpression',
|
432
|
+
object: {
|
433
|
+
type: 'MemberExpression'
|
434
|
+
},
|
435
|
+
property: {
|
436
|
+
name: propertyName
|
437
|
+
}
|
438
|
+
}
|
439
|
+
})
|
440
|
+
.forEach(path => {
|
441
|
+
j(path).remove();
|
442
|
+
});
|
443
|
+
return rootSource;
|
444
|
+
}
|
445
|
+
exports.tsPropertyRemoval = tsPropertyRemoval;
|
446
|
+
/**
|
447
|
+
* Removes assignments to a specific nested property of a component
|
448
|
+
*
|
449
|
+
* @param root - The AST root
|
450
|
+
* @param j - The JSCodeshift instance
|
451
|
+
* @param componentType - The component type to target (e.g., 'TabStripComponent')
|
452
|
+
* @param componentProperty - The component property (e.g., 'scrollable')
|
453
|
+
* @param propertyToRemove - The nested property to remove assignments to (e.g., 'mouseScrollSpeed')
|
454
|
+
*/
|
455
|
+
const tsComponentPropertyRemoval = (root, j, componentType, componentProperty, propertyToRemove) => {
|
456
|
+
// CASE 1: Handle direct property assignments like: foo.scrollable.mouseScrollSpeed = 3000;
|
457
|
+
root
|
458
|
+
.find(j.AssignmentExpression)
|
459
|
+
.filter((path) => {
|
460
|
+
const { left } = path.value;
|
461
|
+
// Check if this is a member expression assignment
|
462
|
+
if (left && left.type === 'MemberExpression') {
|
463
|
+
// Check if we're accessing the property to remove
|
464
|
+
if (left.property && left.property.name === propertyToRemove) {
|
465
|
+
// Check if we're accessing it from component.componentProperty
|
466
|
+
const obj = left.object;
|
467
|
+
if (obj && obj.type === 'MemberExpression' &&
|
468
|
+
obj.property && obj.property.name === componentProperty) {
|
469
|
+
// Now check if the base object is our component type
|
470
|
+
return isComponentTypeMatch(root, j, obj.object, componentType);
|
471
|
+
}
|
472
|
+
}
|
473
|
+
}
|
474
|
+
return false;
|
475
|
+
})
|
476
|
+
.forEach((path) => {
|
477
|
+
// Remove the entire statement
|
478
|
+
j(path).closest(j.ExpressionStatement).remove();
|
479
|
+
});
|
480
|
+
// CASE 2 & 3: Handle object assignments like: foo.scrollable = { mouseScrollSpeed: 3000, ... };
|
481
|
+
root
|
482
|
+
.find(j.AssignmentExpression)
|
483
|
+
.filter((path) => {
|
484
|
+
const { left, right } = path.value;
|
485
|
+
// Check if this assigns to component.componentProperty
|
486
|
+
if (left && left.type === 'MemberExpression' &&
|
487
|
+
left.property && left.property.name === componentProperty &&
|
488
|
+
right && right.type === 'ObjectExpression') {
|
489
|
+
// Check if the base object is our component type
|
490
|
+
return isComponentTypeMatch(root, j, left.object, componentType);
|
491
|
+
}
|
492
|
+
return false;
|
493
|
+
})
|
494
|
+
.forEach((path) => {
|
495
|
+
const properties = path.value.right.properties;
|
496
|
+
// Find the property we want to remove
|
497
|
+
const propIndex = properties.findIndex((p) => p && p.type === 'ObjectProperty' &&
|
498
|
+
p.key && p.key.type === 'Identifier' &&
|
499
|
+
p.key.name === propertyToRemove);
|
500
|
+
if (propIndex !== -1) {
|
501
|
+
// Case 2: If it's the only property, remove the entire statement
|
502
|
+
if (properties.length === 1) {
|
503
|
+
j(path).closest(j.ExpressionStatement).remove();
|
504
|
+
}
|
505
|
+
// Case 3: If there are other properties, just remove this one property
|
506
|
+
else {
|
507
|
+
properties.splice(propIndex, 1);
|
508
|
+
}
|
509
|
+
}
|
510
|
+
});
|
511
|
+
return root;
|
512
|
+
};
|
513
|
+
exports.tsComponentPropertyRemoval = tsComponentPropertyRemoval;
|
514
|
+
// Helper function to check if a node is a component of the specified type
|
515
|
+
function isComponentTypeMatch(root, j, node, componentType) {
|
516
|
+
if (!node)
|
517
|
+
return false;
|
518
|
+
// Case 1: Direct match for 'this.propertyName'
|
519
|
+
if (node.type === 'ThisExpression') {
|
520
|
+
return true; // Assuming 'this' refers to the component class
|
521
|
+
}
|
522
|
+
// Case 2: Function parameter
|
523
|
+
if (node.type === 'Identifier') {
|
524
|
+
const paramName = node.name;
|
525
|
+
// Check function parameters
|
526
|
+
return root
|
527
|
+
.find(j.Function)
|
528
|
+
.some(path => {
|
529
|
+
return path.node.params && path.node.params.some((param) => param.type === 'Identifier' &&
|
530
|
+
param.name === paramName &&
|
531
|
+
param.typeAnnotation?.typeAnnotation?.typeName?.name === componentType);
|
532
|
+
});
|
533
|
+
}
|
534
|
+
// Case 3: Member expression (obj.prop)
|
535
|
+
if (node.type === 'MemberExpression') {
|
536
|
+
// This would need more complex logic to determine if the object is of the right type
|
537
|
+
// For now, we can check if it's a property that has been declared with the right type
|
538
|
+
if (node.object.type === 'ThisExpression' && node.property.type === 'Identifier') {
|
539
|
+
const propName = node.property.name;
|
540
|
+
return root
|
541
|
+
.find(j.ClassProperty, {
|
542
|
+
key: { name: propName },
|
543
|
+
typeAnnotation: {
|
544
|
+
typeAnnotation: {
|
545
|
+
typeName: { name: componentType }
|
546
|
+
}
|
547
|
+
}
|
548
|
+
})
|
549
|
+
.size() > 0;
|
550
|
+
}
|
551
|
+
}
|
552
|
+
return false;
|
553
|
+
}
|
@@ -0,0 +1,56 @@
|
|
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
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
7
|
+
if (k2 === undefined) k2 = k;
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
11
|
+
}
|
12
|
+
Object.defineProperty(o, k2, desc);
|
13
|
+
}) : (function(o, m, k, k2) {
|
14
|
+
if (k2 === undefined) k2 = k;
|
15
|
+
o[k2] = m[k];
|
16
|
+
}));
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
19
|
+
}) : function(o, v) {
|
20
|
+
o["default"] = v;
|
21
|
+
});
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
23
|
+
if (mod && mod.__esModule) return mod;
|
24
|
+
var result = {};
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
26
|
+
__setModuleDefault(result, mod);
|
27
|
+
return result;
|
28
|
+
};
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
30
|
+
const index_1 = require("../template-transformer/index");
|
31
|
+
const utils_1 = require("../utils");
|
32
|
+
const fs = __importStar(require("fs"));
|
33
|
+
function default_1(fileInfo, api) {
|
34
|
+
const filePath = fileInfo.path;
|
35
|
+
// Check if the file is an HTML file
|
36
|
+
if (filePath.endsWith('.html')) {
|
37
|
+
const filePath = fileInfo.path;
|
38
|
+
let updatedContent = fileInfo.source;
|
39
|
+
updatedContent = (0, utils_1.htmlAttributeRemoval)({ ...fileInfo, source: updatedContent }, 'kendo-tabstrip', 'scrollable', 'mouseScrollSpeed');
|
40
|
+
// Only write to file once after all transformations
|
41
|
+
fs.writeFileSync(filePath, updatedContent, 'utf-8');
|
42
|
+
return;
|
43
|
+
}
|
44
|
+
const j = api.jscodeshift;
|
45
|
+
const rootSource = j(fileInfo.source);
|
46
|
+
(0, index_1.templateTransformer)(rootSource, j, (root) => {
|
47
|
+
// Using node-html-parser to parse and manipulate the template: https://github.com/taoqf/node-html-parser
|
48
|
+
(0, utils_1.templateAttributeRemoval)(root, 'kendo-tabstrip', 'scrollable', 'mouseScrollSpeed');
|
49
|
+
});
|
50
|
+
// Remove mouseScrollSpeed property from TabStripScrollableSettings type
|
51
|
+
(0, utils_1.tsPropertyRemoval)(rootSource, j, 'TabStripScrollableSettings', 'mouseScrollSpeed');
|
52
|
+
// Remove assignments to tabstrip.scrollable.mouseScrollSpeed
|
53
|
+
(0, utils_1.tsComponentPropertyRemoval)(rootSource, j, 'TabStripComponent', 'scrollable', 'mouseScrollSpeed');
|
54
|
+
return rootSource.toSource();
|
55
|
+
}
|
56
|
+
exports.default = default_1;
|
@@ -10,7 +10,7 @@ export const packageMetadata = {
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
11
11
|
productCode: 'KENDOUIANGULAR',
|
12
12
|
productCodes: ['KENDOUIANGULAR'],
|
13
|
-
publishDate:
|
14
|
-
version: '19.0.
|
13
|
+
publishDate: 1748425236,
|
14
|
+
version: '19.0.1-develop.1',
|
15
15
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
16
16
|
};
|
@@ -2,10 +2,6 @@
|
|
2
2
|
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
|
-
/**
|
6
|
-
* @hidden
|
7
|
-
*/
|
8
|
-
export const MOUSE_SCROLL_SPEED = 10;
|
9
5
|
/**
|
10
6
|
* @hidden
|
11
7
|
*/
|
@@ -2,16 +2,15 @@
|
|
2
2
|
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
|
-
import { BUTTON_SCROLL_SPEED
|
5
|
+
import { BUTTON_SCROLL_SPEED } from "../constants";
|
6
6
|
/**
|
7
7
|
* @hidden
|
8
8
|
*/
|
9
|
-
const normalizeSettings = ({ enabled = true, scrollButtons = 'auto', mouseScroll = true, buttonScrollSpeed = BUTTON_SCROLL_SPEED,
|
9
|
+
const normalizeSettings = ({ enabled = true, scrollButtons = 'auto', mouseScroll = true, buttonScrollSpeed = BUTTON_SCROLL_SPEED, scrollButtonsPosition = 'split', prevButtonIcon, nextButtonIcon, prevSVGButtonIcon, nextSVGButtonIcon }) => ({
|
10
10
|
enabled,
|
11
11
|
scrollButtons,
|
12
12
|
mouseScroll,
|
13
13
|
buttonScrollSpeed,
|
14
|
-
mouseScrollSpeed,
|
15
14
|
scrollButtonsPosition,
|
16
15
|
prevButtonIcon,
|
17
16
|
nextButtonIcon,
|
@@ -63,7 +63,7 @@ export class TabStripService {
|
|
63
63
|
if (!NgZone.isInAngularZone()) {
|
64
64
|
this.ngZone.run(() => {
|
65
65
|
if (activeIndex < 0) {
|
66
|
-
this.owner.selectTab(this.
|
66
|
+
this.owner.selectTab(this.firstNavigableIndex());
|
67
67
|
return;
|
68
68
|
}
|
69
69
|
activeTab.focused = false;
|
@@ -113,14 +113,14 @@ export class TabStripService {
|
|
113
113
|
switch (keyCode) {
|
114
114
|
case this.invertKeys(Keys.ArrowLeft, Keys.ArrowRight):
|
115
115
|
case this.invertKeys(Keys.ArrowUp, Keys.ArrowDown):
|
116
|
-
return this.
|
116
|
+
return this.prevNavigableIndex(activeIndex);
|
117
117
|
case this.invertKeys(Keys.ArrowRight, Keys.ArrowLeft):
|
118
118
|
case this.invertKeys(Keys.ArrowDown, Keys.ArrowUp):
|
119
|
-
return this.
|
119
|
+
return this.nextNavigableIndex(activeIndex);
|
120
120
|
case Keys.Home:
|
121
|
-
return this.
|
121
|
+
return this.firstNavigableIndex();
|
122
122
|
case Keys.End:
|
123
|
-
return this.
|
123
|
+
return this.lastNavigableIndex();
|
124
124
|
default:
|
125
125
|
return;
|
126
126
|
}
|
@@ -128,21 +128,21 @@ export class TabStripService {
|
|
128
128
|
invertKeys(original, inverted) {
|
129
129
|
return this.localization.rtl ? inverted : original;
|
130
130
|
}
|
131
|
-
|
131
|
+
firstNavigableIndex() {
|
132
132
|
return 0;
|
133
133
|
}
|
134
|
-
|
134
|
+
lastNavigableIndex() {
|
135
135
|
return this.owner.tabs.length - 1;
|
136
136
|
}
|
137
|
-
|
137
|
+
prevNavigableIndex(selectedIndex) {
|
138
138
|
if (selectedIndex - 1 < 0) {
|
139
|
-
return this.
|
139
|
+
return this.lastNavigableIndex();
|
140
140
|
}
|
141
141
|
return selectedIndex - 1;
|
142
142
|
}
|
143
|
-
|
143
|
+
nextNavigableIndex(selectedIndex) {
|
144
144
|
if (selectedIndex + 1 >= this.owner.tabs.length) {
|
145
|
-
return this.
|
145
|
+
return this.firstNavigableIndex();
|
146
146
|
}
|
147
147
|
return selectedIndex + 1;
|
148
148
|
}
|
@@ -87,12 +87,12 @@ export class TileLayoutComponent {
|
|
87
87
|
*/
|
88
88
|
autoFlow = 'column';
|
89
89
|
/**
|
90
|
-
*
|
91
|
-
* By default, navigation is
|
90
|
+
* When the keyboard navigation is enabled, the user can use dedicated shortcuts to interact with the TileLayout.
|
91
|
+
* By default, navigation is enabled. To disable it and include focusable TileLayout content as a part of the natural tab sequence of the page, set the property to `false`.
|
92
92
|
*
|
93
|
-
* @default
|
93
|
+
* @default true
|
94
94
|
*/
|
95
|
-
navigable =
|
95
|
+
navigable = true;
|
96
96
|
/**
|
97
97
|
* Fires when the user completes the reordering of the item ([see example]({% slug reordering_tilelayout %})).
|
98
98
|
* This event is preventable. If you cancel it, the item will not be reordered.
|
@@ -29,8 +29,8 @@ const packageMetadata = {
|
|
29
29
|
productName: 'Kendo UI for Angular',
|
30
30
|
productCode: 'KENDOUIANGULAR',
|
31
31
|
productCodes: ['KENDOUIANGULAR'],
|
32
|
-
publishDate:
|
33
|
-
version: '19.0.
|
32
|
+
publishDate: 1748425236,
|
33
|
+
version: '19.0.1-develop.1',
|
34
34
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
35
35
|
};
|
36
36
|
|
@@ -3209,7 +3209,7 @@ class TabStripService {
|
|
3209
3209
|
if (!NgZone.isInAngularZone()) {
|
3210
3210
|
this.ngZone.run(() => {
|
3211
3211
|
if (activeIndex < 0) {
|
3212
|
-
this.owner.selectTab(this.
|
3212
|
+
this.owner.selectTab(this.firstNavigableIndex());
|
3213
3213
|
return;
|
3214
3214
|
}
|
3215
3215
|
activeTab.focused = false;
|
@@ -3259,14 +3259,14 @@ class TabStripService {
|
|
3259
3259
|
switch (keyCode) {
|
3260
3260
|
case this.invertKeys(Keys.ArrowLeft, Keys.ArrowRight):
|
3261
3261
|
case this.invertKeys(Keys.ArrowUp, Keys.ArrowDown):
|
3262
|
-
return this.
|
3262
|
+
return this.prevNavigableIndex(activeIndex);
|
3263
3263
|
case this.invertKeys(Keys.ArrowRight, Keys.ArrowLeft):
|
3264
3264
|
case this.invertKeys(Keys.ArrowDown, Keys.ArrowUp):
|
3265
|
-
return this.
|
3265
|
+
return this.nextNavigableIndex(activeIndex);
|
3266
3266
|
case Keys.Home:
|
3267
|
-
return this.
|
3267
|
+
return this.firstNavigableIndex();
|
3268
3268
|
case Keys.End:
|
3269
|
-
return this.
|
3269
|
+
return this.lastNavigableIndex();
|
3270
3270
|
default:
|
3271
3271
|
return;
|
3272
3272
|
}
|
@@ -3274,21 +3274,21 @@ class TabStripService {
|
|
3274
3274
|
invertKeys(original, inverted) {
|
3275
3275
|
return this.localization.rtl ? inverted : original;
|
3276
3276
|
}
|
3277
|
-
|
3277
|
+
firstNavigableIndex() {
|
3278
3278
|
return 0;
|
3279
3279
|
}
|
3280
|
-
|
3280
|
+
lastNavigableIndex() {
|
3281
3281
|
return this.owner.tabs.length - 1;
|
3282
3282
|
}
|
3283
|
-
|
3283
|
+
prevNavigableIndex(selectedIndex) {
|
3284
3284
|
if (selectedIndex - 1 < 0) {
|
3285
|
-
return this.
|
3285
|
+
return this.lastNavigableIndex();
|
3286
3286
|
}
|
3287
3287
|
return selectedIndex - 1;
|
3288
3288
|
}
|
3289
|
-
|
3289
|
+
nextNavigableIndex(selectedIndex) {
|
3290
3290
|
if (selectedIndex + 1 >= this.owner.tabs.length) {
|
3291
|
-
return this.
|
3291
|
+
return this.firstNavigableIndex();
|
3292
3292
|
}
|
3293
3293
|
return selectedIndex + 1;
|
3294
3294
|
}
|
@@ -3299,10 +3299,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
3299
3299
|
type: Injectable
|
3300
3300
|
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.NgZone }]; } });
|
3301
3301
|
|
3302
|
-
/**
|
3303
|
-
* @hidden
|
3304
|
-
*/
|
3305
|
-
const MOUSE_SCROLL_SPEED = 10;
|
3306
3302
|
/**
|
3307
3303
|
* @hidden
|
3308
3304
|
*/
|
@@ -3497,12 +3493,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
3497
3493
|
/**
|
3498
3494
|
* @hidden
|
3499
3495
|
*/
|
3500
|
-
const normalizeSettings = ({ enabled = true, scrollButtons = 'auto', mouseScroll = true, buttonScrollSpeed = BUTTON_SCROLL_SPEED,
|
3496
|
+
const normalizeSettings = ({ enabled = true, scrollButtons = 'auto', mouseScroll = true, buttonScrollSpeed = BUTTON_SCROLL_SPEED, scrollButtonsPosition = 'split', prevButtonIcon, nextButtonIcon, prevSVGButtonIcon, nextSVGButtonIcon }) => ({
|
3501
3497
|
enabled,
|
3502
3498
|
scrollButtons,
|
3503
3499
|
mouseScroll,
|
3504
3500
|
buttonScrollSpeed,
|
3505
|
-
mouseScrollSpeed,
|
3506
3501
|
scrollButtonsPosition,
|
3507
3502
|
prevButtonIcon,
|
3508
3503
|
nextButtonIcon,
|
@@ -9621,7 +9616,7 @@ class TileLayoutKeyboardNavigationService {
|
|
9621
9616
|
zone;
|
9622
9617
|
renderer;
|
9623
9618
|
localization;
|
9624
|
-
navigable = new BehaviorSubject(
|
9619
|
+
navigable = new BehaviorSubject(true);
|
9625
9620
|
owner;
|
9626
9621
|
mousedown;
|
9627
9622
|
localizationSubscription;
|
@@ -10230,12 +10225,12 @@ class TileLayoutComponent {
|
|
10230
10225
|
*/
|
10231
10226
|
autoFlow = 'column';
|
10232
10227
|
/**
|
10233
|
-
*
|
10234
|
-
* By default, navigation is
|
10228
|
+
* When the keyboard navigation is enabled, the user can use dedicated shortcuts to interact with the TileLayout.
|
10229
|
+
* By default, navigation is enabled. To disable it and include focusable TileLayout content as a part of the natural tab sequence of the page, set the property to `false`.
|
10235
10230
|
*
|
10236
|
-
* @default
|
10231
|
+
* @default true
|
10237
10232
|
*/
|
10238
|
-
navigable =
|
10233
|
+
navigable = true;
|
10239
10234
|
/**
|
10240
10235
|
* Fires when the user completes the reordering of the item ([see example]({% slug reordering_tilelayout %})).
|
10241
10236
|
* This event is preventable. If you cancel it, the item will not be reordered.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@progress/kendo-angular-layout",
|
3
|
-
"version": "19.0.
|
3
|
+
"version": "19.0.1-develop.1",
|
4
4
|
"description": "Kendo UI for Angular Layout Package - a collection of components to create professional application layoyts",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
6
6
|
"author": "Progress",
|
@@ -32,10 +32,25 @@
|
|
32
32
|
],
|
33
33
|
"@progress": {
|
34
34
|
"friendlyName": "Layout",
|
35
|
+
"migrations": {
|
36
|
+
"options": {
|
37
|
+
"parser": "tsx",
|
38
|
+
"pattern": "*.{ts,html}"
|
39
|
+
},
|
40
|
+
"codemods": {
|
41
|
+
"19": [
|
42
|
+
{
|
43
|
+
"description": "mousescrollspeed of TabStripScrollableSettings is deprecated",
|
44
|
+
"file": "codemods/v19/tabstrip-mousescrollspeed.js",
|
45
|
+
"prompt": "true"
|
46
|
+
}
|
47
|
+
]
|
48
|
+
}
|
49
|
+
},
|
35
50
|
"package": {
|
36
51
|
"productName": "Kendo UI for Angular",
|
37
52
|
"productCode": "KENDOUIANGULAR",
|
38
|
-
"publishDate":
|
53
|
+
"publishDate": 1748425236,
|
39
54
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"
|
40
55
|
}
|
41
56
|
},
|
@@ -45,17 +60,17 @@
|
|
45
60
|
"@angular/core": "16 - 19",
|
46
61
|
"@angular/platform-browser": "16 - 19",
|
47
62
|
"@progress/kendo-licensing": "^1.5.0",
|
48
|
-
"@progress/kendo-angular-common": "19.0.
|
49
|
-
"@progress/kendo-angular-l10n": "19.0.
|
50
|
-
"@progress/kendo-angular-progressbar": "19.0.
|
51
|
-
"@progress/kendo-angular-icons": "19.0.
|
52
|
-
"@progress/kendo-angular-buttons": "19.0.
|
53
|
-
"@progress/kendo-angular-intl": "19.0.
|
63
|
+
"@progress/kendo-angular-common": "19.0.1-develop.1",
|
64
|
+
"@progress/kendo-angular-l10n": "19.0.1-develop.1",
|
65
|
+
"@progress/kendo-angular-progressbar": "19.0.1-develop.1",
|
66
|
+
"@progress/kendo-angular-icons": "19.0.1-develop.1",
|
67
|
+
"@progress/kendo-angular-buttons": "19.0.1-develop.1",
|
68
|
+
"@progress/kendo-angular-intl": "19.0.1-develop.1",
|
54
69
|
"rxjs": "^6.5.3 || ^7.0.0"
|
55
70
|
},
|
56
71
|
"dependencies": {
|
57
72
|
"tslib": "^2.3.1",
|
58
|
-
"@progress/kendo-angular-schematics": "19.0.
|
73
|
+
"@progress/kendo-angular-schematics": "19.0.1-develop.1",
|
59
74
|
"@progress/kendo-draggable": "^3.0.2"
|
60
75
|
},
|
61
76
|
"schematics": "./schematics/collection.json",
|
package/tabstrip/constants.d.ts
CHANGED
@@ -2,10 +2,6 @@
|
|
2
2
|
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
5
|
-
/**
|
6
|
-
* @hidden
|
7
|
-
*/
|
8
|
-
export declare const MOUSE_SCROLL_SPEED = 10;
|
9
5
|
/**
|
10
6
|
* @hidden
|
11
7
|
*/
|
@@ -30,11 +30,6 @@ export interface TabStripScrollableSettings {
|
|
30
30
|
* @default 100
|
31
31
|
*/
|
32
32
|
buttonScrollSpeed?: number;
|
33
|
-
/**
|
34
|
-
* Deprecated in v.18.0.0 and will be removed in v.19.0.0 of the `@progress/kendo-angular-layout` package.
|
35
|
-
* The scroll speed will naturally follow the user behavior and concrete device specifics.
|
36
|
-
*/
|
37
|
-
mouseScrollSpeed?: number;
|
38
33
|
/**
|
39
34
|
* Allows defining a custom CSS class, or multiple classes separated by spaces, which will be applied to the span element of the prev scroll button.
|
40
35
|
*
|
@@ -25,10 +25,10 @@ export declare class TabStripService {
|
|
25
25
|
private shouldHandleKey;
|
26
26
|
private computeNextIndex;
|
27
27
|
private invertKeys;
|
28
|
-
private
|
29
|
-
private
|
30
|
-
private
|
31
|
-
private
|
28
|
+
private firstNavigableIndex;
|
29
|
+
private lastNavigableIndex;
|
30
|
+
private prevNavigableIndex;
|
31
|
+
private nextNavigableIndex;
|
32
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<TabStripService, never>;
|
33
33
|
static ɵprov: i0.ɵɵInjectableDeclaration<TabStripService>;
|
34
34
|
}
|
@@ -71,10 +71,10 @@ export declare class TileLayoutComponent implements OnInit, AfterViewInit, After
|
|
71
71
|
*/
|
72
72
|
autoFlow: TileLayoutFlowMode;
|
73
73
|
/**
|
74
|
-
*
|
75
|
-
* By default, navigation is
|
74
|
+
* When the keyboard navigation is enabled, the user can use dedicated shortcuts to interact with the TileLayout.
|
75
|
+
* By default, navigation is enabled. To disable it and include focusable TileLayout content as a part of the natural tab sequence of the page, set the property to `false`.
|
76
76
|
*
|
77
|
-
* @default
|
77
|
+
* @default true
|
78
78
|
*/
|
79
79
|
navigable: boolean;
|
80
80
|
/**
|