@progress/kendo-angular-grid 24.0.0-develop.37 → 24.0.0-develop.39

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
  }
@@ -6,7 +6,7 @@ import * as i0 from '@angular/core';
6
6
  import { EventEmitter, Injectable, SecurityContext, InjectionToken, Optional, Inject, Input, SkipSelf, Directive, isDevMode, QueryList, ContentChildren, ContentChild, Component, forwardRef, Host, Output, HostBinding, HostListener, Pipe, TemplateRef, ViewChild, ViewChildren, ChangeDetectionStrategy, Self, NgZone, ElementRef, ViewContainerRef, ViewEncapsulation, inject, Injector, NgModule } from '@angular/core';
7
7
  import { merge, of, Subject, zip as zip$1, from, Subscription, interval, fromEvent, Observable, BehaviorSubject } from 'rxjs';
8
8
  import * as i1$3 from '@progress/kendo-angular-common';
9
- import { isDocumentAvailable, Keys, hasClasses as hasClasses$1, isPresent as isPresent$1, normalizeKeys, anyChanged, TemplateContextDirective, DraggableDirective, EventsOutsideAngularDirective, replaceMessagePlaceholder, isChanged as isChanged$1, KendoInput, guid, areObjectsEqual, PrefixTemplateDirective, closest as closest$1, hasObservers, ResizeSensorComponent, isFirefox, firefoxMaxHeight, closestInScope as closestInScope$1, isFocusable as isFocusable$1, getLicenseMessage, shouldShowValidationUI, WatermarkOverlayComponent, PreventableEvent as PreventableEvent$1, ResizeBatchService } from '@progress/kendo-angular-common';
9
+ import { isDocumentAvailable, Keys, hasClasses as hasClasses$1, isPresent as isPresent$1, normalizeKeys, anyChanged, TemplateContextDirective, DraggableDirective, EventsOutsideAngularDirective, replaceMessagePlaceholder, isChanged as isChanged$1, KendoInput, guid, areObjectsEqual, PrefixTemplateDirective, closest as closest$1, hasObservers, ResizeSensorComponent, isFirefox, firefoxMaxHeight, closestInScope as closestInScope$1, isFocusable as isFocusable$1, getLicenseMessage, shouldShowValidationUI, WatermarkOverlayComponent, KENDO_WEBMCP_HOST, PreventableEvent as PreventableEvent$1, ResizeBatchService } from '@progress/kendo-angular-common';
10
10
  export { BrowserSupportService, ScrollbarService } from '@progress/kendo-angular-common';
11
11
  import * as i1 from '@angular/platform-browser';
12
12
  import * as i1$1 from '@progress/kendo-angular-icons';
@@ -24797,8 +24797,8 @@ const packageMetadata = {
24797
24797
  productName: 'Kendo UI for Angular',
24798
24798
  productCode: 'KENDOUIANGULAR',
24799
24799
  productCodes: ['KENDOUIANGULAR'],
24800
- publishDate: 1779188673,
24801
- version: '24.0.0-develop.37',
24800
+ publishDate: 1779209858,
24801
+ version: '24.0.0-develop.39',
24802
24802
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
24803
24803
  };
24804
24804
 
@@ -38141,6 +38141,10 @@ class GridComponent {
38141
38141
  provide: L10N_PREFIX,
38142
38142
  useValue: 'kendo.grid'
38143
38143
  },
38144
+ {
38145
+ provide: KENDO_WEBMCP_HOST,
38146
+ useExisting: forwardRef(() => GridComponent)
38147
+ },
38144
38148
  FilterService,
38145
38149
  ResponsiveService,
38146
38150
  PagerContextService,
@@ -39245,6 +39249,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
39245
39249
  provide: L10N_PREFIX,
39246
39250
  useValue: 'kendo.grid'
39247
39251
  },
39252
+ {
39253
+ provide: KENDO_WEBMCP_HOST,
39254
+ useExisting: forwardRef(() => GridComponent)
39255
+ },
39248
39256
  FilterService,
39249
39257
  ResponsiveService,
39250
39258
  PagerContextService,
@@ -7,7 +7,7 @@ export const packageMetadata = {
7
7
  "productCodes": [
8
8
  "KENDOUIANGULAR"
9
9
  ],
10
- "publishDate": 1779188673,
11
- "version": "24.0.0-develop.37",
10
+ "publishDate": 1779209858,
11
+ "version": "24.0.0-develop.39",
12
12
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
13
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-grid",
3
- "version": "24.0.0-develop.37",
3
+ "version": "24.0.0-develop.39",
4
4
  "description": "Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -94,7 +94,7 @@
94
94
  "package": {
95
95
  "productName": "Kendo UI for Angular",
96
96
  "productCode": "KENDOUIANGULAR",
97
- "publishDate": 1779188673,
97
+ "publishDate": 1779209858,
98
98
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
99
99
  }
100
100
  },
@@ -107,32 +107,32 @@
107
107
  "@progress/kendo-data-query": "^1.7.3",
108
108
  "@progress/kendo-drawing": "^1.25.0",
109
109
  "@progress/kendo-licensing": "^1.11.0",
110
- "@progress/kendo-angular-buttons": "24.0.0-develop.37",
111
- "@progress/kendo-angular-common": "24.0.0-develop.37",
112
- "@progress/kendo-angular-dateinputs": "24.0.0-develop.37",
113
- "@progress/kendo-angular-layout": "24.0.0-develop.37",
114
- "@progress/kendo-angular-navigation": "24.0.0-develop.37",
115
- "@progress/kendo-angular-dropdowns": "24.0.0-develop.37",
116
- "@progress/kendo-angular-excel-export": "24.0.0-develop.37",
117
- "@progress/kendo-angular-icons": "24.0.0-develop.37",
118
- "@progress/kendo-angular-indicators": "24.0.0-develop.37",
119
- "@progress/kendo-angular-inputs": "24.0.0-develop.37",
120
- "@progress/kendo-angular-conversational-ui": "24.0.0-develop.37",
121
- "@progress/kendo-angular-intl": "24.0.0-develop.37",
122
- "@progress/kendo-angular-l10n": "24.0.0-develop.37",
123
- "@progress/kendo-angular-label": "24.0.0-develop.37",
124
- "@progress/kendo-angular-menu": "24.0.0-develop.37",
125
- "@progress/kendo-angular-pager": "24.0.0-develop.37",
126
- "@progress/kendo-angular-pdf-export": "24.0.0-develop.37",
127
- "@progress/kendo-angular-popup": "24.0.0-develop.37",
128
- "@progress/kendo-angular-toolbar": "24.0.0-develop.37",
129
- "@progress/kendo-angular-upload": "24.0.0-develop.37",
130
- "@progress/kendo-angular-utils": "24.0.0-develop.37",
110
+ "@progress/kendo-angular-buttons": "24.0.0-develop.39",
111
+ "@progress/kendo-angular-common": "24.0.0-develop.39",
112
+ "@progress/kendo-angular-dateinputs": "24.0.0-develop.39",
113
+ "@progress/kendo-angular-layout": "24.0.0-develop.39",
114
+ "@progress/kendo-angular-navigation": "24.0.0-develop.39",
115
+ "@progress/kendo-angular-dropdowns": "24.0.0-develop.39",
116
+ "@progress/kendo-angular-excel-export": "24.0.0-develop.39",
117
+ "@progress/kendo-angular-icons": "24.0.0-develop.39",
118
+ "@progress/kendo-angular-indicators": "24.0.0-develop.39",
119
+ "@progress/kendo-angular-inputs": "24.0.0-develop.39",
120
+ "@progress/kendo-angular-conversational-ui": "24.0.0-develop.39",
121
+ "@progress/kendo-angular-intl": "24.0.0-develop.39",
122
+ "@progress/kendo-angular-l10n": "24.0.0-develop.39",
123
+ "@progress/kendo-angular-label": "24.0.0-develop.39",
124
+ "@progress/kendo-angular-menu": "24.0.0-develop.39",
125
+ "@progress/kendo-angular-pager": "24.0.0-develop.39",
126
+ "@progress/kendo-angular-pdf-export": "24.0.0-develop.39",
127
+ "@progress/kendo-angular-popup": "24.0.0-develop.39",
128
+ "@progress/kendo-angular-toolbar": "24.0.0-develop.39",
129
+ "@progress/kendo-angular-upload": "24.0.0-develop.39",
130
+ "@progress/kendo-angular-utils": "24.0.0-develop.39",
131
131
  "rxjs": "^6.5.3 || ^7.0.0"
132
132
  },
133
133
  "dependencies": {
134
134
  "tslib": "^2.3.1",
135
- "@progress/kendo-angular-schematics": "24.0.0-develop.37",
135
+ "@progress/kendo-angular-schematics": "24.0.0-develop.39",
136
136
  "@progress/kendo-common": "^1.0.1",
137
137
  "@progress/kendo-file-saver": "^1.0.0",
138
138
  "@progress/kendo-csv": "^1.0.0"
@@ -9,19 +9,19 @@ const schematics_1 = require("@angular-devkit/schematics");
9
9
  function default_1(options) {
10
10
  const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'GridModule', package: 'grid', peerDependencies: {
11
11
  // peer deps of the dropdowns
12
- '@progress/kendo-angular-treeview': '24.0.0-develop.37',
13
- '@progress/kendo-angular-navigation': '24.0.0-develop.37',
12
+ '@progress/kendo-angular-treeview': '24.0.0-develop.39',
13
+ '@progress/kendo-angular-navigation': '24.0.0-develop.39',
14
14
  // peer dependency of kendo-angular-inputs
15
- '@progress/kendo-angular-dialog': '24.0.0-develop.37',
15
+ '@progress/kendo-angular-dialog': '24.0.0-develop.39',
16
16
  // peer dependency of kendo-angular-icons
17
17
  '@progress/kendo-svg-icons': '^4.0.0',
18
18
  // peer dependency of kendo-angular-layout
19
- '@progress/kendo-angular-progressbar': '24.0.0-develop.37',
19
+ '@progress/kendo-angular-progressbar': '24.0.0-develop.39',
20
20
  // transitive peer dependencies from toolbar
21
- '@progress/kendo-angular-indicators': '24.0.0-develop.37',
21
+ '@progress/kendo-angular-indicators': '24.0.0-develop.39',
22
22
  // transitive peer dependencies from conversational-ui
23
- '@progress/kendo-angular-menu': '24.0.0-develop.37',
24
- '@progress/kendo-angular-upload': '24.0.0-develop.37'
23
+ '@progress/kendo-angular-menu': '24.0.0-develop.39',
24
+ '@progress/kendo-angular-upload': '24.0.0-develop.39'
25
25
  } });
26
26
  return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
27
27
  }