Socket
Socket
Sign inDemoInstall

@material/base

Package Overview
Dependencies
Maintainers
14
Versions
1667
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/base - npm Package Compare versions

Comparing version 15.0.0-canary.311ab4d4a.0 to 15.0.0-canary.311f29a60.0

2

CHANGELOG.md

@@ -6,3 +6,3 @@ # Change Log

# [15.0.0-canary.311ab4d4a.0](https://github.com/material-components/material-components-web/compare/v14.0.0...v15.0.0-canary.311ab4d4a.0) (2023-02-27)
# [15.0.0-canary.311f29a60.0](https://github.com/material-components/material-components-web/compare/v14.0.0...v15.0.0-canary.311f29a60.0) (2024-04-23)

@@ -9,0 +9,0 @@

@@ -39,4 +39,4 @@ /**

*/
listen<K extends EventType>(evtType: K, handler: SpecificEventListener<K>, options?: AddEventListenerOptions | boolean): void;
listen<E extends Event>(evtType: string, handler: CustomEventListener<E>, options?: AddEventListenerOptions | boolean): void;
listen<K extends EventType>(eventType: K, handler: SpecificEventListener<K>, options?: AddEventListenerOptions | boolean): void;
listen<E extends Event>(eventType: string, handler: CustomEventListener<E>, options?: AddEventListenerOptions | boolean): void;
/**

@@ -46,4 +46,4 @@ * Wrapper method to remove an event listener to the component's root element.

*/
unlisten<K extends EventType>(evtType: K, handler: SpecificEventListener<K>, options?: AddEventListenerOptions | boolean): void;
unlisten<E extends Event>(evtType: string, handler: CustomEventListener<E>, options?: AddEventListenerOptions | boolean): void;
unlisten<K extends EventType>(eventType: K, handler: SpecificEventListener<K>, options?: AddEventListenerOptions | boolean): void;
unlisten<E extends Event>(eventType: string, handler: CustomEventListener<E>, options?: AddEventListenerOptions | boolean): void;
/**

@@ -53,3 +53,3 @@ * Fires a cross-browser-compatible custom event from the component root of

*/
emit<T extends object>(evtType: string, evtData: T, shouldBubble?: boolean): void;
emit<T extends object>(eventType: string, eventData: T, shouldBubble?: boolean): void;
/**

@@ -56,0 +56,0 @@ * This is a intermediate fix to allow components to use safevalues. This

@@ -89,7 +89,7 @@ /**

};
MDCComponent.prototype.listen = function (evtType, handler, options) {
this.root.addEventListener(evtType, handler, options);
MDCComponent.prototype.listen = function (eventType, handler, options) {
this.root.addEventListener(eventType, handler, options);
};
MDCComponent.prototype.unlisten = function (evtType, handler, options) {
this.root.removeEventListener(evtType, handler, options);
MDCComponent.prototype.unlisten = function (eventType, handler, options) {
this.root.removeEventListener(eventType, handler, options);
};

@@ -100,16 +100,16 @@ /**

*/
MDCComponent.prototype.emit = function (evtType, evtData, shouldBubble) {
MDCComponent.prototype.emit = function (eventType, eventData, shouldBubble) {
if (shouldBubble === void 0) { shouldBubble = false; }
var evt;
var event;
if (typeof CustomEvent === 'function') {
evt = new CustomEvent(evtType, {
event = new CustomEvent(eventType, {
bubbles: shouldBubble,
detail: evtData,
detail: eventData,
});
}
else {
evt = document.createEvent('CustomEvent');
evt.initCustomEvent(evtType, shouldBubble, false, evtData);
event = document.createEvent('CustomEvent');
event.initCustomEvent(eventType, shouldBubble, false, eventData);
}
this.root.dispatchEvent(evt);
this.root.dispatchEvent(event);
};

@@ -116,0 +116,0 @@ /**

{
"name": "@material/base",
"description": "The set of base classes for Material Components for the web",
"version": "15.0.0-canary.311ab4d4a.0",
"version": "15.0.0-canary.311f29a60.0",
"license": "MIT",

@@ -17,3 +17,3 @@ "main": "dist/mdc.base.js",

},
"gitHead": "07f8d2f7bb4b2f30e60a6bd8739befd9d17bfbfc"
"gitHead": "7bc0264e163e842f0f96c1dbf7a468c022db1497"
}

@@ -24,6 +24,6 @@ /**

export declare type EventType = keyof GlobalEventHandlersEventMap;
export declare type SpecificEventListener<K extends EventType> = (evt: GlobalEventHandlersEventMap[K]) => void;
export declare type CustomEventListener<E extends Event> = (evt: E) => void;
export declare type SpecificEventListener<K extends EventType> = (event: GlobalEventHandlersEventMap[K]) => void;
export declare type CustomEventListener<E extends Event> = (event: E) => void;
export declare type WindowEventType = keyof WindowEventMap;
export declare type SpecificWindowEventListener<K extends WindowEventType> = (evt: WindowEventMap[K]) => void;
export declare type SpecificWindowEventListener<K extends WindowEventType> = (event: WindowEventMap[K]) => void;
/**

@@ -30,0 +30,0 @@ * A generic type for the constructor of an instance type. Note that this type

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc