Unbreak short lines

This commit is contained in:
XhmikosR 2020-06-10 18:40:52 +03:00
parent 9f9e4d04a1
commit 94a5d87e15
6 changed files with 40 additions and 58 deletions

View File

@ -100,8 +100,7 @@ class Alert {
const transitionDuration = getTransitionDurationFromElement(element) const transitionDuration = getTransitionDurationFromElement(element)
EventHandler EventHandler.one(element, TRANSITION_END, () => this._destroyElement(element))
.one(element, TRANSITION_END, () => this._destroyElement(element))
emulateTransitionEnd(element, transitionDuration) emulateTransitionEnd(element, transitionDuration)
} }

View File

@ -207,8 +207,7 @@ function removeHandler(element, events, typeEvent, handler, delegationSelector)
function removeNamespacedHandlers(element, events, typeEvent, namespace) { function removeNamespacedHandlers(element, events, typeEvent, namespace) {
const storeElementEvent = events[typeEvent] || {} const storeElementEvent = events[typeEvent] || {}
Object.keys(storeElementEvent) Object.keys(storeElementEvent).forEach(handlerKey => {
.forEach(handlerKey => {
if (handlerKey.indexOf(namespace) > -1) { if (handlerKey.indexOf(namespace) > -1) {
const event = storeElementEvent[handlerKey] const event = storeElementEvent[handlerKey]
@ -247,15 +246,13 @@ const EventHandler = {
} }
if (isNamespace) { if (isNamespace) {
Object.keys(events) Object.keys(events).forEach(elementEvent => {
.forEach(elementEvent => {
removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1)) removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1))
}) })
} }
const storeElementEvent = events[typeEvent] || {} const storeElementEvent = events[typeEvent] || {}
Object.keys(storeElementEvent) Object.keys(storeElementEvent).forEach(keyHandlers => {
.forEach(keyHandlers => {
const handlerKey = keyHandlers.replace(stripUidRegex, '') const handlerKey = keyHandlers.replace(stripUidRegex, '')
if (!inNamespace || originalTypeEvent.indexOf(handlerKey) > -1) { if (!inNamespace || originalTypeEvent.indexOf(handlerKey) > -1) {
@ -300,10 +297,9 @@ const EventHandler = {
}) })
} }
// merge custom informations in our event // merge custom information in our event
if (typeof args !== 'undefined') { if (typeof args !== 'undefined') {
Object.keys(args) Object.keys(args).forEach(key => {
.forEach(key => {
Object.defineProperty(evt, key, { Object.defineProperty(evt, key, {
get() { get() {
return args[key] return args[key]

View File

@ -262,11 +262,7 @@ class Dropdown {
...config ...config
} }
typeCheckConfig( typeCheckConfig(NAME, config, this.constructor.DefaultType)
NAME,
config,
this.constructor.DefaultType
)
return config return config
} }

View File

@ -172,11 +172,7 @@ class Toast {
...typeof config === 'object' && config ? config : {} ...typeof config === 'object' && config ? config : {}
} }
typeCheckConfig( typeCheckConfig(NAME, config, this.constructor.DefaultType)
NAME,
config,
this.constructor.DefaultType
)
return config return config
} }

View File

@ -708,11 +708,7 @@ class Tooltip {
config.content = config.content.toString() config.content = config.content.toString()
} }
typeCheckConfig( typeCheckConfig(NAME, config, this.constructor.DefaultType)
NAME,
config,
this.constructor.DefaultType
)
if (config.sanitize) { if (config.sanitize) {
config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn) config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn)

View File

@ -110,8 +110,7 @@ const emulateTransitionEnd = (element, duration) => {
} }
const typeCheckConfig = (componentName, config, configTypes) => { const typeCheckConfig = (componentName, config, configTypes) => {
Object.keys(configTypes) Object.keys(configTypes).forEach(property => {
.forEach(property => {
const expectedTypes = configTypes[property] const expectedTypes = configTypes[property]
const value = config[property] const value = config[property]
const valueType = value && isElement(value) ? const valueType = value && isElement(value) ?