@progress/kendo-angular-dateinputs 24.0.0-develop.4 → 24.0.0-develop.40

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.
@@ -4,7 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  "use strict";
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.tsInterfaceTransformer = exports.tsPropertyValueTransformer = exports.tsPropertyTransformer = exports.tsComponentPropertyRemoval = exports.attributeRemoval = exports.attributeValueUpdate = exports.attributeNameValueUpdate = exports.attributeNameUpdate = exports.eventUpdate = exports.htmlTransformer = exports.blockTextElements = void 0;
7
+ exports.tsInterfaceTransformer = exports.tsPropertyValueTransformer = exports.tsPropertyTransformer = exports.tsComponentPropertyRemoval = exports.attributeConditionalRemoval = exports.attributeRemoval = exports.attributeValueUpdate = exports.attributeNameValueUpdate = exports.attributeNameUpdate = exports.eventUpdate = exports.htmlTransformer = exports.blockTextElements = void 0;
8
8
  exports.hasKendoInTemplate = hasKendoInTemplate;
9
9
  exports.isImportedFromPackage = isImportedFromPackage;
10
10
  exports.tsPropertyRemoval = tsPropertyRemoval;
@@ -345,6 +345,34 @@ const attributeRemoval = (templateContent, tagName, attributeName, propertyToRem
345
345
  });
346
346
  };
347
347
  exports.attributeRemoval = attributeRemoval;
348
+ /**
349
+ * Removes an attribute from a tag only when its value matches one of the specified values.
350
+ * Handles both static (`attr="value"`) and bound (`[attr]="'value'"`) forms.
351
+ *
352
+ * @param templateContent - The template string content to transform
353
+ * @param tagName - The HTML tag name to target (e.g., 'kendo-button')
354
+ * @param attributeName - The attribute name to conditionally remove
355
+ * @param values - The attribute values that trigger removal
356
+ * @returns The transformed template content
357
+ */
358
+ const attributeConditionalRemoval = (templateContent, tagName, attributeName, values) => {
359
+ const escapeRegex = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
360
+ const escapedTag = escapeRegex(tagName);
361
+ const escapedAttr = escapeRegex(attributeName);
362
+ // Remove bound attributes [attribute]="value"
363
+ const boundAttributePattern = new RegExp(`(<${escapedTag}[^>]*?)\\s+\\[${escapedAttr}\\]\\s*=\\s*("(?:[^"\\\\]|\\\\.)*?"|'(?:[^'\\\\]|\\\\.)*?'|[^\\s>]+)([^>]*?>)`, 'gi');
364
+ // Remove static attributes attribute="value"
365
+ const staticAttributePattern = new RegExp(`(<${escapedTag}[^>]*?)\\s+${escapedAttr}\\s*=\\s*("(?:[^"\\\\]|\\\\.)*?"|'(?:[^'\\\\]|\\\\.)*?'|[^\\s>]+)([^>]*?>)`, 'gi');
366
+ // Strip outer and inner quotes to extract the raw value for comparison
367
+ const matchesValue = (raw) => {
368
+ const inner = raw.replace(/^["']|["']$/g, '').replace(/^['"]|['"]$/g, '');
369
+ return values.includes(inner);
370
+ };
371
+ let result = templateContent.replace(boundAttributePattern, (match, prefix, value, suffix) => matchesValue(value) ? prefix + suffix : match);
372
+ result = result.replace(staticAttributePattern, (match, prefix, value, suffix) => matchesValue(value) ? prefix + suffix : match);
373
+ return result;
374
+ };
375
+ exports.attributeConditionalRemoval = attributeConditionalRemoval;
348
376
  function tsPropertyRemoval(source, rootSource, j, packageName, typeName, propertyName) {
349
377
  if (source.includes(typeName)) {
350
378
  if (!isImportedFromPackage(rootSource, j, packageName, typeName)) {
@@ -441,8 +469,31 @@ function tsPropertyRemoval(source, rootSource, j, packageName, typeName, propert
441
469
  }
442
470
  }
443
471
  });
444
- // Handle return statements with object literals
472
+ // Handle return statements with object literals, but only when the enclosing
473
+ // function's declared return type matches typeName. This prevents removing
474
+ // unrelated propertyName keys from object literals returned in other functions.
475
+ const enclosingFunctionReturnsType = (nodePath) => {
476
+ let current = nodePath.parent;
477
+ while (current) {
478
+ const node = current.node;
479
+ if (node.type === 'FunctionDeclaration' ||
480
+ node.type === 'FunctionExpression' ||
481
+ node.type === 'ArrowFunctionExpression' ||
482
+ node.type === 'ClassMethod' ||
483
+ node.type === 'ObjectMethod') {
484
+ return !!(node.returnType &&
485
+ node.returnType.typeAnnotation?.type === 'TSTypeReference' &&
486
+ node.returnType.typeAnnotation.typeName?.type === 'Identifier' &&
487
+ node.returnType.typeAnnotation.typeName.name === typeName);
488
+ }
489
+ current = current.parent;
490
+ }
491
+ return false;
492
+ };
445
493
  rootSource.find(j.ReturnStatement).forEach((path) => {
494
+ if (!enclosingFunctionReturnsType(path)) {
495
+ return;
496
+ }
446
497
  if (path.node.argument && path.node.argument.type === 'ObjectExpression') {
447
498
  const properties = path.node.argument.properties;
448
499
  const propIndex = properties.findIndex((p) => p.type === 'ObjectProperty' &&
@@ -491,22 +542,6 @@ function tsPropertyRemoval(source, rootSource, j, packageName, typeName, propert
491
542
  statement.remove();
492
543
  }
493
544
  });
494
- // Handle nested member expressions like chatConfig.chat.modelFields.pinnedByField
495
- rootSource
496
- .find(j.AssignmentExpression, {
497
- left: {
498
- type: 'MemberExpression',
499
- object: {
500
- type: 'MemberExpression',
501
- },
502
- property: {
503
- name: propertyName,
504
- },
505
- },
506
- })
507
- .forEach((path) => {
508
- j(path).closest(j.ExpressionStatement).remove();
509
- });
510
545
  return rootSource;
511
546
  }
512
547
  }
@@ -0,0 +1,25 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2026 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.aiInstructions = exports.aiInstructionsGroupStartEnd = void 0;
8
+ exports.default = default_1;
9
+ const codemods_1 = require("@progress/kendo-angular-common/codemods");
10
+ exports.aiInstructionsGroupStartEnd = `k-group-start and k-group-end — removed from DateTimePicker.
11
+ The DateTimePicker now uses SegmentedControl instead of buttons for switching between date and time pickers in the popup.
12
+ Remove any CSS rules or test assertions targeting .k-group-start or .k-group-end within the DateTimePicker context.`;
13
+ exports.aiInstructions = `Review your stylesheets, test files, and any code that references these DateTimePicker classes:
14
+
15
+ ${exports.aiInstructionsGroupStartEnd}`;
16
+ const patternGroupStart = (0, codemods_1.makePattern)(['k-group-start']);
17
+ const patternGroupEnd = (0, codemods_1.makePattern)(['k-group-end']);
18
+ function default_1(fileInfo) {
19
+ if ((0, codemods_1.isRenderingChangeTarget)(fileInfo.path)) {
20
+ if (patternGroupStart.test(fileInfo.source) || patternGroupEnd.test(fileInfo.source)) {
21
+ (0, codemods_1.writeInstructionMarker)(exports.aiInstructionsGroupStartEnd, __filename, fileInfo.path);
22
+ }
23
+ }
24
+ return fileInfo.source;
25
+ }
@@ -45,10 +45,10 @@ export declare class DateInputIntl {
45
45
  * Represents the [Kendo UI DateInput component for Angular](https://www.telerik.com/kendo-angular-ui/components/dateinputs/dateinput).
46
46
  *
47
47
  * ```html
48
- * <kendo-dateinput/>
48
+ * <kendo-dateinput></kendo-dateinput>
49
49
  * ```
50
50
  *
51
- * @remarks
51
+ * @remarks
52
52
  * Supported children components are: {@link DateInputCustomMessagesComponent}.
53
53
  */
54
54
  export declare class DateInputComponent implements OnInit, AfterViewInit, ControlValueAccessor, OnChanges, OnDestroy, Validator {
@@ -63,7 +63,7 @@ export declare class DateInputComponent implements OnInit, AfterViewInit, Contro
63
63
  /**
64
64
  * @hidden
65
65
  */
66
- caretAltUpIcon: SVGIcon;
66
+ chevronUpIcon: SVGIcon;
67
67
  /**
68
68
  * @hidden
69
69
  */
@@ -71,7 +71,7 @@ export declare class DateInputComponent implements OnInit, AfterViewInit, Contro
71
71
  /**
72
72
  * @hidden
73
73
  */
74
- caretAltDownIcon: SVGIcon;
74
+ chevronDownIcon: SVGIcon;
75
75
  /**
76
76
  * @hidden
77
77
  */
@@ -308,7 +308,6 @@ export declare class DateInputComponent implements OnInit, AfterViewInit, Contro
308
308
  * @hidden
309
309
  */
310
310
  dateInput: ElementRef;
311
- get wrapperClass(): boolean;
312
311
  get disabledClass(): boolean;
313
312
  get inputElement(): any;
314
313
  get inputValue(): string;
@@ -426,6 +425,9 @@ export declare class DateInputComponent implements OnInit, AfterViewInit, Contro
426
425
  * @hidden
427
426
  */
428
427
  writeValue(value: Date): void;
428
+ /**
429
+ * Resets the value of the DateInput component to `null` and triggers the `valueChange` event.
430
+ */
429
431
  resetInput(): void;
430
432
  /**
431
433
  * @hidden
@@ -38,6 +38,7 @@ import { ActionSheetComponent } from '@progress/kendo-angular-navigation';
38
38
  import { HeaderTemplateDirective } from '../calendar/templates/header-template.directive';
39
39
  import { FooterTemplateDirective } from '../calendar/templates/footer-template.directive';
40
40
  import { WeekDaysFormat } from '../common/models/week-days-format';
41
+ import { SegmentedItemSettings } from '@progress/kendo-angular-buttons';
41
42
  import * as i0 from "@angular/core";
42
43
  /**
43
44
  * Represents the Kendo UI DateTimePicker component for Angular.
@@ -640,6 +641,22 @@ export declare class DateTimePickerComponent extends MultiTabStop implements OnI
640
641
  * @hidden
641
642
  */
642
643
  handleBlur(event?: FocusEvent): void;
644
+ /**
645
+ * @hidden
646
+ */
647
+ get tabItems(): SegmentedItemSettings[];
648
+ /**
649
+ * @hidden
650
+ */
651
+ get activeTabIndex(): number;
652
+ /**
653
+ * @hidden
654
+ */
655
+ onTabChange(index: number): void;
656
+ /**
657
+ * @hidden
658
+ */
659
+ handleButtonGroupKeydown(event: KeyboardEvent): void;
643
660
  /**
644
661
  * @hidden
645
662
  */