]
],
plugins: [
- process.env.PLUGINS && 'transform-es2015-modules-strip'
+ process.env.PLUGINS && 'transform-es2015-modules-strip',
+ '@babel/proposal-object-rest-spread'
].filter(Boolean)
};
externalHelpersWhitelist: [ // include only required helpers
'defineProperties',
'createClass',
- 'inheritsLoose'
+ 'inheritsLoose',
+ 'extends'
]
})
]
// private
_getConfig(config) {
- config = $.extend({}, Default, config)
+ config = {
+ ...Default,
+ ...config
+ }
Util.typeCheckConfig(NAME, config, DefaultType)
return config
}
static _jQueryInterface(config) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
- const _config = $.extend({}, Default, $(this).data())
+ let _config = {
+ ...Default,
+ ...$(this).data()
+ }
if (typeof config === 'object') {
- $.extend(_config, config)
+ _config = {
+ ..._config,
+ ...config
+ }
}
const action = typeof config === 'string' ? config : _config.slide
return
}
- const config = $.extend({}, $(target).data(), $(this).data())
+ const config = {
+ ...$(target).data(),
+ ...$(this).data()
+ }
const slideIndex = this.getAttribute('data-slide-to')
if (slideIndex) {
// private
_getConfig(config) {
- config = $.extend({}, Default, config)
+ config = {
+ ...Default,
+ ...config
+ }
config.toggle = Boolean(config.toggle) // coerce string values
Util.typeCheckConfig(NAME, config, DefaultType)
return config
return this.each(function () {
const $this = $(this)
let data = $this.data(DATA_KEY)
- const _config = $.extend(
- {},
- Default,
- $this.data(),
- typeof config === 'object' && config
- )
+ const _config = {
+ ...Default,
+ ...$this.data(),
+ ...typeof config === 'object' && config
+ }
if (!data && _config.toggle && /show|hide/.test(config)) {
_config.toggle = false
}
_getConfig(config) {
- config = $.extend(
- {},
- this.constructor.Default,
- $(this._element).data(),
- config
- )
+ config = {
+ ...this.constructor.Default,
+ ...$(this._element).data(),
+ ...config
+ }
Util.typeCheckConfig(
NAME,
const offsetConf = {}
if (typeof this._config.offset === 'function') {
offsetConf.fn = (data) => {
- data.offsets = $.extend({}, data.offsets, this._config.offset(data.offsets) || {})
+ data.offsets = {
+ ...data.offsets,
+ ...this._config.offset(data.offsets) || {}
+ }
return data
}
} else {
// private
_getConfig(config) {
- config = $.extend({}, Default, config)
+ config = {
+ ...Default,
+ ...config
+ }
Util.typeCheckConfig(NAME, config, DefaultType)
return config
}
static _jQueryInterface(config, relatedTarget) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
- const _config = $.extend(
- {},
- Modal.Default,
- $(this).data(),
- typeof config === 'object' && config
- )
+ const _config = {
+ ...Modal.Default,
+ ...$(this).data(),
+ ...typeof config === 'object' && config
+ }
if (!data) {
data = new Modal(this, _config)
}
const config = $(target).data(DATA_KEY) ?
- 'toggle' : $.extend({}, $(target).data(), $(this).data())
+ 'toggle' : {
+ ...$(target).data(),
+ ...$(this).data()
+ }
if (this.tagName === 'A' || this.tagName === 'AREA') {
event.preventDefault()
const CLASS_PREFIX = 'bs-popover'
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g')
- const Default = $.extend({}, Tooltip.Default, {
- placement : 'right',
- trigger : 'click',
- content : '',
- template : '<div class="popover" role="tooltip">'
- + '<div class="arrow"></div>'
- + '<h3 class="popover-header"></h3>'
- + '<div class="popover-body"></div></div>'
- })
-
- const DefaultType = $.extend({}, Tooltip.DefaultType, {
- content : '(string|element|function)'
- })
+ const Default = {
+ ...Tooltip.Default,
+ ...{
+ placement : 'right',
+ trigger : 'click',
+ content : '',
+ template : '<div class="popover" role="tooltip">'
+ + '<div class="arrow"></div>'
+ + '<h3 class="popover-header"></h3>'
+ + '<div class="popover-body"></div></div>'
+ }
+ }
+
+ const DefaultType = {
+ ...Tooltip.DefaultType,
+ ...{
+ content : '(string|element|function)'
+ }
+ }
const ClassName = {
FADE : 'fade',
// private
_getConfig(config) {
- config = $.extend({}, Default, config)
+ config = {
+ ...Default,
+ ...config
+ }
if (typeof config.target !== 'string') {
let id = $(config.target).attr('id')
})
if (this.config.selector) {
- this.config = $.extend({}, this.config, {
- trigger : 'manual',
- selector : ''
- })
+ this.config = {
+ ...this.config,
+ ...{
+ trigger : 'manual',
+ selector : ''
+ }
+ }
} else {
this._fixTitle()
}
}
_getConfig(config) {
- config = $.extend(
- {},
- this.constructor.Default,
- $(this.element).data(),
- config
- )
+ config = {
+ ...this.constructor.Default,
+ ...$(this.element).data(),
+ ...config
+ }
if (typeof config.delay === 'number') {
config.delay = {