@progress/kendo-angular-common 19.3.0-develop.11 → 19.3.0-develop.13
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.
|
@@ -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';
|
|
@@ -204,6 +204,26 @@ const areObjectsEqual = (firstObject, secondObject) => {
|
|
|
204
204
|
return equalSettings.length === Object.keys(firstObject).length;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
+
const processCssValue = (value) => {
|
|
208
|
+
if (typeof value === 'number') {
|
|
209
|
+
return `${value}px`;
|
|
210
|
+
}
|
|
211
|
+
else if (typeof value === 'string') {
|
|
212
|
+
const trimmedValue = value.trim();
|
|
213
|
+
const numValue = parseInt(trimmedValue, 10);
|
|
214
|
+
if (!isNaN(numValue) && Number.isFinite(numValue)) {
|
|
215
|
+
if (numValue.toString() === trimmedValue) {
|
|
216
|
+
return `${numValue}px`;
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
return value;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
return null;
|
|
223
|
+
}
|
|
224
|
+
return null;
|
|
225
|
+
};
|
|
226
|
+
|
|
207
227
|
class DraggableDirective {
|
|
208
228
|
element;
|
|
209
229
|
ngZone;
|
|
@@ -1555,5 +1575,5 @@ const replaceMessagePlaceholder = (message, name, value) => (message ?? '').repl
|
|
|
1555
1575
|
* Generated bundle index. Do not edit.
|
|
1556
1576
|
*/
|
|
1557
1577
|
|
|
1558
|
-
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, replaceMessagePlaceholder, rtlScrollPosition, scrollbarWidth, setHTMLAttributes, shouldShowValidationUI, splitStringToArray };
|
|
1578
|
+
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, processCssValue, removeHTMLAttributes, replaceMessagePlaceholder, rtlScrollPosition, scrollbarWidth, setHTMLAttributes, shouldShowValidationUI, splitStringToArray };
|
|
1559
1579
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-common",
|
|
3
|
-
"version": "19.3.0-develop.
|
|
3
|
+
"version": "19.3.0-develop.13",
|
|
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.
|
|
26
|
+
"@progress/kendo-angular-schematics": "19.3.0-develop.13"
|
|
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';
|