@progress/kendo-angular-common 11.0.0-develop.94 → 11.0.0-develop.96
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/esm2020/index.mjs
CHANGED
|
@@ -9,5 +9,6 @@ export * from './resize-sensor';
|
|
|
9
9
|
export * from './tokens';
|
|
10
10
|
export * from './utils';
|
|
11
11
|
export * from './enums';
|
|
12
|
+
export * from './utils/ng-class-parser';
|
|
12
13
|
export { PreventableEvent } from './preventable-event';
|
|
13
14
|
export { ScrollbarWidthService, scrollbarWidth } from './utils/scrollbar-width.service';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
export const isPresent = (value) => value !== null && value !== undefined;
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export const isString = (value) => value instanceof String || typeof value === 'string';
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
export const isObject = (value) => isPresent(value) && !Array.isArray(value) && typeof value === 'object';
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
export const splitStringToArray = (value) => value.trim().replace(/\s+/g, " ").split(' ');
|
|
22
|
+
/**
|
|
23
|
+
* Receives CSS class declarations either as an object, string or array and returns an array of the class names.
|
|
24
|
+
*
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
export const parseCSSClassNames = (value) => {
|
|
28
|
+
if (Array.isArray(value)) {
|
|
29
|
+
return parseArrayClassNames(value);
|
|
30
|
+
}
|
|
31
|
+
if (isObject(value)) {
|
|
32
|
+
return parseObjectClassNames(value);
|
|
33
|
+
}
|
|
34
|
+
if (isString(value)) {
|
|
35
|
+
return parseStringClassNames(value);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const parseObjectClassNames = (value) => {
|
|
39
|
+
const classes = [];
|
|
40
|
+
Object.keys(value).forEach((className) => {
|
|
41
|
+
const currentClassName = splitStringToArray(className);
|
|
42
|
+
if (value[className] && currentClassName.length) {
|
|
43
|
+
classes.push(...currentClassName);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return classes;
|
|
47
|
+
};
|
|
48
|
+
const parseStringClassNames = (value) => {
|
|
49
|
+
const classes = [];
|
|
50
|
+
const classesArray = splitStringToArray(value);
|
|
51
|
+
classesArray.forEach((className) => {
|
|
52
|
+
classes.push(className);
|
|
53
|
+
});
|
|
54
|
+
return classes;
|
|
55
|
+
};
|
|
56
|
+
const parseArrayClassNames = (value) => {
|
|
57
|
+
const classes = [];
|
|
58
|
+
value.forEach((className) => {
|
|
59
|
+
const current = splitStringToArray(className);
|
|
60
|
+
if (current[0]) {
|
|
61
|
+
classes.push(...current);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
return classes;
|
|
65
|
+
};
|
|
@@ -684,6 +684,68 @@ var Keys;
|
|
|
684
684
|
Keys[Keys["Tab"] = 9] = "Tab";
|
|
685
685
|
})(Keys || (Keys = {}));
|
|
686
686
|
|
|
687
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
688
|
+
/**
|
|
689
|
+
* @hidden
|
|
690
|
+
*/
|
|
691
|
+
const isPresent = (value) => value !== null && value !== undefined;
|
|
692
|
+
/**
|
|
693
|
+
* @hidden
|
|
694
|
+
*/
|
|
695
|
+
const isString = (value) => value instanceof String || typeof value === 'string';
|
|
696
|
+
/**
|
|
697
|
+
* @hidden
|
|
698
|
+
*/
|
|
699
|
+
const isObject = (value) => isPresent(value) && !Array.isArray(value) && typeof value === 'object';
|
|
700
|
+
/**
|
|
701
|
+
* @hidden
|
|
702
|
+
*/
|
|
703
|
+
const splitStringToArray = (value) => value.trim().replace(/\s+/g, " ").split(' ');
|
|
704
|
+
/**
|
|
705
|
+
* Receives CSS class declarations either as an object, string or array and returns an array of the class names.
|
|
706
|
+
*
|
|
707
|
+
* @hidden
|
|
708
|
+
*/
|
|
709
|
+
const parseCSSClassNames = (value) => {
|
|
710
|
+
if (Array.isArray(value)) {
|
|
711
|
+
return parseArrayClassNames(value);
|
|
712
|
+
}
|
|
713
|
+
if (isObject(value)) {
|
|
714
|
+
return parseObjectClassNames(value);
|
|
715
|
+
}
|
|
716
|
+
if (isString(value)) {
|
|
717
|
+
return parseStringClassNames(value);
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
const parseObjectClassNames = (value) => {
|
|
721
|
+
const classes = [];
|
|
722
|
+
Object.keys(value).forEach((className) => {
|
|
723
|
+
const currentClassName = splitStringToArray(className);
|
|
724
|
+
if (value[className] && currentClassName.length) {
|
|
725
|
+
classes.push(...currentClassName);
|
|
726
|
+
}
|
|
727
|
+
});
|
|
728
|
+
return classes;
|
|
729
|
+
};
|
|
730
|
+
const parseStringClassNames = (value) => {
|
|
731
|
+
const classes = [];
|
|
732
|
+
const classesArray = splitStringToArray(value);
|
|
733
|
+
classesArray.forEach((className) => {
|
|
734
|
+
classes.push(className);
|
|
735
|
+
});
|
|
736
|
+
return classes;
|
|
737
|
+
};
|
|
738
|
+
const parseArrayClassNames = (value) => {
|
|
739
|
+
const classes = [];
|
|
740
|
+
value.forEach((className) => {
|
|
741
|
+
const current = splitStringToArray(className);
|
|
742
|
+
if (current[0]) {
|
|
743
|
+
classes.push(...current);
|
|
744
|
+
}
|
|
745
|
+
});
|
|
746
|
+
return classes;
|
|
747
|
+
};
|
|
748
|
+
|
|
687
749
|
class PreventableEvent {
|
|
688
750
|
constructor() {
|
|
689
751
|
this.prevented = false;
|
|
@@ -749,5 +811,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
749
811
|
* Generated bundle index. Do not edit.
|
|
750
812
|
*/
|
|
751
813
|
|
|
752
|
-
export { DraggableDirective, DraggableModule, EventsModule, EventsOutsideAngularDirective, KendoInput, Keys, PreventableEvent, ResizeBatchService, ResizeCompatService, ResizeObserverService, ResizeSensorComponent, ResizeSensorModule, ScrollbarWidthService, anyChanged, closest, closestInScope, contains, findElement, findFocusable, findFocusableChild, guid, hasClasses, hasObservers, isChanged, isDocumentAvailable, isFocusable, isFocusableWithTabKey, isVisible, matchesClasses, matchesNodeName, rtlScrollPosition, scrollbarWidth };
|
|
814
|
+
export { DraggableDirective, DraggableModule, EventsModule, EventsOutsideAngularDirective, KendoInput, Keys, PreventableEvent, ResizeBatchService, ResizeCompatService, ResizeObserverService, ResizeSensorComponent, ResizeSensorModule, ScrollbarWidthService, anyChanged, closest, closestInScope, contains, findElement, findFocusable, findFocusableChild, guid, hasClasses, hasObservers, isChanged, isDocumentAvailable, isFocusable, isFocusableWithTabKey, isObject, isPresent, isString, isVisible, matchesClasses, matchesNodeName, parseCSSClassNames, rtlScrollPosition, scrollbarWidth, splitStringToArray };
|
|
753
815
|
|
|
@@ -680,6 +680,68 @@ var Keys;
|
|
|
680
680
|
Keys[Keys["Tab"] = 9] = "Tab";
|
|
681
681
|
})(Keys || (Keys = {}));
|
|
682
682
|
|
|
683
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
684
|
+
/**
|
|
685
|
+
* @hidden
|
|
686
|
+
*/
|
|
687
|
+
const isPresent = (value) => value !== null && value !== undefined;
|
|
688
|
+
/**
|
|
689
|
+
* @hidden
|
|
690
|
+
*/
|
|
691
|
+
const isString = (value) => value instanceof String || typeof value === 'string';
|
|
692
|
+
/**
|
|
693
|
+
* @hidden
|
|
694
|
+
*/
|
|
695
|
+
const isObject = (value) => isPresent(value) && !Array.isArray(value) && typeof value === 'object';
|
|
696
|
+
/**
|
|
697
|
+
* @hidden
|
|
698
|
+
*/
|
|
699
|
+
const splitStringToArray = (value) => value.trim().replace(/\s+/g, " ").split(' ');
|
|
700
|
+
/**
|
|
701
|
+
* Receives CSS class declarations either as an object, string or array and returns an array of the class names.
|
|
702
|
+
*
|
|
703
|
+
* @hidden
|
|
704
|
+
*/
|
|
705
|
+
const parseCSSClassNames = (value) => {
|
|
706
|
+
if (Array.isArray(value)) {
|
|
707
|
+
return parseArrayClassNames(value);
|
|
708
|
+
}
|
|
709
|
+
if (isObject(value)) {
|
|
710
|
+
return parseObjectClassNames(value);
|
|
711
|
+
}
|
|
712
|
+
if (isString(value)) {
|
|
713
|
+
return parseStringClassNames(value);
|
|
714
|
+
}
|
|
715
|
+
};
|
|
716
|
+
const parseObjectClassNames = (value) => {
|
|
717
|
+
const classes = [];
|
|
718
|
+
Object.keys(value).forEach((className) => {
|
|
719
|
+
const currentClassName = splitStringToArray(className);
|
|
720
|
+
if (value[className] && currentClassName.length) {
|
|
721
|
+
classes.push(...currentClassName);
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
return classes;
|
|
725
|
+
};
|
|
726
|
+
const parseStringClassNames = (value) => {
|
|
727
|
+
const classes = [];
|
|
728
|
+
const classesArray = splitStringToArray(value);
|
|
729
|
+
classesArray.forEach((className) => {
|
|
730
|
+
classes.push(className);
|
|
731
|
+
});
|
|
732
|
+
return classes;
|
|
733
|
+
};
|
|
734
|
+
const parseArrayClassNames = (value) => {
|
|
735
|
+
const classes = [];
|
|
736
|
+
value.forEach((className) => {
|
|
737
|
+
const current = splitStringToArray(className);
|
|
738
|
+
if (current[0]) {
|
|
739
|
+
classes.push(...current);
|
|
740
|
+
}
|
|
741
|
+
});
|
|
742
|
+
return classes;
|
|
743
|
+
};
|
|
744
|
+
|
|
683
745
|
class PreventableEvent {
|
|
684
746
|
constructor() {
|
|
685
747
|
this.prevented = false;
|
|
@@ -745,5 +807,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
745
807
|
* Generated bundle index. Do not edit.
|
|
746
808
|
*/
|
|
747
809
|
|
|
748
|
-
export { DraggableDirective, DraggableModule, EventsModule, EventsOutsideAngularDirective, KendoInput, Keys, PreventableEvent, ResizeBatchService, ResizeCompatService, ResizeObserverService, ResizeSensorComponent, ResizeSensorModule, ScrollbarWidthService, anyChanged, closest, closestInScope, contains, findElement, findFocusable, findFocusableChild, guid, hasClasses, hasObservers, isChanged, isDocumentAvailable, isFocusable, isFocusableWithTabKey, isVisible, matchesClasses, matchesNodeName, rtlScrollPosition, scrollbarWidth };
|
|
810
|
+
export { DraggableDirective, DraggableModule, EventsModule, EventsOutsideAngularDirective, KendoInput, Keys, PreventableEvent, ResizeBatchService, ResizeCompatService, ResizeObserverService, ResizeSensorComponent, ResizeSensorModule, ScrollbarWidthService, anyChanged, closest, closestInScope, contains, findElement, findFocusable, findFocusableChild, guid, hasClasses, hasObservers, isChanged, isDocumentAvailable, isFocusable, isFocusableWithTabKey, isObject, isPresent, isString, isVisible, matchesClasses, matchesNodeName, parseCSSClassNames, rtlScrollPosition, scrollbarWidth, splitStringToArray };
|
|
749
811
|
|
package/index.d.ts
CHANGED
|
@@ -9,5 +9,6 @@ export * from './resize-sensor';
|
|
|
9
9
|
export * from './tokens';
|
|
10
10
|
export * from './utils';
|
|
11
11
|
export * from './enums';
|
|
12
|
+
export * from './utils/ng-class-parser';
|
|
12
13
|
export { PreventableEvent } from './preventable-event';
|
|
13
14
|
export { ScrollbarWidthService, scrollbarWidth } from './utils/scrollbar-width.service';
|
package/package.json
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 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 isPresent: (value: any) => boolean;
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare const isString: (value: any) => value is string;
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export declare const isObject: (value: any) => value is object;
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
export declare const splitStringToArray: (value: string) => string[];
|
|
21
|
+
/**
|
|
22
|
+
* Receives CSS class declarations either as an object, string or array and returns an array of the class names.
|
|
23
|
+
*
|
|
24
|
+
* @hidden
|
|
25
|
+
*/
|
|
26
|
+
export declare const parseCSSClassNames: (value: any) => Array<string>;
|