@progress/kendo-angular-common 21.4.1 → 22.0.0-develop.1
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/fesm2022/progress-kendo-angular-common.mjs +34 -34
- package/package.json +5 -7
- package/esm2022/adornments/prefix.directive.mjs +0 -53
- package/esm2022/adornments/separator-orientation.mjs +0 -5
- package/esm2022/adornments/separator.component.mjs +0 -70
- package/esm2022/adornments/suffix.directive.mjs +0 -59
- package/esm2022/adornments.mjs +0 -7
- package/esm2022/directives.mjs +0 -68
- package/esm2022/dom-queries/closest-by-selector.mjs +0 -20
- package/esm2022/dom-queries/closest-in-scope.mjs +0 -13
- package/esm2022/dom-queries/closest.mjs +0 -10
- package/esm2022/dom-queries/contains.mjs +0 -13
- package/esm2022/dom-queries/find-element.mjs +0 -22
- package/esm2022/dom-queries/find-focusable-child.mjs +0 -9
- package/esm2022/dom-queries/find-focusable.mjs +0 -9
- package/esm2022/dom-queries/has-classes.mjs +0 -9
- package/esm2022/dom-queries/is-focusable-with-tab-key.mjs +0 -14
- package/esm2022/dom-queries/is-focusable.mjs +0 -14
- package/esm2022/dom-queries/is-visible.mjs +0 -12
- package/esm2022/dom-queries/matches-classes.mjs +0 -6
- package/esm2022/dom-queries/matches-node-name.mjs +0 -11
- package/esm2022/dom-queries/rtl-scroll-position.mjs +0 -17
- package/esm2022/dom-queries.mjs +0 -18
- package/esm2022/draggable/draggable.directive.mjs +0 -68
- package/esm2022/draggable.mjs +0 -5
- package/esm2022/enums/keys.mjs +0 -75
- package/esm2022/enums.mjs +0 -5
- package/esm2022/events/events-outside-angular.directive.mjs +0 -58
- package/esm2022/events.mjs +0 -5
- package/esm2022/index.mjs +0 -24
- package/esm2022/localization/replace-message-placeholder.mjs +0 -8
- package/esm2022/preventable-event.mjs +0 -22
- package/esm2022/progress-kendo-angular-common.mjs +0 -8
- package/esm2022/resize-sensor/compat.service.mjs +0 -103
- package/esm2022/resize-sensor/observer.service.mjs +0 -41
- package/esm2022/resize-sensor/resize-batch.service.mjs +0 -69
- package/esm2022/resize-sensor/resize-sensor.component.mjs +0 -71
- package/esm2022/resize-sensor/resize.service.mjs +0 -65
- package/esm2022/resize-sensor.mjs +0 -8
- package/esm2022/template-context/index.mjs +0 -5
- package/esm2022/template-context/template-context.directive.mjs +0 -37
- package/esm2022/toggle-button-tab-stop/toggle-button-tab-stop.directive.mjs +0 -262
- package/esm2022/toggle-button-tab-stop/toggle-button-tab-stop.mjs +0 -10
- package/esm2022/toggle-button-tab-stop.mjs +0 -6
- package/esm2022/tokens.mjs +0 -6
- package/esm2022/utils/any-changed.mjs +0 -9
- package/esm2022/utils/detect-browser.mjs +0 -28
- package/esm2022/utils/focusable-selectors.mjs +0 -20
- package/esm2022/utils/forms-utils.mjs +0 -13
- package/esm2022/utils/getter.mjs +0 -27
- package/esm2022/utils/guid.mjs +0 -29
- package/esm2022/utils/has-observers.mjs +0 -8
- package/esm2022/utils/html-attributes.mjs +0 -49
- package/esm2022/utils/is-changed.mjs +0 -10
- package/esm2022/utils/is-document-available.mjs +0 -8
- package/esm2022/utils/keys-normalizer.mjs +0 -95
- package/esm2022/utils/ng-class-parser.mjs +0 -78
- package/esm2022/utils/objects-equal.mjs +0 -12
- package/esm2022/utils/process-css-value.mjs +0 -23
- package/esm2022/utils/scrollbar-width.service.mjs +0 -43
- package/esm2022/utils/setter.mjs +0 -28
- package/esm2022/utils.mjs +0 -14
- package/esm2022/watermark/index.mjs +0 -6
- package/esm2022/watermark/utils.mjs +0 -58
- package/esm2022/watermark/validation.mjs +0 -22
- package/esm2022/watermark/watermark.component.mjs +0 -116
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
export const isVisible = (element) => {
|
|
6
|
-
const rect = element.getBoundingClientRect();
|
|
7
|
-
const hasSize = rect.width > 0 && rect.height > 0;
|
|
8
|
-
const hasPosition = rect.x !== 0 && rect.y !== 0;
|
|
9
|
-
// Elements can have zero size due to styling, but they will still count as visible.
|
|
10
|
-
// For example, the selection checkbox has no size, but is made visible through styling.
|
|
11
|
-
return (hasSize || hasPosition) && window.getComputedStyle(element).visibility !== 'hidden';
|
|
12
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
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
|
-
import { hasClasses } from './has-classes';
|
|
6
|
-
export const matchesClasses = (classNames) => (element) => hasClasses(element, classNames);
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
const NODE_NAME_PREDICATES = {};
|
|
6
|
-
export const matchesNodeName = (nodeName) => {
|
|
7
|
-
if (!NODE_NAME_PREDICATES[nodeName]) {
|
|
8
|
-
NODE_NAME_PREDICATES[nodeName] = (element) => String(element.nodeName).toLowerCase() === nodeName.toLowerCase();
|
|
9
|
-
}
|
|
10
|
-
return NODE_NAME_PREDICATES[nodeName];
|
|
11
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
/**
|
|
6
|
-
* Normalizes a scroll position value in RTL mode.
|
|
7
|
-
*/
|
|
8
|
-
export function rtlScrollPosition(position, element, initial) {
|
|
9
|
-
let result = position;
|
|
10
|
-
if (initial < 0) {
|
|
11
|
-
result = -position;
|
|
12
|
-
}
|
|
13
|
-
else if (initial > 0) {
|
|
14
|
-
result = element.scrollWidth - element.offsetWidth - position;
|
|
15
|
-
}
|
|
16
|
-
return result;
|
|
17
|
-
}
|
package/esm2022/dom-queries.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
export { closestInScope } from './dom-queries/closest-in-scope';
|
|
6
|
-
export { closest } from './dom-queries/closest';
|
|
7
|
-
export { contains } from './dom-queries/contains';
|
|
8
|
-
export { findElement } from './dom-queries/find-element';
|
|
9
|
-
export { findFocusableChild } from './dom-queries/find-focusable-child';
|
|
10
|
-
export { findFocusable } from './dom-queries/find-focusable';
|
|
11
|
-
export { hasClasses } from './dom-queries/has-classes';
|
|
12
|
-
export { isFocusableWithTabKey } from './dom-queries/is-focusable-with-tab-key';
|
|
13
|
-
export { isFocusable } from './dom-queries/is-focusable';
|
|
14
|
-
export { isVisible } from './dom-queries/is-visible';
|
|
15
|
-
export { matchesClasses } from './dom-queries/matches-classes';
|
|
16
|
-
export { matchesNodeName } from './dom-queries/matches-node-name';
|
|
17
|
-
export { rtlScrollPosition } from './dom-queries/rtl-scroll-position';
|
|
18
|
-
export { closestBySelector } from './dom-queries/closest-by-selector';
|
|
@@ -1,68 +0,0 @@
|
|
|
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
|
-
import { EventEmitter, ElementRef, Directive, Output, NgZone, Input } from '@angular/core';
|
|
6
|
-
import { isDocumentAvailable, isChanged } from '../utils';
|
|
7
|
-
import { Draggable } from '@progress/kendo-draggable';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
export class DraggableDirective {
|
|
10
|
-
element;
|
|
11
|
-
ngZone;
|
|
12
|
-
enableDrag = true;
|
|
13
|
-
kendoPress = new EventEmitter();
|
|
14
|
-
kendoDrag = new EventEmitter();
|
|
15
|
-
kendoRelease = new EventEmitter();
|
|
16
|
-
draggable;
|
|
17
|
-
constructor(element, ngZone) {
|
|
18
|
-
this.element = element;
|
|
19
|
-
this.ngZone = ngZone;
|
|
20
|
-
}
|
|
21
|
-
ngOnInit() {
|
|
22
|
-
this.toggleDraggable();
|
|
23
|
-
}
|
|
24
|
-
ngOnChanges(changes) {
|
|
25
|
-
if (isChanged('enableDrag', changes)) {
|
|
26
|
-
this.toggleDraggable();
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
ngOnDestroy() {
|
|
30
|
-
this.destroyDraggable();
|
|
31
|
-
}
|
|
32
|
-
toggleDraggable() {
|
|
33
|
-
if (isDocumentAvailable()) {
|
|
34
|
-
this.destroyDraggable();
|
|
35
|
-
if (this.enableDrag) {
|
|
36
|
-
this.draggable = new Draggable({
|
|
37
|
-
drag: (e) => this.kendoDrag.next(e),
|
|
38
|
-
press: (e) => this.kendoPress.next(e),
|
|
39
|
-
release: (e) => this.kendoRelease.next(e)
|
|
40
|
-
});
|
|
41
|
-
this.ngZone.runOutsideAngular(() => this.draggable?.bindTo(this.element.nativeElement));
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
destroyDraggable() {
|
|
46
|
-
if (this.draggable) {
|
|
47
|
-
this.draggable.destroy();
|
|
48
|
-
this.draggable = undefined;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DraggableDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
52
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: DraggableDirective, isStandalone: true, selector: "[kendoDraggable]", inputs: { enableDrag: "enableDrag" }, outputs: { kendoPress: "kendoPress", kendoDrag: "kendoDrag", kendoRelease: "kendoRelease" }, usesOnChanges: true, ngImport: i0 });
|
|
53
|
-
}
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DraggableDirective, decorators: [{
|
|
55
|
-
type: Directive,
|
|
56
|
-
args: [{
|
|
57
|
-
selector: '[kendoDraggable]',
|
|
58
|
-
standalone: true
|
|
59
|
-
}]
|
|
60
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { enableDrag: [{
|
|
61
|
-
type: Input
|
|
62
|
-
}], kendoPress: [{
|
|
63
|
-
type: Output
|
|
64
|
-
}], kendoDrag: [{
|
|
65
|
-
type: Output
|
|
66
|
-
}], kendoRelease: [{
|
|
67
|
-
type: Output
|
|
68
|
-
}] } });
|
package/esm2022/draggable.mjs
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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
|
-
export { DraggableDirective } from './draggable/draggable.directive';
|
package/esm2022/enums/keys.mjs
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
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
|
-
/**
|
|
6
|
-
* Enum with key codes.
|
|
7
|
-
*/
|
|
8
|
-
export var Keys;
|
|
9
|
-
(function (Keys) {
|
|
10
|
-
Keys["ArrowDown"] = "ArrowDown";
|
|
11
|
-
Keys["ArrowLeft"] = "ArrowLeft";
|
|
12
|
-
Keys["ArrowRight"] = "ArrowRight";
|
|
13
|
-
Keys["ArrowUp"] = "ArrowUp";
|
|
14
|
-
Keys["Backspace"] = "Backspace";
|
|
15
|
-
Keys["Delete"] = "Delete";
|
|
16
|
-
Keys["Digit0"] = "Digit0";
|
|
17
|
-
Keys["Digit1"] = "Digit1";
|
|
18
|
-
Keys["Digit2"] = "Digit2";
|
|
19
|
-
Keys["Digit3"] = "Digit3";
|
|
20
|
-
Keys["Digit4"] = "Digit4";
|
|
21
|
-
Keys["Digit5"] = "Digit5";
|
|
22
|
-
Keys["Digit6"] = "Digit6";
|
|
23
|
-
Keys["Digit7"] = "Digit7";
|
|
24
|
-
Keys["Digit8"] = "Digit8";
|
|
25
|
-
Keys["Digit9"] = "Digit9";
|
|
26
|
-
Keys["End"] = "End";
|
|
27
|
-
Keys["Enter"] = "Enter";
|
|
28
|
-
Keys["Escape"] = "Escape";
|
|
29
|
-
Keys["F1"] = "F1";
|
|
30
|
-
Keys["F2"] = "F2";
|
|
31
|
-
Keys["F10"] = "F10";
|
|
32
|
-
Keys["Home"] = "Home";
|
|
33
|
-
Keys["KeyA"] = "KeyA";
|
|
34
|
-
Keys["KeyB"] = "KeyB";
|
|
35
|
-
Keys["KeyC"] = "KeyC";
|
|
36
|
-
Keys["KeyD"] = "KeyD";
|
|
37
|
-
Keys["KeyE"] = "KeyE";
|
|
38
|
-
Keys["KeyF"] = "KeyF";
|
|
39
|
-
Keys["KeyG"] = "KeyG";
|
|
40
|
-
Keys["KeyH"] = "KeyH";
|
|
41
|
-
Keys["KeyI"] = "KeyI";
|
|
42
|
-
Keys["KeyJ"] = "KeyJ";
|
|
43
|
-
Keys["KeyK"] = "KeyK";
|
|
44
|
-
Keys["KeyL"] = "KeyL";
|
|
45
|
-
Keys["KeyM"] = "KeyM";
|
|
46
|
-
Keys["KeyN"] = "KeyN";
|
|
47
|
-
Keys["KeyO"] = "KeyO";
|
|
48
|
-
Keys["KeyP"] = "KeyP";
|
|
49
|
-
Keys["KeyQ"] = "KeyQ";
|
|
50
|
-
Keys["KeyR"] = "KeyR";
|
|
51
|
-
Keys["KeyS"] = "KeyS";
|
|
52
|
-
Keys["KeyT"] = "KeyT";
|
|
53
|
-
Keys["KeyU"] = "KeyU";
|
|
54
|
-
Keys["KeyV"] = "KeyV";
|
|
55
|
-
Keys["KeyW"] = "KeyW";
|
|
56
|
-
Keys["KeyX"] = "KeyX";
|
|
57
|
-
Keys["KeyY"] = "KeyY";
|
|
58
|
-
Keys["KeyZ"] = "KeyZ";
|
|
59
|
-
Keys["Numpad1"] = "Numpad1";
|
|
60
|
-
Keys["Numpad2"] = "Numpad2";
|
|
61
|
-
Keys["Numpad3"] = "Numpad3";
|
|
62
|
-
Keys["Numpad4"] = "Numpad4";
|
|
63
|
-
Keys["Numpad5"] = "Numpad5";
|
|
64
|
-
Keys["Numpad6"] = "Numpad6";
|
|
65
|
-
Keys["Numpad7"] = "Numpad7";
|
|
66
|
-
Keys["Numpad8"] = "Numpad8";
|
|
67
|
-
Keys["Numpad9"] = "Numpad9";
|
|
68
|
-
Keys["Numpad0"] = "Numpad0";
|
|
69
|
-
Keys["NumpadEnter"] = "NumpadEnter";
|
|
70
|
-
Keys["NumpadDecimal"] = "NumpadDecimal";
|
|
71
|
-
Keys["PageDown"] = "PageDown";
|
|
72
|
-
Keys["PageUp"] = "PageUp";
|
|
73
|
-
Keys["Space"] = "Space";
|
|
74
|
-
Keys["Tab"] = "Tab";
|
|
75
|
-
})(Keys || (Keys = {}));
|
package/esm2022/enums.mjs
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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
|
-
export { Keys } from './enums/keys';
|
|
@@ -1,58 +0,0 @@
|
|
|
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
|
-
import { Directive, ElementRef, Input, Renderer2, NgZone } from '@angular/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
export class EventsOutsideAngularDirective {
|
|
11
|
-
element;
|
|
12
|
-
ngZone;
|
|
13
|
-
renderer;
|
|
14
|
-
events = {};
|
|
15
|
-
scope;
|
|
16
|
-
subscriptions;
|
|
17
|
-
constructor(element, ngZone, renderer) {
|
|
18
|
-
this.element = element;
|
|
19
|
-
this.ngZone = ngZone;
|
|
20
|
-
this.renderer = renderer;
|
|
21
|
-
}
|
|
22
|
-
ngOnInit() {
|
|
23
|
-
if (!this.element?.nativeElement) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
const events = this.events;
|
|
27
|
-
this.subscriptions = [];
|
|
28
|
-
this.ngZone.runOutsideAngular(() => {
|
|
29
|
-
for (const name in events) {
|
|
30
|
-
if (Object.hasOwnProperty.call(events, name)) {
|
|
31
|
-
this.subscriptions?.push(this.renderer.listen(this.element.nativeElement, name, this.scope ? events[name].bind(this.scope) : events[name]));
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
ngOnDestroy() {
|
|
37
|
-
if (this.subscriptions) {
|
|
38
|
-
for (let idx = 0; idx < this.subscriptions.length; idx++) {
|
|
39
|
-
this.subscriptions[idx]();
|
|
40
|
-
}
|
|
41
|
-
this.subscriptions = null;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EventsOutsideAngularDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
45
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: EventsOutsideAngularDirective, isStandalone: true, selector: "[kendoEventsOutsideAngular]", inputs: { events: ["kendoEventsOutsideAngular", "events"], scope: "scope" }, ngImport: i0 });
|
|
46
|
-
}
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EventsOutsideAngularDirective, decorators: [{
|
|
48
|
-
type: Directive,
|
|
49
|
-
args: [{
|
|
50
|
-
selector: '[kendoEventsOutsideAngular]',
|
|
51
|
-
standalone: true
|
|
52
|
-
}]
|
|
53
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.Renderer2 }], propDecorators: { events: [{
|
|
54
|
-
type: Input,
|
|
55
|
-
args: ['kendoEventsOutsideAngular']
|
|
56
|
-
}], scope: [{
|
|
57
|
-
type: Input
|
|
58
|
-
}] } });
|
package/esm2022/events.mjs
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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
|
-
export { EventsOutsideAngularDirective } from './events/events-outside-angular.directive';
|
package/esm2022/index.mjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
export * from './draggable';
|
|
6
|
-
export * from './dom-queries';
|
|
7
|
-
export * from './events';
|
|
8
|
-
export * from './resize-sensor';
|
|
9
|
-
export * from './tokens';
|
|
10
|
-
export * from './utils';
|
|
11
|
-
export * from './enums';
|
|
12
|
-
export * from './utils/focusable-selectors';
|
|
13
|
-
export * from './utils/ng-class-parser';
|
|
14
|
-
export * from './utils/keys-normalizer';
|
|
15
|
-
export * from './utils/getter';
|
|
16
|
-
export * from './utils/setter';
|
|
17
|
-
export * from './watermark';
|
|
18
|
-
export * from './adornments';
|
|
19
|
-
export { PreventableEvent } from './preventable-event';
|
|
20
|
-
export { ScrollbarWidthService, scrollbarWidth } from './utils/scrollbar-width.service';
|
|
21
|
-
export * from './toggle-button-tab-stop';
|
|
22
|
-
export * from './directives';
|
|
23
|
-
export * from './template-context';
|
|
24
|
-
export * from './localization/replace-message-placeholder';
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export const replaceMessagePlaceholder = (message, name, value) => (message ?? '').replace(new RegExp(`{\\s*${name}\\s*}`, 'g'), value);
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
export class PreventableEvent {
|
|
6
|
-
prevented = false;
|
|
7
|
-
/**
|
|
8
|
-
* Prevents the default action for the event.
|
|
9
|
-
* The source component suppresses the built-in behavior that follows the event.
|
|
10
|
-
*/
|
|
11
|
-
preventDefault() {
|
|
12
|
-
this.prevented = true;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Returns `true` if you or any subscriber prevented the default action.
|
|
16
|
-
*
|
|
17
|
-
* @returns `true` if the default action was prevented, otherwise, `false`.
|
|
18
|
-
*/
|
|
19
|
-
isDefaultPrevented() {
|
|
20
|
-
return this.prevented;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
/**
|
|
6
|
-
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
8
|
-
export * from './index';
|
|
@@ -1,103 +0,0 @@
|
|
|
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
|
-
// eslint-disable import/no-deprecated
|
|
6
|
-
import { ResizeService } from './resize.service';
|
|
7
|
-
import { fromEvent, merge } from 'rxjs';
|
|
8
|
-
// TODO:NG13 CSP
|
|
9
|
-
const div = (style) => {
|
|
10
|
-
const el = document.createElement('div');
|
|
11
|
-
el.style.cssText = style;
|
|
12
|
-
return el;
|
|
13
|
-
};
|
|
14
|
-
const computedProp = (elem, prop) => getComputedStyle(elem, null).getPropertyValue(prop);
|
|
15
|
-
const WRAP_STYLE = 'position: absolute; display: block; left: 0; top: 0; right: 0; bottom: 0; z-index: -1;' +
|
|
16
|
-
'overflow: hidden; visibility: hidden;';
|
|
17
|
-
const EXPAND_CHILD_STYLE = 'position: absolute; left: 0; top: 0; transition: 0s;';
|
|
18
|
-
const SHRINK_CHILD_STYLE = EXPAND_CHILD_STYLE + 'width: 200%; height: 200%;';
|
|
19
|
-
export class ResizeCompatService extends ResizeService {
|
|
20
|
-
element;
|
|
21
|
-
ngZone;
|
|
22
|
-
expand;
|
|
23
|
-
expandChild;
|
|
24
|
-
shrink;
|
|
25
|
-
subscription;
|
|
26
|
-
constructor(resizeBatchService, element, ngZone) {
|
|
27
|
-
super(resizeBatchService);
|
|
28
|
-
this.element = element;
|
|
29
|
-
this.ngZone = ngZone;
|
|
30
|
-
}
|
|
31
|
-
checkChanges() {
|
|
32
|
-
if (this.state === 2 /* ServiceState.Initialized */) {
|
|
33
|
-
if (!this.resizeBatchService.isScheduled(this)) {
|
|
34
|
-
this.resizeBatchService.schedule(this, this.checkSize);
|
|
35
|
-
}
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
super.checkChanges();
|
|
39
|
-
}
|
|
40
|
-
destroy() {
|
|
41
|
-
super.destroy();
|
|
42
|
-
if (this.subscription) {
|
|
43
|
-
this.subscription.unsubscribe();
|
|
44
|
-
}
|
|
45
|
-
if (this.expand) {
|
|
46
|
-
const element = this.element?.nativeElement;
|
|
47
|
-
element.removeChild(this.expand);
|
|
48
|
-
element.removeChild(this.shrink);
|
|
49
|
-
this.expand.removeChild(this.expandChild);
|
|
50
|
-
this.expand = this.expandChild = this.shrink = this.element = null;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
checkSize() {
|
|
54
|
-
if (super.checkSize()) {
|
|
55
|
-
this.reset();
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
init() {
|
|
61
|
-
const parentElement = this.parentElement = this.element?.nativeElement.parentElement;
|
|
62
|
-
if (computedProp(parentElement, 'position') === 'static') {
|
|
63
|
-
parentElement.style.position = 'relative';
|
|
64
|
-
}
|
|
65
|
-
this.state = 2 /* ServiceState.Initialized */;
|
|
66
|
-
this.render();
|
|
67
|
-
this.reset();
|
|
68
|
-
this.initSize();
|
|
69
|
-
this.subscribe();
|
|
70
|
-
}
|
|
71
|
-
render() {
|
|
72
|
-
const element = this.element?.nativeElement;
|
|
73
|
-
element.style.cssText = WRAP_STYLE;
|
|
74
|
-
element.setAttribute('dir', 'ltr');
|
|
75
|
-
this.expand = div(WRAP_STYLE);
|
|
76
|
-
this.expandChild = div(EXPAND_CHILD_STYLE);
|
|
77
|
-
this.expand.appendChild(this.expandChild);
|
|
78
|
-
element.appendChild(this.expand);
|
|
79
|
-
this.shrink = div(WRAP_STYLE);
|
|
80
|
-
const shrinkChild = div(SHRINK_CHILD_STYLE);
|
|
81
|
-
this.shrink.appendChild(shrinkChild);
|
|
82
|
-
element.appendChild(this.shrink);
|
|
83
|
-
}
|
|
84
|
-
reset() {
|
|
85
|
-
const expandChild = this.expandChild;
|
|
86
|
-
expandChild.style.width = 100000 + 'px';
|
|
87
|
-
expandChild.style.height = 100000 + 'px';
|
|
88
|
-
const expand = this.expand;
|
|
89
|
-
expand.scrollLeft = 100000;
|
|
90
|
-
expand.scrollTop = 100000;
|
|
91
|
-
const shrink = this.shrink;
|
|
92
|
-
shrink.scrollLeft = 100000;
|
|
93
|
-
shrink.scrollTop = 100000;
|
|
94
|
-
}
|
|
95
|
-
subscribe() {
|
|
96
|
-
this.ngZone.runOutsideAngular(() => {
|
|
97
|
-
this.subscription = merge(fromEvent(this.shrink, 'scroll'), fromEvent(this.expand, 'scroll'))
|
|
98
|
-
.subscribe(() => {
|
|
99
|
-
this.checkSize();
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
import { ResizeService } from './resize.service';
|
|
6
|
-
const HAS_OBSERVER = typeof ResizeObserver !== 'undefined';
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
export class ResizeObserverService extends ResizeService {
|
|
11
|
-
element;
|
|
12
|
-
ngZone;
|
|
13
|
-
resizeObserver;
|
|
14
|
-
static supported() {
|
|
15
|
-
return HAS_OBSERVER;
|
|
16
|
-
}
|
|
17
|
-
constructor(resizeBatchService, element, ngZone) {
|
|
18
|
-
super(resizeBatchService);
|
|
19
|
-
this.element = element;
|
|
20
|
-
this.ngZone = ngZone;
|
|
21
|
-
}
|
|
22
|
-
destroy() {
|
|
23
|
-
super.destroy();
|
|
24
|
-
if (this.resizeObserver) {
|
|
25
|
-
this.resizeObserver.disconnect();
|
|
26
|
-
this.resizeObserver = null;
|
|
27
|
-
}
|
|
28
|
-
this.parentElement = null;
|
|
29
|
-
}
|
|
30
|
-
init() {
|
|
31
|
-
this.parentElement = this.element.nativeElement.parentElement;
|
|
32
|
-
this.initSize();
|
|
33
|
-
this.state = 2 /* ServiceState.Initialized */;
|
|
34
|
-
this.ngZone.runOutsideAngular(() => {
|
|
35
|
-
this.resizeObserver = new ResizeObserver(() => {
|
|
36
|
-
this.checkSize();
|
|
37
|
-
});
|
|
38
|
-
this.resizeObserver.observe(this.parentElement);
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
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
|
-
import { Injectable, NgZone } from '@angular/core';
|
|
6
|
-
import { from as fromPromise } from 'rxjs';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
export class ResizeBatchService {
|
|
12
|
-
ngZone;
|
|
13
|
-
scheduled = [];
|
|
14
|
-
resolvedPromise = Promise.resolve(null);
|
|
15
|
-
subscription;
|
|
16
|
-
constructor(ngZone) {
|
|
17
|
-
this.ngZone = ngZone;
|
|
18
|
-
this.flush = this.flush.bind(this);
|
|
19
|
-
}
|
|
20
|
-
schedule(instance, method) {
|
|
21
|
-
this.scheduled.push({ instance, method });
|
|
22
|
-
if (!this.subscription) {
|
|
23
|
-
this.ngZone.runOutsideAngular(() => {
|
|
24
|
-
this.subscription = fromPromise(this.resolvedPromise)
|
|
25
|
-
.subscribe(this.flush);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
isScheduled(instance) {
|
|
30
|
-
return Boolean(this.scheduled.find(item => item.instance === instance));
|
|
31
|
-
}
|
|
32
|
-
cancel(instance) {
|
|
33
|
-
const scheduled = this.scheduled;
|
|
34
|
-
const count = scheduled.length;
|
|
35
|
-
for (let idx = 0; idx < count; idx++) {
|
|
36
|
-
if (scheduled[idx].instance === instance) {
|
|
37
|
-
scheduled.splice(idx, 1);
|
|
38
|
-
if (!scheduled.length) {
|
|
39
|
-
this.unsubscribe();
|
|
40
|
-
}
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
ngOnDestroy() {
|
|
46
|
-
this.unsubscribe();
|
|
47
|
-
}
|
|
48
|
-
unsubscribe() {
|
|
49
|
-
if (this.subscription) {
|
|
50
|
-
this.subscription.unsubscribe();
|
|
51
|
-
this.subscription = null;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
flush() {
|
|
55
|
-
this.scheduled.forEach(item => {
|
|
56
|
-
item.method.call(item.instance);
|
|
57
|
-
});
|
|
58
|
-
this.scheduled = [];
|
|
59
|
-
this.unsubscribe();
|
|
60
|
-
}
|
|
61
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ResizeBatchService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
62
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ResizeBatchService, providedIn: 'root' });
|
|
63
|
-
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ResizeBatchService, decorators: [{
|
|
65
|
-
type: Injectable,
|
|
66
|
-
args: [{
|
|
67
|
-
providedIn: 'root'
|
|
68
|
-
}]
|
|
69
|
-
}], ctorParameters: () => [{ type: i0.NgZone }] });
|
|
@@ -1,71 +0,0 @@
|
|
|
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
|
-
import { Component, EventEmitter, Input, Output, ElementRef, NgZone } from '@angular/core';
|
|
6
|
-
import { auditTime } from 'rxjs/operators';
|
|
7
|
-
import { ResizeCompatService } from './compat.service';
|
|
8
|
-
import { ResizeObserverService } from './observer.service';
|
|
9
|
-
import { ResizeBatchService } from './resize-batch.service';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
import * as i1 from "./resize-batch.service";
|
|
12
|
-
/**
|
|
13
|
-
* Emit up to 10 resize events per second by default.
|
|
14
|
-
* Chosen as a compromise between responsiveness and performance.
|
|
15
|
-
*/
|
|
16
|
-
const DEFAULT_RATE_LIMIT = 10;
|
|
17
|
-
/**
|
|
18
|
-
* Resize Sensor Component
|
|
19
|
-
*
|
|
20
|
-
* Triggers a "resize" event whenever the parent DOM element size changes.
|
|
21
|
-
*/
|
|
22
|
-
export class ResizeSensorComponent {
|
|
23
|
-
/**
|
|
24
|
-
* The maximum number of resize events to emit per second.
|
|
25
|
-
*
|
|
26
|
-
* Defaults to 10.
|
|
27
|
-
*/
|
|
28
|
-
rateLimit = DEFAULT_RATE_LIMIT;
|
|
29
|
-
/**
|
|
30
|
-
* Fires when the parent DOM element has been resized.
|
|
31
|
-
*/
|
|
32
|
-
resize = new EventEmitter();
|
|
33
|
-
subscription;
|
|
34
|
-
resizeService;
|
|
35
|
-
constructor(resizeBatchService, element, ngZone) {
|
|
36
|
-
const serviceType = ResizeObserverService.supported() ? ResizeObserverService : ResizeCompatService;
|
|
37
|
-
this.resizeService = new serviceType(resizeBatchService, element, ngZone);
|
|
38
|
-
const throttleTime = 1000 / (this.rateLimit || DEFAULT_RATE_LIMIT);
|
|
39
|
-
this.subscription = this.resizeService.resize
|
|
40
|
-
.pipe(auditTime(throttleTime))
|
|
41
|
-
.subscribe(({ width, height }) => {
|
|
42
|
-
if (!this.resizeService.acceptedSize) {
|
|
43
|
-
this.resize.emit({ width, height });
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
ngAfterViewChecked() {
|
|
48
|
-
this.resizeService.checkChanges();
|
|
49
|
-
}
|
|
50
|
-
ngOnDestroy() {
|
|
51
|
-
this.subscription.unsubscribe();
|
|
52
|
-
this.resizeService.destroy();
|
|
53
|
-
}
|
|
54
|
-
acceptSize(size) {
|
|
55
|
-
this.resizeService.acceptSize(size);
|
|
56
|
-
}
|
|
57
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ResizeSensorComponent, deps: [{ token: i1.ResizeBatchService }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
58
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ResizeSensorComponent, isStandalone: true, selector: "kendo-resize-sensor", inputs: { rateLimit: "rateLimit" }, outputs: { resize: "resize" }, ngImport: i0, template: '', isInline: true });
|
|
59
|
-
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ResizeSensorComponent, decorators: [{
|
|
61
|
-
type: Component,
|
|
62
|
-
args: [{
|
|
63
|
-
selector: 'kendo-resize-sensor',
|
|
64
|
-
template: '',
|
|
65
|
-
standalone: true
|
|
66
|
-
}]
|
|
67
|
-
}], ctorParameters: () => [{ type: i1.ResizeBatchService }, { type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { rateLimit: [{
|
|
68
|
-
type: Input
|
|
69
|
-
}], resize: [{
|
|
70
|
-
type: Output
|
|
71
|
-
}] } });
|