@ecl/ec-component-file
Advanced tools
Comparing version 2.15.0 to 2.16.0
import { queryOne } from '@ecl/ec-base/helpers/dom'; | ||
/** | ||
* @param {HTMLElement} element DOM element for component instantiation and scope | ||
* @param {Object} options | ||
* @param {String} options.translationToggleSelector Selector for toggling translatoins section | ||
* @param {String} options.translationContainerSelector Selector for translations section container | ||
* @param {Boolean} options.attachClickListener Whether or not to bind click events on toggle | ||
*/ | ||
export class FileDownload { | ||
/** | ||
* @static | ||
* Shorthand for instance creation and initialisation. | ||
* | ||
* @param {HTMLElement} root DOM element for component instantiation and scope | ||
* | ||
* @return {FileDownload} An instance of FileDownload. | ||
*/ | ||
static autoInit(root, { FILE_DOWNLOAD: defaultOptions = {} } = {}) { | ||
@@ -42,2 +57,5 @@ const fileDownload = new FileDownload(root, defaultOptions); | ||
/** | ||
* Initialise component. | ||
*/ | ||
init() { | ||
@@ -62,2 +80,5 @@ this.translationToggle = queryOne( | ||
/** | ||
* Destroy component. | ||
*/ | ||
destroy() { | ||
@@ -72,2 +93,5 @@ if (this.attachClickListener && this.translationToggle) { | ||
/** | ||
* @param {Event} e | ||
*/ | ||
handleClickOnToggle(e) { | ||
@@ -74,0 +98,0 @@ e.preventDefault(); |
{ | ||
"name": "@ecl/ec-component-file", | ||
"version": "2.15.0", | ||
"version": "2.16.0", | ||
"description": "ECL EC File", | ||
@@ -12,6 +12,6 @@ "main": "ec-component-file.js", | ||
"dependencies": { | ||
"@ecl/ec-base": "^2.15.0", | ||
"@ecl/ec-component-button": "^2.15.0", | ||
"@ecl/ec-component-icon": "^2.15.0", | ||
"@ecl/ec-component-link": "^2.15.0" | ||
"@ecl/ec-base": "^2.16.0", | ||
"@ecl/ec-component-button": "^2.16.0", | ||
"@ecl/ec-component-icon": "^2.16.0", | ||
"@ecl/ec-component-link": "^2.16.0" | ||
}, | ||
@@ -34,3 +34,3 @@ "publishConfig": { | ||
], | ||
"gitHead": "2caa0ad75ff8d7b0ad36884dbfa36baea96860c0" | ||
"gitHead": "1dd57e99803c12e86f5b6f6a396fd6ad77386cf9" | ||
} |
22278
94
Updated@ecl/ec-base@^2.16.0