web-component-wrapper 0.0.585 → 0.0.586

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.
Files changed (3) hide show
  1. package/Web.d.ts +2 -2
  2. package/package.json +1 -1
  3. package/type.d.ts +5 -0
package/Web.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Logger, Mapping } from 'clientnode';
2
- import { AttributesReflectionConfiguration, CompiledDomNodeTemplateItem, CompilerOptions, ComponentAdapter, DomNodeToCompiledTemplateMap, EventCallbackMapping, EventToPropertyMapping, NormalizedAttributesReflectionConfiguration, PropertiesConfiguration, RenderState, ScopeDeclaration, WebComponentAPI } from './type';
2
+ import { AttributesReflectionConfiguration, CompiledDomNodeTemplateItem, CompilerOptions, ComponentAdapter, DomNodeToCompiledTemplateMap, EventCallbackMapping, EventToPropertyMapping, KnownEventName, KnownWindowEventMap, NormalizedAttributesReflectionConfiguration, PropertiesConfiguration, RenderState, ScopeDeclaration, WebComponentAPI } from './type';
3
3
  export declare const log: Logger;
4
4
  export declare const GenericHTMLElement: typeof HTMLElement;
5
5
  /**
@@ -288,7 +288,7 @@ export declare class Web<TElement = HTMLElement, ExternalProperties extends Mapp
288
288
  * @param options - Add event listener options.
289
289
  * @param removeOptions - Remove event listener options.
290
290
  */
291
- addSecureEventListener<EventName extends keyof WindowEventMap>(domNode: Node | Window, name: EventName, handler: (this: Window, event: WindowEventMap[EventName]) => void, options?: boolean | AddEventListenerOptions, removeOptions?: EventListenerOptions): void;
291
+ addSecureEventListener<EventName extends KnownEventName>(domNode: Node | Window, name: EventName, handler: (this: Window, event: KnownWindowEventMap[EventName]) => void, options?: boolean | AddEventListenerOptions, removeOptions?: EventListenerOptions): void;
292
292
  /**
293
293
  * Determines initial root which initializes rendering digest.
294
294
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-component-wrapper",
3
- "version": "0.0.585",
3
+ "version": "0.0.586",
4
4
  "description": "Generic web-component base class and framework specific wrapper.",
5
5
  "keywords": [
6
6
  "component",
package/type.d.ts CHANGED
@@ -2,6 +2,11 @@ import { Mapping, TemplateFunction, ValueOf } from 'clientnode';
2
2
  import PropertyTypes, { ValidationMap } from 'clientnode/property-types';
3
3
  import React, { ComponentType as ReactComponentType, HTMLAttributes, ReactElement } from 'react';
4
4
  import Web from './Web';
5
+ export interface KnownWindowEventMap extends WindowEventMap {
6
+ DOMMouseScroll: Event;
7
+ mousewheel: Event;
8
+ }
9
+ export type KnownEventName = keyof KnownWindowEventMap;
5
10
  export interface RenderState {
6
11
  promise: Promise<string>;
7
12
  pending: boolean;