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/src/util
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/src/util
parent824c5a077bfed3a3d3d80aef4cae1bc486d69f79 (diff)
Re-ordering js default objects
Diffstat (limited to 'js/src/util')
-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
4 files changed, 22 insertions, 22 deletions
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)'
}
/**