Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorlouismaxime.piton <louismaxime.piton@orange.com>2022-05-19 16:35:44 +0300
committerMark Otto <otto@github.com>2022-06-02 05:24:45 +0300
commitc137d11aa2df111e2a42bc42295576fdd366fd68 (patch)
tree9c93a9dbd479be01cb803c8bc294fee4028084f1 /js
parent824c5a077bfed3a3d3d80aef4cae1bc486d69f79 (diff)
Re-ordering js default objects
Diffstat (limited to 'js')
-rw-r--r--js/src/carousel.js2
-rw-r--r--js/src/collapse.js8
-rw-r--r--js/src/dropdown.js12
-rw-r--r--js/src/modal.js8
-rw-r--r--js/src/popover.js14
-rw-r--r--js/src/tooltip.js50
-rw-r--r--js/src/util/backdrop.js12
-rw-r--r--js/src/util/focustrap.js8
-rw-r--r--js/src/util/swipe.js8
-rw-r--r--js/src/util/template-factory.js16
10 files changed, 69 insertions, 69 deletions
diff --git a/js/src/carousel.js b/js/src/carousel.js
index b68f32e7cc..b23a85b96a 100644
--- a/js/src/carousel.js
+++ b/js/src/carousel.js
@@ -80,8 +80,8 @@ const Default = {
const DefaultType = {
interval: '(number|boolean)',
keyboard: 'boolean',
- ride: '(boolean|string)',
pause: '(string|boolean)',
+ ride: '(boolean|string)',
touch: 'boolean',
wrap: 'boolean'
}
diff --git a/js/src/collapse.js b/js/src/collapse.js
index 24892fb4ba..7ff135f0ad 100644
--- a/js/src/collapse.js
+++ b/js/src/collapse.js
@@ -45,13 +45,13 @@ const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing'
const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]'
const Default = {
- toggle: true,
- parent: null
+ parent: null,
+ toggle: true
}
const DefaultType = {
- toggle: 'boolean',
- parent: '(null|element)'
+ parent: '(null|element)',
+ toggle: 'boolean'
}
/**
diff --git a/js/src/dropdown.js b/js/src/dropdown.js
index 87dc496764..1646362d0a 100644
--- a/js/src/dropdown.js
+++ b/js/src/dropdown.js
@@ -68,21 +68,21 @@ const PLACEMENT_TOPCENTER = 'top'
const PLACEMENT_BOTTOMCENTER = 'bottom'
const Default = {
- offset: [0, 2],
+ autoClose: true,
boundary: 'clippingParents',
- reference: 'toggle',
display: 'dynamic',
+ offset: [0, 2],
popperConfig: null,
- autoClose: true
+ reference: 'toggle'
}
const DefaultType = {
- offset: '(array|string|function)',
+ autoClose: '(boolean|string)',
boundary: '(string|element)',
- reference: '(string|element|object)',
display: 'string',
+ offset: '(array|string|function)',
popperConfig: '(null|object|function)',
- autoClose: '(boolean|string)'
+ reference: '(string|element|object)'
}
/**
diff --git a/js/src/modal.js b/js/src/modal.js
index 824e04e3dc..d3f0540bb8 100644
--- a/js/src/modal.js
+++ b/js/src/modal.js
@@ -46,14 +46,14 @@ const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="modal"]'
const Default = {
backdrop: true,
- keyboard: true,
- focus: true
+ focus: true,
+ keyboard: true
}
const DefaultType = {
backdrop: '(boolean|string)',
- keyboard: 'boolean',
- focus: 'boolean'
+ focus: 'boolean',
+ keyboard: 'boolean'
}
/**
diff --git a/js/src/popover.js b/js/src/popover.js
index d4c9b34892..33768617c3 100644
--- a/js/src/popover.js
+++ b/js/src/popover.js
@@ -19,15 +19,15 @@ const SELECTOR_CONTENT = '.popover-body'
const Default = {
...Tooltip.Default,
- placement: 'right',
- offset: [0, 8],
- trigger: 'click',
content: '',
+ offset: [0, 8],
+ placement: 'right',
template: '<div class="popover" role="tooltip">' +
- '<div class="popover-arrow"></div>' +
- '<h3 class="popover-header"></h3>' +
- '<div class="popover-body"></div>' +
- '</div>'
+ '<div class="popover-arrow"></div>' +
+ '<h3 class="popover-header"></h3>' +
+ '<div class="popover-body"></div>' +
+ '</div>',
+ trigger: 'click'
}
const DefaultType = {
diff --git a/js/src/tooltip.js b/js/src/tooltip.js
index a7368d085b..92770091d1 100644
--- a/js/src/tooltip.js
+++ b/js/src/tooltip.js
@@ -54,46 +54,46 @@ const AttachmentMap = {
}
const Default = {
+ allowList: DefaultAllowlist,
animation: true,
- template: '<div class="tooltip" role="tooltip">' +
- '<div class="tooltip-arrow"></div>' +
- '<div class="tooltip-inner"></div>' +
- '</div>',
- trigger: 'hover focus',
- title: '',
+ boundary: 'clippingParents',
+ container: false,
+ customClass: '',
delay: 0,
+ fallbackPlacements: ['top', 'right', 'bottom', 'left'],
html: false,
- selector: false,
- placement: 'top',
offset: [0, 0],
- container: false,
- fallbackPlacements: ['top', 'right', 'bottom', 'left'],
- boundary: 'clippingParents',
- customClass: '',
+ placement: 'top',
+ popperConfig: null,
sanitize: true,
sanitizeFn: null,
- allowList: DefaultAllowlist,
- popperConfig: null
+ selector: false,
+ template: '<div class="tooltip" role="tooltip">' +
+ '<div class="tooltip-arrow"></div>' +
+ '<div class="tooltip-inner"></div>' +
+ '</div>',
+ title: '',
+ trigger: 'hover focus'
}
const DefaultType = {
+ allowList: 'object',
animation: 'boolean',
- template: 'string',
- title: '(string|element|function)',
- trigger: 'string',
+ boundary: '(string|element)',
+ container: '(string|element|boolean)',
+ customClass: '(string|function)',
delay: '(number|object)',
+ fallbackPlacements: 'array',
html: 'boolean',
- selector: '(string|boolean)',
- placement: '(string|function)',
offset: '(array|string|function)',
- container: '(string|element|boolean)',
- fallbackPlacements: 'array',
- boundary: '(string|element)',
- customClass: '(string|function)',
+ placement: '(string|function)',
+ popperConfig: '(null|object|function)',
sanitize: 'boolean',
sanitizeFn: '(null|function)',
- allowList: 'object',
- popperConfig: '(null|object|function)'
+ selector: '(string|boolean)',
+ template: 'string',
+ title: '(string|element|function)',
+ trigger: 'string'
}
/**
diff --git a/js/src/util/backdrop.js b/js/src/util/backdrop.js
index 31619de719..bb01fbb99a 100644
--- a/js/src/util/backdrop.js
+++ b/js/src/util/backdrop.js
@@ -20,18 +20,18 @@ const EVENT_MOUSEDOWN = `mousedown.bs.${NAME}`
const Default = {
className: 'modal-backdrop',
- isVisible: true, // if false, we use the backdrop helper without adding any element to the dom
+ clickCallback: null,
isAnimated: false,
- rootElement: 'body', // give the choice to place backdrop under different elements
- clickCallback: null
+ isVisible: true, // if false, we use the backdrop helper without adding any element to the dom
+ rootElement: 'body' // give the choice to place backdrop under different elements
}
const DefaultType = {
className: 'string',
- isVisible: 'boolean',
+ clickCallback: '(function|null)',
isAnimated: 'boolean',
- rootElement: '(element|string)',
- clickCallback: '(function|null)'
+ isVisible: 'boolean',
+ rootElement: '(element|string)'
}
/**
diff --git a/js/src/util/focustrap.js b/js/src/util/focustrap.js
index 40509c1ba9..51dd19f223 100644
--- a/js/src/util/focustrap.js
+++ b/js/src/util/focustrap.js
@@ -24,13 +24,13 @@ const TAB_NAV_FORWARD = 'forward'
const TAB_NAV_BACKWARD = 'backward'
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 = {
- trapElement: 'element',
- autofocus: 'boolean'
+ autofocus: 'boolean',
+ trapElement: 'element'
}
/**
diff --git a/js/src/util/swipe.js b/js/src/util/swipe.js
index 66baa3dade..3676b57e6e 100644
--- a/js/src/util/swipe.js
+++ b/js/src/util/swipe.js
@@ -26,15 +26,15 @@ const CLASS_NAME_POINTER_EVENT = 'pointer-event'
const SWIPE_THRESHOLD = 40
const Default = {
+ endCallback: null,
leftCallback: null,
- rightCallback: null,
- endCallback: null
+ rightCallback: null
}
const DefaultType = {
+ endCallback: '(function|null)',
leftCallback: '(function|null)',
- rightCallback: '(function|null)',
- endCallback: '(function|null)'
+ rightCallback: '(function|null)'
}
/**
diff --git a/js/src/util/template-factory.js b/js/src/util/template-factory.js
index 39fa450c02..cc2551c8f0 100644
--- a/js/src/util/template-factory.js
+++ b/js/src/util/template-factory.js
@@ -17,28 +17,28 @@ import Config from './config'
const NAME = 'TemplateFactory'
const Default = {
- extraClass: '',
- template: '<div></div>',
+ allowList: DefaultAllowlist,
content: {}, // { selector : text , selector2 : text2 , }
+ extraClass: '',
html: false,
sanitize: true,
sanitizeFn: null,
- allowList: DefaultAllowlist
+ template: '<div></div>'
}
const DefaultType = {
- extraClass: '(string|function)',
- template: 'string',
+ allowList: 'object',
content: 'object',
+ extraClass: '(string|function)',
html: 'boolean',
sanitize: 'boolean',
sanitizeFn: '(null|function)',
- allowList: 'object'
+ template: 'string'
}
const DefaultContentType = {
- selector: '(string|element)',
- entry: '(string|element|function|null)'
+ entry: '(string|element|function|null)',
+ selector: '(string|element)'
}
/**