@progress/kendo-angular-common 19.3.0-develop.3 → 19.3.0-develop.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm2022/index.mjs CHANGED
@@ -18,3 +18,4 @@ export { ScrollbarWidthService, scrollbarWidth } from './utils/scrollbar-width.s
18
18
  export * from './toggle-button-tab-stop';
19
19
  export * from './directives';
20
20
  export * from './template-context';
21
+ export * from './localization/replace-message-placeholder';
@@ -0,0 +1,8 @@
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
+ * @hidden
7
+ */
8
+ export const replaceMessagePlaceholder = (message, name, value) => (message ?? '').replace(new RegExp(`{\\s*${name}\\s*}`, 'g'), value);
@@ -0,0 +1,23 @@
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 const processCssValue = (value) => {
6
+ if (typeof value === 'number') {
7
+ return `${value}px`;
8
+ }
9
+ else if (typeof value === 'string') {
10
+ const trimmedValue = value.trim();
11
+ const numValue = parseInt(trimmedValue, 10);
12
+ if (!isNaN(numValue) && Number.isFinite(numValue)) {
13
+ if (numValue.toString() === trimmedValue) {
14
+ return `${numValue}px`;
15
+ }
16
+ else {
17
+ return value;
18
+ }
19
+ }
20
+ return null;
21
+ }
22
+ return null;
23
+ };
package/esm2022/utils.mjs CHANGED
@@ -11,3 +11,4 @@ export { isSafari, isFirefox } from './utils/detect-browser';
11
11
  export * from './utils/html-attributes';
12
12
  export { isControlRequired } from './utils/forms-utils';
13
13
  export { areObjectsEqual } from './utils/objects-equal';
14
+ export { processCssValue } from './utils/process-css-value';
@@ -3,4 +3,4 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  export { WatermarkOverlayComponent } from './watermark.component';
6
- export { shouldShowValidationUI } from './validation';
6
+ export { shouldShowValidationUI, getLicenseMessage } from './validation';
@@ -2,6 +2,7 @@
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 { getLicenseStatus } from "@progress/kendo-licensing";
5
6
  const allowed = ['telerik.com', 'progress.com', 'stackblitz.io', 'csb.app'];
6
7
  /**
7
8
  * @hidden
@@ -10,3 +11,12 @@ export function shouldShowValidationUI(isPackageValid) {
10
11
  const skip = allowed.some((hostname) => globalThis.document?.location.hostname.endsWith(hostname));
11
12
  return !skip && !isPackageValid;
12
13
  }
14
+ /**
15
+ * @hidden
16
+ *
17
+ * Returns the notification message to display, if any.
18
+ */
19
+ export function getLicenseMessage(meta) {
20
+ const message = getLicenseStatus(meta).message;
21
+ return message?.notificationMessage;
22
+ }
@@ -2,7 +2,7 @@
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 { Component, ElementRef, HostBinding, ViewChild } from '@angular/core';
5
+ import { Component, ElementRef, HostBinding, Input, ViewChild } from '@angular/core';
6
6
  import { watermarkStyles, bannerStyles, licenseKeyUrl, buttonStyles } from './utils';
7
7
  import { isDocumentAvailable } from '../utils';
8
8
  import { NgIf, NgStyle } from '@angular/common';
@@ -13,6 +13,7 @@ let bannerPresentOnPage = false;
13
13
  */
14
14
  export class WatermarkOverlayComponent {
15
15
  watermarkStyle = watermarkStyles;
16
+ licenseMessage;
16
17
  banner;
17
18
  isOpen = true;
18
19
  bannerMounted = false;
@@ -42,7 +43,7 @@ export class WatermarkOverlayComponent {
42
43
  return isDocumentAvailable() && this.banner && this.banner.nativeElement;
43
44
  }
44
45
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WatermarkOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
45
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: WatermarkOverlayComponent, isStandalone: true, selector: "div[kendoWatermarkOverlay]", host: { properties: { "style": "this.watermarkStyle" } }, viewQueries: [{ propertyName: "banner", first: true, predicate: ["banner"], descendants: true }], ngImport: i0, template: `
46
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: WatermarkOverlayComponent, isStandalone: true, selector: "div[kendoWatermarkOverlay]", inputs: { licenseMessage: "licenseMessage" }, host: { properties: { "style": "this.watermarkStyle" } }, viewQueries: [{ propertyName: "banner", first: true, predicate: ["banner"], descendants: true }], ngImport: i0, template: `
46
47
  <div #banner *ngIf="isOpen && bannerMounted" [ngStyle]="bannerStyles">
47
48
  <span [ngStyle]="{ display: 'flex', alignSelf: 'center', marginRight: '8px' }">
48
49
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none">
@@ -50,7 +51,8 @@ export class WatermarkOverlayComponent {
50
51
  </svg>
51
52
  </span>
52
53
 
53
- <span>
54
+ <span *ngIf="licenseMessage" [innerHtml]="licenseMessage"></span>
55
+ <span *ngIf="!licenseMessage">
54
56
  We couldn't verify your <a [href]="licenseKeyUrl">license key</a> for Kendo UI for Angular. Please see the browser
55
57
  console for details and resolution steps.
56
58
  </span>
@@ -77,7 +79,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
77
79
  </svg>
78
80
  </span>
79
81
 
80
- <span>
82
+ <span *ngIf="licenseMessage" [innerHtml]="licenseMessage"></span>
83
+ <span *ngIf="!licenseMessage">
81
84
  We couldn't verify your <a [href]="licenseKeyUrl">license key</a> for Kendo UI for Angular. Please see the browser
82
85
  console for details and resolution steps.
83
86
  </span>
@@ -97,6 +100,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
97
100
  }], propDecorators: { watermarkStyle: [{
98
101
  type: HostBinding,
99
102
  args: ['style']
103
+ }], licenseMessage: [{
104
+ type: Input
100
105
  }], banner: [{
101
106
  type: ViewChild,
102
107
  args: ['banner']
@@ -9,6 +9,7 @@ import { take, auditTime } from 'rxjs/operators';
9
9
  import { Draggable } from '@progress/kendo-draggable';
10
10
  import { merge, fromEvent, from, Subscription } from 'rxjs';
11
11
  import { NgIf, NgStyle } from '@angular/common';
12
+ import { getLicenseStatus } from '@progress/kendo-licensing';
12
13
 
13
14
  /**
14
15
  * @hidden
@@ -204,6 +205,26 @@ const areObjectsEqual = (firstObject, secondObject) => {
204
205
  return equalSettings.length === Object.keys(firstObject).length;
205
206
  };
206
207
 
208
+ const processCssValue = (value) => {
209
+ if (typeof value === 'number') {
210
+ return `${value}px`;
211
+ }
212
+ else if (typeof value === 'string') {
213
+ const trimmedValue = value.trim();
214
+ const numValue = parseInt(trimmedValue, 10);
215
+ if (!isNaN(numValue) && Number.isFinite(numValue)) {
216
+ if (numValue.toString() === trimmedValue) {
217
+ return `${numValue}px`;
218
+ }
219
+ else {
220
+ return value;
221
+ }
222
+ }
223
+ return null;
224
+ }
225
+ return null;
226
+ };
227
+
207
228
  class DraggableDirective {
208
229
  element;
209
230
  ngZone;
@@ -912,6 +933,7 @@ let bannerPresentOnPage = false;
912
933
  */
913
934
  class WatermarkOverlayComponent {
914
935
  watermarkStyle = watermarkStyles;
936
+ licenseMessage;
915
937
  banner;
916
938
  isOpen = true;
917
939
  bannerMounted = false;
@@ -941,7 +963,7 @@ class WatermarkOverlayComponent {
941
963
  return isDocumentAvailable() && this.banner && this.banner.nativeElement;
942
964
  }
943
965
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WatermarkOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
944
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: WatermarkOverlayComponent, isStandalone: true, selector: "div[kendoWatermarkOverlay]", host: { properties: { "style": "this.watermarkStyle" } }, viewQueries: [{ propertyName: "banner", first: true, predicate: ["banner"], descendants: true }], ngImport: i0, template: `
966
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: WatermarkOverlayComponent, isStandalone: true, selector: "div[kendoWatermarkOverlay]", inputs: { licenseMessage: "licenseMessage" }, host: { properties: { "style": "this.watermarkStyle" } }, viewQueries: [{ propertyName: "banner", first: true, predicate: ["banner"], descendants: true }], ngImport: i0, template: `
945
967
  <div #banner *ngIf="isOpen && bannerMounted" [ngStyle]="bannerStyles">
946
968
  <span [ngStyle]="{ display: 'flex', alignSelf: 'center', marginRight: '8px' }">
947
969
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none">
@@ -949,7 +971,8 @@ class WatermarkOverlayComponent {
949
971
  </svg>
950
972
  </span>
951
973
 
952
- <span>
974
+ <span *ngIf="licenseMessage" [innerHtml]="licenseMessage"></span>
975
+ <span *ngIf="!licenseMessage">
953
976
  We couldn't verify your <a [href]="licenseKeyUrl">license key</a> for Kendo UI for Angular. Please see the browser
954
977
  console for details and resolution steps.
955
978
  </span>
@@ -976,7 +999,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
976
999
  </svg>
977
1000
  </span>
978
1001
 
979
- <span>
1002
+ <span *ngIf="licenseMessage" [innerHtml]="licenseMessage"></span>
1003
+ <span *ngIf="!licenseMessage">
980
1004
  We couldn't verify your <a [href]="licenseKeyUrl">license key</a> for Kendo UI for Angular. Please see the browser
981
1005
  console for details and resolution steps.
982
1006
  </span>
@@ -996,6 +1020,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
996
1020
  }], propDecorators: { watermarkStyle: [{
997
1021
  type: HostBinding,
998
1022
  args: ['style']
1023
+ }], licenseMessage: [{
1024
+ type: Input
999
1025
  }], banner: [{
1000
1026
  type: ViewChild,
1001
1027
  args: ['banner']
@@ -1009,6 +1035,15 @@ function shouldShowValidationUI(isPackageValid) {
1009
1035
  const skip = allowed.some((hostname) => globalThis.document?.location.hostname.endsWith(hostname));
1010
1036
  return !skip && !isPackageValid;
1011
1037
  }
1038
+ /**
1039
+ * @hidden
1040
+ *
1041
+ * Returns the notification message to display, if any.
1042
+ */
1043
+ function getLicenseMessage(meta) {
1044
+ const message = getLicenseStatus(meta).message;
1045
+ return message?.notificationMessage;
1046
+ }
1012
1047
 
1013
1048
  /**
1014
1049
  * Specifies the adornments in the prefix container of the [Inputs](slug:adornments_textbox#toc-prefix-adornments) and [DropDowns](slug:adornments_multiselect#toc-prefix-adornments).
@@ -1546,9 +1581,14 @@ const KENDO_TEMPLATE_CONTEXT = [
1546
1581
  TemplateContextDirective
1547
1582
  ];
1548
1583
 
1584
+ /**
1585
+ * @hidden
1586
+ */
1587
+ const replaceMessagePlaceholder = (message, name, value) => (message ?? '').replace(new RegExp(`{\\s*${name}\\s*}`, 'g'), value);
1588
+
1549
1589
  /**
1550
1590
  * Generated bundle index. Do not edit.
1551
1591
  */
1552
1592
 
1553
- export { DraggableDirective, EventsOutsideAngularDirective, KENDO_ADORNMENTS, KENDO_COMMON, KENDO_DRAGGABLE, KENDO_EVENTS, KENDO_RESIZESENSOR, KENDO_TEMPLATE_CONTEXT, KENDO_TOGGLEBUTTONTABSTOP, KENDO_WATERMARK, KendoInput, Keys, MultiTabStop, PrefixTemplateDirective, PreventableEvent, ResizeBatchService, ResizeCompatService, ResizeObserverService, ResizeSensorComponent, ScrollbarWidthService, SeparatorComponent, SuffixTemplateDirective, TemplateContextDirective, ToggleButtonTabStopDirective, WatermarkOverlayComponent, anyChanged, applyAttributes, areObjectsEqual, closest, closestBySelector, closestInScope, contains, findElement, findFocusable, findFocusableChild, focusableSelector, guid, hasClasses, hasObservers, isChanged, isControlRequired, isDocumentAvailable, isFirefox, isFocusable, isFocusableWithTabKey, isObject, isObjectPresent, isPresent, isSafari, isString, isVisible, matchesClasses, matchesNodeName, parseAttributes, parseCSSClassNames, removeHTMLAttributes, rtlScrollPosition, scrollbarWidth, setHTMLAttributes, shouldShowValidationUI, splitStringToArray };
1593
+ export { DraggableDirective, EventsOutsideAngularDirective, KENDO_ADORNMENTS, KENDO_COMMON, KENDO_DRAGGABLE, KENDO_EVENTS, KENDO_RESIZESENSOR, KENDO_TEMPLATE_CONTEXT, KENDO_TOGGLEBUTTONTABSTOP, KENDO_WATERMARK, KendoInput, Keys, MultiTabStop, PrefixTemplateDirective, PreventableEvent, ResizeBatchService, ResizeCompatService, ResizeObserverService, ResizeSensorComponent, ScrollbarWidthService, SeparatorComponent, SuffixTemplateDirective, TemplateContextDirective, ToggleButtonTabStopDirective, WatermarkOverlayComponent, anyChanged, applyAttributes, areObjectsEqual, closest, closestBySelector, closestInScope, contains, findElement, findFocusable, findFocusableChild, focusableSelector, getLicenseMessage, guid, hasClasses, hasObservers, isChanged, isControlRequired, isDocumentAvailable, isFirefox, isFocusable, isFocusableWithTabKey, isObject, isObjectPresent, isPresent, isSafari, isString, isVisible, matchesClasses, matchesNodeName, parseAttributes, parseCSSClassNames, processCssValue, removeHTMLAttributes, replaceMessagePlaceholder, rtlScrollPosition, scrollbarWidth, setHTMLAttributes, shouldShowValidationUI, splitStringToArray };
1554
1594
 
package/index.d.ts CHANGED
@@ -18,3 +18,4 @@ export { ScrollbarWidthService, scrollbarWidth } from './utils/scrollbar-width.s
18
18
  export * from './toggle-button-tab-stop';
19
19
  export * from './directives';
20
20
  export * from './template-context';
21
+ export * from './localization/replace-message-placeholder';
@@ -0,0 +1,8 @@
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
+ * @hidden
7
+ */
8
+ export declare const replaceMessagePlaceholder: (message: string, name: string, value: string) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-common",
3
- "version": "19.3.0-develop.3",
3
+ "version": "19.3.0-develop.31",
4
4
  "description": "Kendo UI for Angular - Utility Package",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -23,7 +23,7 @@
23
23
  "@progress/kendo-common": "^1.0.1",
24
24
  "@progress/kendo-draggable": "^3.0.2",
25
25
  "tslib": "^2.3.1",
26
- "@progress/kendo-angular-schematics": "19.3.0-develop.3"
26
+ "@progress/kendo-angular-schematics": "19.3.0-develop.31"
27
27
  },
28
28
  "publishConfig": {
29
29
  "access": "public"
@@ -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 declare const processCssValue: (value: number | string) => string | null;
package/utils.d.ts CHANGED
@@ -11,3 +11,4 @@ export { isSafari, isFirefox } from './utils/detect-browser';
11
11
  export * from './utils/html-attributes';
12
12
  export { isControlRequired } from './utils/forms-utils';
13
13
  export { areObjectsEqual } from './utils/objects-equal';
14
+ export { processCssValue } from './utils/process-css-value';
@@ -3,4 +3,4 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  export { WatermarkOverlayComponent } from './watermark.component';
6
- export { shouldShowValidationUI } from './validation';
6
+ export { shouldShowValidationUI, getLicenseMessage } from './validation';
@@ -2,7 +2,14 @@
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 { PackageMetadata } from "@progress/kendo-licensing";
5
6
  /**
6
7
  * @hidden
7
8
  */
8
9
  export declare function shouldShowValidationUI(isPackageValid: boolean): boolean;
10
+ /**
11
+ * @hidden
12
+ *
13
+ * Returns the notification message to display, if any.
14
+ */
15
+ export declare function getLicenseMessage(meta: PackageMetadata): string | undefined;
@@ -9,6 +9,7 @@ import * as i0 from "@angular/core";
9
9
  */
10
10
  export declare class WatermarkOverlayComponent implements OnInit, AfterViewInit, OnDestroy {
11
11
  watermarkStyle: string;
12
+ licenseMessage?: string;
12
13
  banner: ElementRef;
13
14
  isOpen: boolean;
14
15
  bannerMounted: boolean;
@@ -47,5 +48,5 @@ export declare class WatermarkOverlayComponent implements OnInit, AfterViewInit,
47
48
  closeBanner(): void;
48
49
  get isBannerRendered(): boolean;
49
50
  static ɵfac: i0.ɵɵFactoryDeclaration<WatermarkOverlayComponent, never>;
50
- static ɵcmp: i0.ɵɵComponentDeclaration<WatermarkOverlayComponent, "div[kendoWatermarkOverlay]", never, {}, {}, never, never, true, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<WatermarkOverlayComponent, "div[kendoWatermarkOverlay]", never, { "licenseMessage": { "alias": "licenseMessage"; "required": false; }; }, {}, never, never, true, never>;
51
52
  }