@progress/kendo-angular-common 25.0.0-develop.17 → 25.0.0-develop.19

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.
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as i0 from '@angular/core';
6
- import { afterNextRender, EventEmitter, signal, Output, Input, Directive, Injectable, ChangeDetectionStrategy, Component, InjectionToken, HostBinding, ViewChild, Optional, isDevMode } from '@angular/core';
6
+ import { afterNextRender, EventEmitter, signal, Output, Input, Directive, Injectable, ChangeDetectionStrategy, Component, InjectionToken, HostBinding, ViewChild, Optional, isDevMode, SkipSelf, Inject } from '@angular/core';
7
7
  import { detectDesktopBrowser, detectMobileOS } from '@progress/kendo-common';
8
8
  import { Draggable } from '@progress/kendo-draggable';
9
9
  import { auditTime } from 'rxjs/operators';
@@ -2261,9 +2261,90 @@ const KENDO_TEMPLATE_CONTEXT = [
2261
2261
  */
2262
2262
  const replaceMessagePlaceholder = (message, name, value) => (message ?? '').replace(new RegExp(`\\[\\[\\s*${name}\\s*]]|{\\s*${name}\\s*}`, 'g'), value);
2263
2263
 
2264
+ /**
2265
+ * An injection token that holds the accumulated component ancestry chain (outermost -> innermost).
2266
+ * Kendo components add their identifier to the chain through `provideComponentName`.
2267
+ * Used internally by features that need to forward component context to a service (for example,
2268
+ * per-component icon overrides).
2269
+ *
2270
+ * @hidden
2271
+ */
2272
+ const KENDO_COMPONENT_NAME = new InjectionToken('Kendo Component Name');
2273
+ /**
2274
+ * Adds `name` to the ancestry chain provided by any parent component, so nested components
2275
+ * automatically accumulate the full ancestry chain without any coordination between packages.
2276
+ *
2277
+ * @hidden
2278
+ */
2279
+ function provideComponentName(name) {
2280
+ return {
2281
+ provide: KENDO_COMPONENT_NAME,
2282
+ useFactory: (parentChain) => parentChain ? [...parentChain, name] : [name],
2283
+ deps: [[new Optional(), new SkipSelf(), KENDO_COMPONENT_NAME]]
2284
+ };
2285
+ }
2286
+
2287
+ /**
2288
+ * Appends a component identifier to the icon component-name ancestry chain for a template subtree.
2289
+ *
2290
+ * Use this directive when a component declares a template at its own root but that template is rendered
2291
+ * inside a different (child) component through `ngTemplateOutlet` — for example, the default Pager
2292
+ * template that the Grid and TreeList declare and the Pager renders. Because an embedded view resolves
2293
+ * element-level DI from its lexical declaration site, the rendering component would otherwise be missing
2294
+ * from the ancestry chain and per-component icon overrides for it would not apply. Wrap the projected
2295
+ * content with this directive to restore the missing segment.
2296
+ *
2297
+ * @hidden
2298
+ */
2299
+ class ComponentNameDirective {
2300
+ /**
2301
+ * The component identifier to append to the ancestry chain.
2302
+ */
2303
+ name;
2304
+ parentChain;
2305
+ constructor(parentChain) {
2306
+ this.parentChain = parentChain;
2307
+ }
2308
+ /**
2309
+ * The accumulated ancestry chain including this component identifier.
2310
+ */
2311
+ get chain() {
2312
+ const parent = this.parentChain ?? [];
2313
+ return this.name ? [...parent, this.name] : parent;
2314
+ }
2315
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: ComponentNameDirective, deps: [{ token: KENDO_COMPONENT_NAME, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
2316
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.26", type: ComponentNameDirective, isStandalone: true, selector: "[kendoComponentName]", inputs: { name: ["kendoComponentName", "name"] }, providers: [{
2317
+ provide: KENDO_COMPONENT_NAME,
2318
+ useFactory: (directive) => directive.chain,
2319
+ deps: [ComponentNameDirective]
2320
+ }], ngImport: i0 });
2321
+ }
2322
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.26", ngImport: i0, type: ComponentNameDirective, decorators: [{
2323
+ type: Directive,
2324
+ args: [{
2325
+ selector: '[kendoComponentName]',
2326
+ standalone: true,
2327
+ providers: [{
2328
+ provide: KENDO_COMPONENT_NAME,
2329
+ useFactory: (directive) => directive.chain,
2330
+ deps: [ComponentNameDirective]
2331
+ }]
2332
+ }]
2333
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
2334
+ type: Optional
2335
+ }, {
2336
+ type: SkipSelf
2337
+ }, {
2338
+ type: Inject,
2339
+ args: [KENDO_COMPONENT_NAME]
2340
+ }] }], propDecorators: { name: [{
2341
+ type: Input,
2342
+ args: ['kendoComponentName']
2343
+ }] } });
2344
+
2264
2345
  /**
2265
2346
  * Generated bundle index. Do not edit.
2266
2347
  */
2267
2348
 
2268
- export { ScrollbarService as BrowserSupportService, DraggableDirective, EventsOutsideAngularDirective, KENDO_ADORNMENTS, KENDO_COMMON, KENDO_DRAGGABLE, KENDO_EVENTS, KENDO_RESIZESENSOR, KENDO_TEMPLATE_CONTEXT, KENDO_TOGGLEBUTTONTABSTOP, KENDO_WATERMARK, KENDO_WEBMCP_HOST, KendoInput, Keys, MultiTabStop, PrefixTemplateDirective, PreventableEvent, ResizeBatchService, ResizeCompatService, ResizeObserverService, ResizeSensorComponent, ScrollbarService, SeparatorComponent, SuffixTemplateDirective, TemplateContextDirective, ToggleButtonTabStopDirective, WatermarkOverlayComponent, anyChanged, applyAttributes, areObjectsEqual, closest, closestBySelector, closestInScope, contains, findElement, findFocusable, findFocusableChild, firefoxMaxHeight, focusableSelector, getLicenseMessage, getter, guid, hasClasses, hasFocusableParent, hasObservers, isChanged, isControlRequired, isDocumentAvailable, isFirefox, isFocusable, isFocusableWithTabKey, isObject, isObjectPresent, isPresent, isSafari, isSet, isString, isVisible, matchesClasses, matchesNodeName, normalizeKeys, parseAttributes, parseCSSClassNames, processCssValue, removeHTMLAttributes, replaceMessagePlaceholder, rtlScrollLeft, rtlScrollPosition, scrollbarWidth, setHTMLAttributes, setter, shouldShowValidationUI, splitStringToArray };
2349
+ export { ScrollbarService as BrowserSupportService, ComponentNameDirective, DraggableDirective, EventsOutsideAngularDirective, KENDO_ADORNMENTS, KENDO_COMMON, KENDO_COMPONENT_NAME, KENDO_DRAGGABLE, KENDO_EVENTS, KENDO_RESIZESENSOR, KENDO_TEMPLATE_CONTEXT, KENDO_TOGGLEBUTTONTABSTOP, KENDO_WATERMARK, KENDO_WEBMCP_HOST, KendoInput, Keys, MultiTabStop, PrefixTemplateDirective, PreventableEvent, ResizeBatchService, ResizeCompatService, ResizeObserverService, ResizeSensorComponent, ScrollbarService, SeparatorComponent, SuffixTemplateDirective, TemplateContextDirective, ToggleButtonTabStopDirective, WatermarkOverlayComponent, anyChanged, applyAttributes, areObjectsEqual, closest, closestBySelector, closestInScope, contains, findElement, findFocusable, findFocusableChild, firefoxMaxHeight, focusableSelector, getLicenseMessage, getter, guid, hasClasses, hasFocusableParent, hasObservers, isChanged, isControlRequired, isDocumentAvailable, isFirefox, isFocusable, isFocusableWithTabKey, isObject, isObjectPresent, isPresent, isSafari, isSet, isString, isVisible, matchesClasses, matchesNodeName, normalizeKeys, parseAttributes, parseCSSClassNames, processCssValue, provideComponentName, removeHTMLAttributes, replaceMessagePlaceholder, rtlScrollLeft, rtlScrollPosition, scrollbarWidth, setHTMLAttributes, setter, shouldShowValidationUI, splitStringToArray };
2269
2350
 
package/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as i0 from '@angular/core';
6
- import { OnDestroy, EventEmitter, ElementRef, NgZone, OnInit, Renderer2, AfterViewChecked, InjectionToken, SimpleChanges, Injector, AfterViewInit, TemplateRef, ViewContainerRef } from '@angular/core';
6
+ import { OnDestroy, EventEmitter, ElementRef, NgZone, OnInit, Renderer2, AfterViewChecked, InjectionToken, SimpleChanges, Injector, AfterViewInit, TemplateRef, ViewContainerRef, Provider } from '@angular/core';
7
7
  import { AbstractControl } from '@angular/forms';
8
8
  import { LicenseMessage, PackageMetadata } from '@progress/kendo-licensing';
9
9
 
@@ -775,5 +775,49 @@ declare const KENDO_TEMPLATE_CONTEXT: readonly [typeof TemplateContextDirective]
775
775
  */
776
776
  declare const replaceMessagePlaceholder: (message: string, name: string, value: string) => string;
777
777
 
778
- export { ScrollbarService as BrowserSupportService, DraggableDirective, EventsOutsideAngularDirective, KENDO_ADORNMENTS, KENDO_COMMON, KENDO_DRAGGABLE, KENDO_EVENTS, KENDO_RESIZESENSOR, KENDO_TEMPLATE_CONTEXT, KENDO_TOGGLEBUTTONTABSTOP, KENDO_WATERMARK, KENDO_WEBMCP_HOST, KendoInput, Keys, MultiTabStop, PrefixTemplateDirective, PreventableEvent, ResizeBatchService, ResizeCompatService, ResizeObserverService, ResizeSensorComponent, ScrollbarService, SeparatorComponent, SuffixTemplateDirective, TemplateContextDirective, ToggleButtonTabStopDirective, WatermarkOverlayComponent, anyChanged, applyAttributes, areObjectsEqual, closest, closestBySelector, closestInScope, contains, findElement, findFocusable, findFocusableChild, firefoxMaxHeight, focusableSelector, getLicenseMessage, getter, guid, hasClasses, hasFocusableParent, hasObservers, isChanged, isControlRequired, isDocumentAvailable, isFirefox, isFocusable, isFocusableWithTabKey, isObject, isObjectPresent, isPresent, isSafari, isSet, isString, isVisible, matchesClasses, matchesNodeName, normalizeKeys, parseAttributes, parseCSSClassNames, processCssValue, removeHTMLAttributes, replaceMessagePlaceholder, rtlScrollLeft, rtlScrollPosition, scrollbarWidth, setHTMLAttributes, setter, shouldShowValidationUI, splitStringToArray };
778
+ /**
779
+ * An injection token that holds the accumulated component ancestry chain (outermost -> innermost).
780
+ * Kendo components add their identifier to the chain through `provideComponentName`.
781
+ * Used internally by features that need to forward component context to a service (for example,
782
+ * per-component icon overrides).
783
+ *
784
+ * @hidden
785
+ */
786
+ declare const KENDO_COMPONENT_NAME: InjectionToken<string[]>;
787
+ /**
788
+ * Adds `name` to the ancestry chain provided by any parent component, so nested components
789
+ * automatically accumulate the full ancestry chain without any coordination between packages.
790
+ *
791
+ * @hidden
792
+ */
793
+ declare function provideComponentName(name: string): Provider;
794
+
795
+ /**
796
+ * Appends a component identifier to the icon component-name ancestry chain for a template subtree.
797
+ *
798
+ * Use this directive when a component declares a template at its own root but that template is rendered
799
+ * inside a different (child) component through `ngTemplateOutlet` — for example, the default Pager
800
+ * template that the Grid and TreeList declare and the Pager renders. Because an embedded view resolves
801
+ * element-level DI from its lexical declaration site, the rendering component would otherwise be missing
802
+ * from the ancestry chain and per-component icon overrides for it would not apply. Wrap the projected
803
+ * content with this directive to restore the missing segment.
804
+ *
805
+ * @hidden
806
+ */
807
+ declare class ComponentNameDirective {
808
+ /**
809
+ * The component identifier to append to the ancestry chain.
810
+ */
811
+ name: string;
812
+ private parentChain;
813
+ constructor(parentChain: string[]);
814
+ /**
815
+ * The accumulated ancestry chain including this component identifier.
816
+ */
817
+ get chain(): string[];
818
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComponentNameDirective, [{ optional: true; skipSelf: true; }]>;
819
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComponentNameDirective, "[kendoComponentName]", never, { "name": { "alias": "kendoComponentName"; "required": false; }; }, {}, never, never, true, never>;
820
+ }
821
+
822
+ export { ScrollbarService as BrowserSupportService, ComponentNameDirective, DraggableDirective, EventsOutsideAngularDirective, KENDO_ADORNMENTS, KENDO_COMMON, KENDO_COMPONENT_NAME, KENDO_DRAGGABLE, KENDO_EVENTS, KENDO_RESIZESENSOR, KENDO_TEMPLATE_CONTEXT, KENDO_TOGGLEBUTTONTABSTOP, KENDO_WATERMARK, KENDO_WEBMCP_HOST, KendoInput, Keys, MultiTabStop, PrefixTemplateDirective, PreventableEvent, ResizeBatchService, ResizeCompatService, ResizeObserverService, ResizeSensorComponent, ScrollbarService, SeparatorComponent, SuffixTemplateDirective, TemplateContextDirective, ToggleButtonTabStopDirective, WatermarkOverlayComponent, anyChanged, applyAttributes, areObjectsEqual, closest, closestBySelector, closestInScope, contains, findElement, findFocusable, findFocusableChild, firefoxMaxHeight, focusableSelector, getLicenseMessage, getter, guid, hasClasses, hasFocusableParent, hasObservers, isChanged, isControlRequired, isDocumentAvailable, isFirefox, isFocusable, isFocusableWithTabKey, isObject, isObjectPresent, isPresent, isSafari, isSet, isString, isVisible, matchesClasses, matchesNodeName, normalizeKeys, parseAttributes, parseCSSClassNames, processCssValue, provideComponentName, removeHTMLAttributes, replaceMessagePlaceholder, rtlScrollLeft, rtlScrollPosition, scrollbarWidth, setHTMLAttributes, setter, shouldShowValidationUI, splitStringToArray };
779
823
  export type { SeparatorOrientation };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-common",
3
- "version": "25.0.0-develop.17",
3
+ "version": "25.0.0-develop.19",
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": "25.0.0-develop.17"
26
+ "@progress/kendo-angular-schematics": "25.0.0-develop.19"
27
27
  },
28
28
  "publishConfig": {
29
29
  "access": "public"