mirror of https://github.com/twbs/bootstrap.git
Re-ordering js default objects
This commit is contained in:
parent
824c5a077b
commit
c137d11aa2
|
@ -80,8 +80,8 @@ const Default = {
|
||||||
const DefaultType = {
|
const DefaultType = {
|
||||||
interval: '(number|boolean)',
|
interval: '(number|boolean)',
|
||||||
keyboard: 'boolean',
|
keyboard: 'boolean',
|
||||||
ride: '(boolean|string)',
|
|
||||||
pause: '(string|boolean)',
|
pause: '(string|boolean)',
|
||||||
|
ride: '(boolean|string)',
|
||||||
touch: 'boolean',
|
touch: 'boolean',
|
||||||
wrap: 'boolean'
|
wrap: 'boolean'
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,13 +45,13 @@ const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing'
|
||||||
const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]'
|
const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]'
|
||||||
|
|
||||||
const Default = {
|
const Default = {
|
||||||
toggle: true,
|
parent: null,
|
||||||
parent: null
|
toggle: true
|
||||||
}
|
}
|
||||||
|
|
||||||
const DefaultType = {
|
const DefaultType = {
|
||||||
toggle: 'boolean',
|
parent: '(null|element)',
|
||||||
parent: '(null|element)'
|
toggle: 'boolean'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -68,21 +68,21 @@ const PLACEMENT_TOPCENTER = 'top'
|
||||||
const PLACEMENT_BOTTOMCENTER = 'bottom'
|
const PLACEMENT_BOTTOMCENTER = 'bottom'
|
||||||
|
|
||||||
const Default = {
|
const Default = {
|
||||||
offset: [0, 2],
|
autoClose: true,
|
||||||
boundary: 'clippingParents',
|
boundary: 'clippingParents',
|
||||||
reference: 'toggle',
|
|
||||||
display: 'dynamic',
|
display: 'dynamic',
|
||||||
|
offset: [0, 2],
|
||||||
popperConfig: null,
|
popperConfig: null,
|
||||||
autoClose: true
|
reference: 'toggle'
|
||||||
}
|
}
|
||||||
|
|
||||||
const DefaultType = {
|
const DefaultType = {
|
||||||
offset: '(array|string|function)',
|
autoClose: '(boolean|string)',
|
||||||
boundary: '(string|element)',
|
boundary: '(string|element)',
|
||||||
reference: '(string|element|object)',
|
|
||||||
display: 'string',
|
display: 'string',
|
||||||
|
offset: '(array|string|function)',
|
||||||
popperConfig: '(null|object|function)',
|
popperConfig: '(null|object|function)',
|
||||||
autoClose: '(boolean|string)'
|
reference: '(string|element|object)'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -46,14 +46,14 @@ const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="modal"]'
|
||||||
|
|
||||||
const Default = {
|
const Default = {
|
||||||
backdrop: true,
|
backdrop: true,
|
||||||
keyboard: true,
|
focus: true,
|
||||||
focus: true
|
keyboard: true
|
||||||
}
|
}
|
||||||
|
|
||||||
const DefaultType = {
|
const DefaultType = {
|
||||||
backdrop: '(boolean|string)',
|
backdrop: '(boolean|string)',
|
||||||
keyboard: 'boolean',
|
focus: 'boolean',
|
||||||
focus: 'boolean'
|
keyboard: 'boolean'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -19,15 +19,15 @@ const SELECTOR_CONTENT = '.popover-body'
|
||||||
|
|
||||||
const Default = {
|
const Default = {
|
||||||
...Tooltip.Default,
|
...Tooltip.Default,
|
||||||
placement: 'right',
|
|
||||||
offset: [0, 8],
|
|
||||||
trigger: 'click',
|
|
||||||
content: '',
|
content: '',
|
||||||
|
offset: [0, 8],
|
||||||
|
placement: 'right',
|
||||||
template: '<div class="popover" role="tooltip">' +
|
template: '<div class="popover" role="tooltip">' +
|
||||||
'<div class="popover-arrow"></div>' +
|
'<div class="popover-arrow"></div>' +
|
||||||
'<h3 class="popover-header"></h3>' +
|
'<h3 class="popover-header"></h3>' +
|
||||||
'<div class="popover-body"></div>' +
|
'<div class="popover-body"></div>' +
|
||||||
'</div>'
|
'</div>',
|
||||||
|
trigger: 'click'
|
||||||
}
|
}
|
||||||
|
|
||||||
const DefaultType = {
|
const DefaultType = {
|
||||||
|
|
|
@ -54,46 +54,46 @@ const AttachmentMap = {
|
||||||
}
|
}
|
||||||
|
|
||||||
const Default = {
|
const Default = {
|
||||||
|
allowList: DefaultAllowlist,
|
||||||
animation: true,
|
animation: true,
|
||||||
template: '<div class="tooltip" role="tooltip">' +
|
|
||||||
'<div class="tooltip-arrow"></div>' +
|
|
||||||
'<div class="tooltip-inner"></div>' +
|
|
||||||
'</div>',
|
|
||||||
trigger: 'hover focus',
|
|
||||||
title: '',
|
|
||||||
delay: 0,
|
|
||||||
html: false,
|
|
||||||
selector: false,
|
|
||||||
placement: 'top',
|
|
||||||
offset: [0, 0],
|
|
||||||
container: false,
|
|
||||||
fallbackPlacements: ['top', 'right', 'bottom', 'left'],
|
|
||||||
boundary: 'clippingParents',
|
boundary: 'clippingParents',
|
||||||
|
container: false,
|
||||||
customClass: '',
|
customClass: '',
|
||||||
|
delay: 0,
|
||||||
|
fallbackPlacements: ['top', 'right', 'bottom', 'left'],
|
||||||
|
html: false,
|
||||||
|
offset: [0, 0],
|
||||||
|
placement: 'top',
|
||||||
|
popperConfig: null,
|
||||||
sanitize: true,
|
sanitize: true,
|
||||||
sanitizeFn: null,
|
sanitizeFn: null,
|
||||||
allowList: DefaultAllowlist,
|
selector: false,
|
||||||
popperConfig: null
|
template: '<div class="tooltip" role="tooltip">' +
|
||||||
|
'<div class="tooltip-arrow"></div>' +
|
||||||
|
'<div class="tooltip-inner"></div>' +
|
||||||
|
'</div>',
|
||||||
|
title: '',
|
||||||
|
trigger: 'hover focus'
|
||||||
}
|
}
|
||||||
|
|
||||||
const DefaultType = {
|
const DefaultType = {
|
||||||
|
allowList: 'object',
|
||||||
animation: 'boolean',
|
animation: 'boolean',
|
||||||
template: 'string',
|
|
||||||
title: '(string|element|function)',
|
|
||||||
trigger: 'string',
|
|
||||||
delay: '(number|object)',
|
|
||||||
html: 'boolean',
|
|
||||||
selector: '(string|boolean)',
|
|
||||||
placement: '(string|function)',
|
|
||||||
offset: '(array|string|function)',
|
|
||||||
container: '(string|element|boolean)',
|
|
||||||
fallbackPlacements: 'array',
|
|
||||||
boundary: '(string|element)',
|
boundary: '(string|element)',
|
||||||
|
container: '(string|element|boolean)',
|
||||||
customClass: '(string|function)',
|
customClass: '(string|function)',
|
||||||
|
delay: '(number|object)',
|
||||||
|
fallbackPlacements: 'array',
|
||||||
|
html: 'boolean',
|
||||||
|
offset: '(array|string|function)',
|
||||||
|
placement: '(string|function)',
|
||||||
|
popperConfig: '(null|object|function)',
|
||||||
sanitize: 'boolean',
|
sanitize: 'boolean',
|
||||||
sanitizeFn: '(null|function)',
|
sanitizeFn: '(null|function)',
|
||||||
allowList: 'object',
|
selector: '(string|boolean)',
|
||||||
popperConfig: '(null|object|function)'
|
template: 'string',
|
||||||
|
title: '(string|element|function)',
|
||||||
|
trigger: 'string'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -20,18 +20,18 @@ const EVENT_MOUSEDOWN = `mousedown.bs.${NAME}`
|
||||||
|
|
||||||
const Default = {
|
const Default = {
|
||||||
className: 'modal-backdrop',
|
className: 'modal-backdrop',
|
||||||
isVisible: true, // if false, we use the backdrop helper without adding any element to the dom
|
clickCallback: null,
|
||||||
isAnimated: false,
|
isAnimated: false,
|
||||||
rootElement: 'body', // give the choice to place backdrop under different elements
|
isVisible: true, // if false, we use the backdrop helper without adding any element to the dom
|
||||||
clickCallback: null
|
rootElement: 'body' // give the choice to place backdrop under different elements
|
||||||
}
|
}
|
||||||
|
|
||||||
const DefaultType = {
|
const DefaultType = {
|
||||||
className: 'string',
|
className: 'string',
|
||||||
isVisible: 'boolean',
|
clickCallback: '(function|null)',
|
||||||
isAnimated: 'boolean',
|
isAnimated: 'boolean',
|
||||||
rootElement: '(element|string)',
|
isVisible: 'boolean',
|
||||||
clickCallback: '(function|null)'
|
rootElement: '(element|string)'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -24,13 +24,13 @@ const TAB_NAV_FORWARD = 'forward'
|
||||||
const TAB_NAV_BACKWARD = 'backward'
|
const TAB_NAV_BACKWARD = 'backward'
|
||||||
|
|
||||||
const Default = {
|
const Default = {
|
||||||
trapElement: null, // The element to trap focus inside of
|
autofocus: true,
|
||||||
autofocus: true
|
trapElement: null // The element to trap focus inside of
|
||||||
}
|
}
|
||||||
|
|
||||||
const DefaultType = {
|
const DefaultType = {
|
||||||
trapElement: 'element',
|
autofocus: 'boolean',
|
||||||
autofocus: 'boolean'
|
trapElement: 'element'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -26,15 +26,15 @@ const CLASS_NAME_POINTER_EVENT = 'pointer-event'
|
||||||
const SWIPE_THRESHOLD = 40
|
const SWIPE_THRESHOLD = 40
|
||||||
|
|
||||||
const Default = {
|
const Default = {
|
||||||
|
endCallback: null,
|
||||||
leftCallback: null,
|
leftCallback: null,
|
||||||
rightCallback: null,
|
rightCallback: null
|
||||||
endCallback: null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const DefaultType = {
|
const DefaultType = {
|
||||||
|
endCallback: '(function|null)',
|
||||||
leftCallback: '(function|null)',
|
leftCallback: '(function|null)',
|
||||||
rightCallback: '(function|null)',
|
rightCallback: '(function|null)'
|
||||||
endCallback: '(function|null)'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,28 +17,28 @@ import Config from './config'
|
||||||
const NAME = 'TemplateFactory'
|
const NAME = 'TemplateFactory'
|
||||||
|
|
||||||
const Default = {
|
const Default = {
|
||||||
extraClass: '',
|
allowList: DefaultAllowlist,
|
||||||
template: '<div></div>',
|
|
||||||
content: {}, // { selector : text , selector2 : text2 , }
|
content: {}, // { selector : text , selector2 : text2 , }
|
||||||
|
extraClass: '',
|
||||||
html: false,
|
html: false,
|
||||||
sanitize: true,
|
sanitize: true,
|
||||||
sanitizeFn: null,
|
sanitizeFn: null,
|
||||||
allowList: DefaultAllowlist
|
template: '<div></div>'
|
||||||
}
|
}
|
||||||
|
|
||||||
const DefaultType = {
|
const DefaultType = {
|
||||||
extraClass: '(string|function)',
|
allowList: 'object',
|
||||||
template: 'string',
|
|
||||||
content: 'object',
|
content: 'object',
|
||||||
|
extraClass: '(string|function)',
|
||||||
html: 'boolean',
|
html: 'boolean',
|
||||||
sanitize: 'boolean',
|
sanitize: 'boolean',
|
||||||
sanitizeFn: '(null|function)',
|
sanitizeFn: '(null|function)',
|
||||||
allowList: 'object'
|
template: 'string'
|
||||||
}
|
}
|
||||||
|
|
||||||
const DefaultContentType = {
|
const DefaultContentType = {
|
||||||
selector: '(string|element)',
|
entry: '(string|element|function|null)',
|
||||||
entry: '(string|element|function|null)'
|
selector: '(string|element)'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue