@progress/kendo-angular-layout 21.2.0-develop.5 → 21.2.0-develop.7
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/utils.js +805 -394
- package/codemods/v19/tabstrip-mousescrollspeed.js +11 -15
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/timeline/models/events-order.mjs +5 -0
- package/esm2022/timeline/timeline-horizontal.component.mjs +1 -7
- package/esm2022/timeline/timeline.component.mjs +26 -2
- package/fesm2022/progress-kendo-angular-layout.mjs +29 -11
- package/index.d.ts +1 -0
- package/package.json +10 -11
- package/timeline/models/events-order.d.ts +10 -0
- package/timeline/timeline.component.d.ts +12 -1
- package/codemods/template-transformer/index.js +0 -93
|
@@ -28,27 +28,23 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
30
|
exports.default = default_1;
|
|
31
|
-
const index_1 = require("../template-transformer/index");
|
|
32
|
-
const utils_1 = require("../utils");
|
|
33
31
|
const fs = __importStar(require("fs"));
|
|
32
|
+
const utils_1 = require("../utils");
|
|
34
33
|
function default_1(fileInfo, api) {
|
|
35
34
|
const filePath = fileInfo.path;
|
|
35
|
+
// Handle HTML files and inline templates
|
|
36
|
+
const htmlResult = (0, utils_1.htmlTransformer)(fileInfo, api, (templateContent) => (0, utils_1.attributeRemoval)(templateContent, 'kendo-tabstrip', 'scrollable', 'mouseScrollSpeed'));
|
|
36
37
|
if (filePath.endsWith('.html')) {
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
updatedContent = (0, utils_1.htmlAttributeRemoval)({ ...fileInfo, source: updatedContent }, 'kendo-tabstrip', 'scrollable', 'mouseScrollSpeed');
|
|
41
|
-
// Only write to file once after all transformations
|
|
42
|
-
fs.writeFileSync(filePath, updatedContent, 'utf-8');
|
|
38
|
+
if (htmlResult && htmlResult !== fileInfo.source) {
|
|
39
|
+
fs.writeFileSync(filePath, htmlResult, 'utf-8');
|
|
40
|
+
return htmlResult;
|
|
43
41
|
}
|
|
44
|
-
return;
|
|
42
|
+
return fileInfo.source; // Return original source if no changes
|
|
45
43
|
}
|
|
44
|
+
// Handle TypeScript property transformations
|
|
46
45
|
const j = api.jscodeshift;
|
|
47
|
-
const rootSource = j(fileInfo.source);
|
|
48
|
-
(0,
|
|
49
|
-
|
|
50
|
-
});
|
|
51
|
-
(0, utils_1.tsPropertyRemoval)(fileInfo.source, rootSource, j, 'TabStripScrollableSettings', 'mouseScrollSpeed');
|
|
52
|
-
(0, utils_1.tsComponentPropertyRemoval)(fileInfo.source, rootSource, j, 'TabStripComponent', 'scrollable', 'mouseScrollSpeed');
|
|
46
|
+
const rootSource = j(htmlResult || fileInfo.source);
|
|
47
|
+
(0, utils_1.tsPropertyRemoval)(fileInfo.source, rootSource, j, '@progress/kendo-angular-layout', 'TabStripScrollableSettings', 'mouseScrollSpeed');
|
|
48
|
+
(0, utils_1.tsComponentPropertyRemoval)(fileInfo.source, rootSource, j, '@progress/kendo-angular-layout', 'TabStripComponent', 'scrollable', 'mouseScrollSpeed');
|
|
53
49
|
return rootSource.toSource();
|
|
54
50
|
}
|
|
@@ -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: '21.2.0-develop.
|
|
13
|
+
publishDate: 1764323027,
|
|
14
|
+
version: '21.2.0-develop.7',
|
|
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
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
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
|
+
export {};
|
|
@@ -140,13 +140,7 @@ export class TimelineHorizontalComponent {
|
|
|
140
140
|
}
|
|
141
141
|
this.trackItems.push(event);
|
|
142
142
|
});
|
|
143
|
-
this.
|
|
144
|
-
.slice(this.firstCircleInView, this.firstCircleInView + this.visibleTabsCount)
|
|
145
|
-
.filter(event => !event.isFlag);
|
|
146
|
-
this.selectedEvent = this.events[0];
|
|
147
|
-
this.cdr.detectChanges();
|
|
148
|
-
this.calloutStyle = this.calloutOffset;
|
|
149
|
-
this.focusTrackItem(0);
|
|
143
|
+
this.navigateToFirstInterval();
|
|
150
144
|
}
|
|
151
145
|
}
|
|
152
146
|
}
|
|
@@ -40,7 +40,8 @@ export class TimelineComponent {
|
|
|
40
40
|
this.originalData = events;
|
|
41
41
|
this._events = processItems(this.originalData, this.modelFields);
|
|
42
42
|
this._events.sort((a, b) => {
|
|
43
|
-
|
|
43
|
+
const order = this.eventsOrder === 'asc' ? 1 : -1;
|
|
44
|
+
return order * (a.date.getTime() - b.date.getTime());
|
|
44
45
|
});
|
|
45
46
|
if (this._events.length > 0) {
|
|
46
47
|
let flag = this._events[0].date.getFullYear() - 1;
|
|
@@ -105,6 +106,26 @@ export class TimelineComponent {
|
|
|
105
106
|
* @default true
|
|
106
107
|
*/
|
|
107
108
|
animation;
|
|
109
|
+
/**
|
|
110
|
+
* Specifies the order of the Timeline events.
|
|
111
|
+
* `asc` - chronological order
|
|
112
|
+
* `desc` - reverse-chronological order
|
|
113
|
+
*
|
|
114
|
+
* @default 'asc'
|
|
115
|
+
*/
|
|
116
|
+
set eventsOrder(order) {
|
|
117
|
+
if (order === this._eventsOrder) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
this._eventsOrder = order;
|
|
121
|
+
this._events = [...this._events].sort((a, b) => {
|
|
122
|
+
const sortOrder = order === 'asc' ? 1 : -1;
|
|
123
|
+
return sortOrder * (a.date.getTime() - b.date.getTime());
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
get eventsOrder() {
|
|
127
|
+
return this._eventsOrder;
|
|
128
|
+
}
|
|
108
129
|
/**
|
|
109
130
|
* Sets a specific width for the event.
|
|
110
131
|
* This setting is supported only in `vertical` mode.
|
|
@@ -232,6 +253,7 @@ export class TimelineComponent {
|
|
|
232
253
|
_eventHeight = DEFAULT_EVENT_HEIGHT;
|
|
233
254
|
_dateFormat = DEFAULT_DATE_FORMAT;
|
|
234
255
|
originalData = [];
|
|
256
|
+
_eventsOrder = 'asc';
|
|
235
257
|
subscriptions = new Subscription();
|
|
236
258
|
constructor(timelineService) {
|
|
237
259
|
this.timelineService = timelineService;
|
|
@@ -293,7 +315,7 @@ export class TimelineComponent {
|
|
|
293
315
|
}));
|
|
294
316
|
}
|
|
295
317
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TimelineComponent, deps: [{ token: i1.TimelineService }], target: i0.ɵɵFactoryTarget.Component });
|
|
296
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TimelineComponent, isStandalone: true, selector: "kendo-timeline", inputs: { events: "events", modelFields: "modelFields", orientation: "orientation", alterMode: "alterMode", collapsibleEvents: "collapsibleEvents", navigable: "navigable", showDateLabels: "showDateLabels", animation: "animation", eventWidth: "eventWidth", eventHeight: "eventHeight", dateFormat: "dateFormat" }, outputs: { onToggle: "onToggle", onActionClick: "onActionClick", onNavigate: "onNavigate" }, host: { properties: { "class.k-timeline": "this.hostClass", "class.k-timeline-vertical": "this.verticalClass", "class.k-timeline-horizontal": "this.horizontalClass", "class.k-timeline-alternating": "this.alternatingClass", "class.k-timeline-collapsible": "this.collapsibleClass" } }, providers: [
|
|
318
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TimelineComponent, isStandalone: true, selector: "kendo-timeline", inputs: { events: "events", modelFields: "modelFields", orientation: "orientation", alterMode: "alterMode", collapsibleEvents: "collapsibleEvents", navigable: "navigable", showDateLabels: "showDateLabels", animation: "animation", eventsOrder: "eventsOrder", eventWidth: "eventWidth", eventHeight: "eventHeight", dateFormat: "dateFormat" }, outputs: { onToggle: "onToggle", onActionClick: "onActionClick", onNavigate: "onNavigate" }, host: { properties: { "class.k-timeline": "this.hostClass", "class.k-timeline-vertical": "this.verticalClass", "class.k-timeline-horizontal": "this.horizontalClass", "class.k-timeline-alternating": "this.alternatingClass", "class.k-timeline-collapsible": "this.collapsibleClass" } }, providers: [
|
|
297
319
|
TimelineService,
|
|
298
320
|
LocalizationService,
|
|
299
321
|
{
|
|
@@ -419,6 +441,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
419
441
|
type: Input
|
|
420
442
|
}], animation: [{
|
|
421
443
|
type: Input
|
|
444
|
+
}], eventsOrder: [{
|
|
445
|
+
type: Input
|
|
422
446
|
}], eventWidth: [{
|
|
423
447
|
type: Input
|
|
424
448
|
}], eventHeight: [{
|
|
@@ -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: '21.2.0-develop.
|
|
32
|
+
publishDate: 1764323027,
|
|
33
|
+
version: '21.2.0-develop.7',
|
|
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
|
|
|
@@ -12342,13 +12342,7 @@ class TimelineHorizontalComponent {
|
|
|
12342
12342
|
}
|
|
12343
12343
|
this.trackItems.push(event);
|
|
12344
12344
|
});
|
|
12345
|
-
this.
|
|
12346
|
-
.slice(this.firstCircleInView, this.firstCircleInView + this.visibleTabsCount)
|
|
12347
|
-
.filter(event => !event.isFlag);
|
|
12348
|
-
this.selectedEvent = this.events[0];
|
|
12349
|
-
this.cdr.detectChanges();
|
|
12350
|
-
this.calloutStyle = this.calloutOffset;
|
|
12351
|
-
this.focusTrackItem(0);
|
|
12345
|
+
this.navigateToFirstInterval();
|
|
12352
12346
|
}
|
|
12353
12347
|
}
|
|
12354
12348
|
}
|
|
@@ -13232,7 +13226,8 @@ class TimelineComponent {
|
|
|
13232
13226
|
this.originalData = events;
|
|
13233
13227
|
this._events = processItems(this.originalData, this.modelFields);
|
|
13234
13228
|
this._events.sort((a, b) => {
|
|
13235
|
-
|
|
13229
|
+
const order = this.eventsOrder === 'asc' ? 1 : -1;
|
|
13230
|
+
return order * (a.date.getTime() - b.date.getTime());
|
|
13236
13231
|
});
|
|
13237
13232
|
if (this._events.length > 0) {
|
|
13238
13233
|
let flag = this._events[0].date.getFullYear() - 1;
|
|
@@ -13297,6 +13292,26 @@ class TimelineComponent {
|
|
|
13297
13292
|
* @default true
|
|
13298
13293
|
*/
|
|
13299
13294
|
animation;
|
|
13295
|
+
/**
|
|
13296
|
+
* Specifies the order of the Timeline events.
|
|
13297
|
+
* `asc` - chronological order
|
|
13298
|
+
* `desc` - reverse-chronological order
|
|
13299
|
+
*
|
|
13300
|
+
* @default 'asc'
|
|
13301
|
+
*/
|
|
13302
|
+
set eventsOrder(order) {
|
|
13303
|
+
if (order === this._eventsOrder) {
|
|
13304
|
+
return;
|
|
13305
|
+
}
|
|
13306
|
+
this._eventsOrder = order;
|
|
13307
|
+
this._events = [...this._events].sort((a, b) => {
|
|
13308
|
+
const sortOrder = order === 'asc' ? 1 : -1;
|
|
13309
|
+
return sortOrder * (a.date.getTime() - b.date.getTime());
|
|
13310
|
+
});
|
|
13311
|
+
}
|
|
13312
|
+
get eventsOrder() {
|
|
13313
|
+
return this._eventsOrder;
|
|
13314
|
+
}
|
|
13300
13315
|
/**
|
|
13301
13316
|
* Sets a specific width for the event.
|
|
13302
13317
|
* This setting is supported only in `vertical` mode.
|
|
@@ -13424,6 +13439,7 @@ class TimelineComponent {
|
|
|
13424
13439
|
_eventHeight = DEFAULT_EVENT_HEIGHT;
|
|
13425
13440
|
_dateFormat = DEFAULT_DATE_FORMAT;
|
|
13426
13441
|
originalData = [];
|
|
13442
|
+
_eventsOrder = 'asc';
|
|
13427
13443
|
subscriptions = new Subscription();
|
|
13428
13444
|
constructor(timelineService) {
|
|
13429
13445
|
this.timelineService = timelineService;
|
|
@@ -13485,7 +13501,7 @@ class TimelineComponent {
|
|
|
13485
13501
|
}));
|
|
13486
13502
|
}
|
|
13487
13503
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TimelineComponent, deps: [{ token: TimelineService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13488
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TimelineComponent, isStandalone: true, selector: "kendo-timeline", inputs: { events: "events", modelFields: "modelFields", orientation: "orientation", alterMode: "alterMode", collapsibleEvents: "collapsibleEvents", navigable: "navigable", showDateLabels: "showDateLabels", animation: "animation", eventWidth: "eventWidth", eventHeight: "eventHeight", dateFormat: "dateFormat" }, outputs: { onToggle: "onToggle", onActionClick: "onActionClick", onNavigate: "onNavigate" }, host: { properties: { "class.k-timeline": "this.hostClass", "class.k-timeline-vertical": "this.verticalClass", "class.k-timeline-horizontal": "this.horizontalClass", "class.k-timeline-alternating": "this.alternatingClass", "class.k-timeline-collapsible": "this.collapsibleClass" } }, providers: [
|
|
13504
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TimelineComponent, isStandalone: true, selector: "kendo-timeline", inputs: { events: "events", modelFields: "modelFields", orientation: "orientation", alterMode: "alterMode", collapsibleEvents: "collapsibleEvents", navigable: "navigable", showDateLabels: "showDateLabels", animation: "animation", eventsOrder: "eventsOrder", eventWidth: "eventWidth", eventHeight: "eventHeight", dateFormat: "dateFormat" }, outputs: { onToggle: "onToggle", onActionClick: "onActionClick", onNavigate: "onNavigate" }, host: { properties: { "class.k-timeline": "this.hostClass", "class.k-timeline-vertical": "this.verticalClass", "class.k-timeline-horizontal": "this.horizontalClass", "class.k-timeline-alternating": "this.alternatingClass", "class.k-timeline-collapsible": "this.collapsibleClass" } }, providers: [
|
|
13489
13505
|
TimelineService,
|
|
13490
13506
|
LocalizationService,
|
|
13491
13507
|
{
|
|
@@ -13611,6 +13627,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
13611
13627
|
type: Input
|
|
13612
13628
|
}], animation: [{
|
|
13613
13629
|
type: Input
|
|
13630
|
+
}], eventsOrder: [{
|
|
13631
|
+
type: Input
|
|
13614
13632
|
}], eventWidth: [{
|
|
13615
13633
|
type: Input
|
|
13616
13634
|
}], eventHeight: [{
|
package/index.d.ts
CHANGED
|
@@ -92,6 +92,7 @@ export { TimelineModelFields } from './timeline/models/model-fields';
|
|
|
92
92
|
export { TimelineEvent } from './timeline/models/timeline-event';
|
|
93
93
|
export { AnchorTarget } from './timeline/models/anchor-target';
|
|
94
94
|
export { NavigationDirection } from './timeline/events/navigation-direction';
|
|
95
|
+
export { TimelineEventsOrder } from './timeline/models/events-order';
|
|
95
96
|
export { TimelineCardHeaderTemplateDirective } from "./timeline/templates/timeline-card-header.directive";
|
|
96
97
|
export { TimelineCardBodyTemplateDirective } from "./timeline/templates/timeline-card-body.directive";
|
|
97
98
|
export { TimelineCardActionsTemplateDirective } from "./timeline/templates/timeline-card-actions.directive";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-layout",
|
|
3
|
-
"version": "21.2.0-develop.
|
|
3
|
+
"version": "21.2.0-develop.7",
|
|
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",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"package": {
|
|
51
51
|
"productName": "Kendo UI for Angular",
|
|
52
52
|
"productCode": "KENDOUIANGULAR",
|
|
53
|
-
"publishDate":
|
|
53
|
+
"publishDate": 1764323027,
|
|
54
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"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
@@ -60,19 +60,18 @@
|
|
|
60
60
|
"@angular/core": "18 - 21",
|
|
61
61
|
"@angular/platform-browser": "18 - 21",
|
|
62
62
|
"@progress/kendo-licensing": "^1.7.0",
|
|
63
|
-
"@progress/kendo-angular-common": "21.2.0-develop.
|
|
64
|
-
"@progress/kendo-angular-l10n": "21.2.0-develop.
|
|
65
|
-
"@progress/kendo-angular-progressbar": "21.2.0-develop.
|
|
66
|
-
"@progress/kendo-angular-icons": "21.2.0-develop.
|
|
67
|
-
"@progress/kendo-angular-buttons": "21.2.0-develop.
|
|
68
|
-
"@progress/kendo-angular-intl": "21.2.0-develop.
|
|
63
|
+
"@progress/kendo-angular-common": "21.2.0-develop.7",
|
|
64
|
+
"@progress/kendo-angular-l10n": "21.2.0-develop.7",
|
|
65
|
+
"@progress/kendo-angular-progressbar": "21.2.0-develop.7",
|
|
66
|
+
"@progress/kendo-angular-icons": "21.2.0-develop.7",
|
|
67
|
+
"@progress/kendo-angular-buttons": "21.2.0-develop.7",
|
|
68
|
+
"@progress/kendo-angular-intl": "21.2.0-develop.7",
|
|
69
69
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"tslib": "^2.3.1",
|
|
73
|
-
"@progress/kendo-angular-schematics": "21.2.0-develop.
|
|
74
|
-
"@progress/kendo-draggable": "^3.0.2"
|
|
75
|
-
"node-html-parser": "^7.0.1"
|
|
73
|
+
"@progress/kendo-angular-schematics": "21.2.0-develop.7",
|
|
74
|
+
"@progress/kendo-draggable": "^3.0.2"
|
|
76
75
|
},
|
|
77
76
|
"schematics": "./schematics/collection.json",
|
|
78
77
|
"module": "fesm2022/progress-kendo-angular-layout.mjs",
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* Specifies the order of the Timeline events.
|
|
7
|
+
* `asc` - chronological order
|
|
8
|
+
* `desc` - reverse-chronological order
|
|
9
|
+
*/
|
|
10
|
+
export type TimelineEventsOrder = 'asc' | 'desc';
|
|
@@ -12,6 +12,7 @@ import { NavigationDirection } from './events/navigation-direction';
|
|
|
12
12
|
import { TimelineCardBodyTemplateDirective } from './templates/timeline-card-body.directive';
|
|
13
13
|
import { TimelineCardHeaderTemplateDirective } from './templates/timeline-card-header.directive';
|
|
14
14
|
import { TimelineCardActionsTemplateDirective } from './templates/timeline-card-actions.directive';
|
|
15
|
+
import { TimelineEventsOrder } from './models/events-order';
|
|
15
16
|
import * as i0 from "@angular/core";
|
|
16
17
|
/**
|
|
17
18
|
* Represents the [Kendo UI Timeline component for Angular]({% slug overview_timeline %}).
|
|
@@ -69,6 +70,15 @@ export declare class TimelineComponent implements AfterContentInit, OnDestroy {
|
|
|
69
70
|
* @default true
|
|
70
71
|
*/
|
|
71
72
|
animation: boolean | number;
|
|
73
|
+
/**
|
|
74
|
+
* Specifies the order of the Timeline events.
|
|
75
|
+
* `asc` - chronological order
|
|
76
|
+
* `desc` - reverse-chronological order
|
|
77
|
+
*
|
|
78
|
+
* @default 'asc'
|
|
79
|
+
*/
|
|
80
|
+
set eventsOrder(order: TimelineEventsOrder);
|
|
81
|
+
get eventsOrder(): TimelineEventsOrder;
|
|
72
82
|
/**
|
|
73
83
|
* Sets a specific width for the event.
|
|
74
84
|
* This setting is supported only in `vertical` mode.
|
|
@@ -153,6 +163,7 @@ export declare class TimelineComponent implements AfterContentInit, OnDestroy {
|
|
|
153
163
|
private _eventHeight;
|
|
154
164
|
private _dateFormat;
|
|
155
165
|
private originalData;
|
|
166
|
+
private _eventsOrder;
|
|
156
167
|
private subscriptions;
|
|
157
168
|
constructor(timelineService: TimelineService);
|
|
158
169
|
ngAfterContentInit(): void;
|
|
@@ -184,5 +195,5 @@ export declare class TimelineComponent implements AfterContentInit, OnDestroy {
|
|
|
184
195
|
collapse(index: number): void;
|
|
185
196
|
private initTemplates;
|
|
186
197
|
static ɵfac: i0.ɵɵFactoryDeclaration<TimelineComponent, never>;
|
|
187
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TimelineComponent, "kendo-timeline", ["kendoTimeline"], { "events": { "alias": "events"; "required": false; }; "modelFields": { "alias": "modelFields"; "required": false; }; "orientation": { "alias": "orientation"; "required": false; }; "alterMode": { "alias": "alterMode"; "required": false; }; "collapsibleEvents": { "alias": "collapsibleEvents"; "required": false; }; "navigable": { "alias": "navigable"; "required": false; }; "showDateLabels": { "alias": "showDateLabels"; "required": false; }; "animation": { "alias": "animation"; "required": false; }; "eventWidth": { "alias": "eventWidth"; "required": false; }; "eventHeight": { "alias": "eventHeight"; "required": false; }; "dateFormat": { "alias": "dateFormat"; "required": false; }; }, { "onToggle": "onToggle"; "onActionClick": "onActionClick"; "onNavigate": "onNavigate"; }, ["cardHeaderTemplate", "cardBodyTemplate", "cardActionsTemplate"], never, true, never>;
|
|
198
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TimelineComponent, "kendo-timeline", ["kendoTimeline"], { "events": { "alias": "events"; "required": false; }; "modelFields": { "alias": "modelFields"; "required": false; }; "orientation": { "alias": "orientation"; "required": false; }; "alterMode": { "alias": "alterMode"; "required": false; }; "collapsibleEvents": { "alias": "collapsibleEvents"; "required": false; }; "navigable": { "alias": "navigable"; "required": false; }; "showDateLabels": { "alias": "showDateLabels"; "required": false; }; "animation": { "alias": "animation"; "required": false; }; "eventsOrder": { "alias": "eventsOrder"; "required": false; }; "eventWidth": { "alias": "eventWidth"; "required": false; }; "eventHeight": { "alias": "eventHeight"; "required": false; }; "dateFormat": { "alias": "dateFormat"; "required": false; }; }, { "onToggle": "onToggle"; "onActionClick": "onActionClick"; "onNavigate": "onNavigate"; }, ["cardHeaderTemplate", "cardBodyTemplate", "cardActionsTemplate"], never, true, never>;
|
|
188
199
|
}
|
|
@@ -1,93 +0,0 @@
|
|
|
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 = templateTransformer;
|
|
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
|
-
}
|