Commit b50d8a7f authored by Andreas Fernandez's avatar Andreas Fernandez Committed by Benni Mack
Browse files

[TASK] Update Bootstrap to 5.0.1

Executed command:

  yarn add "bootstrap@^5.0.1"

Also, some minor coding issues were solved that popped up
with the update.

Resolves: #94138
Releases: master
Change-Id: Ie80eff09efba43cfb9ae60862cb2167b0bc3f12f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69146

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Richard Haeser's avatarRichard Haeser <richard@richardhaeser.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Richard Haeser's avatarRichard Haeser <richard@richardhaeser.com>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 169eb06e
......@@ -37,6 +37,7 @@ export class SelectTreeElement {
this.tree.addEventListener('typo3:svg-tree:node-selected', () => { callback(); } );
const settings = {
id: treeWrapperId,
dataUrl: this.generateRequestUrl(),
readOnlyMode: parseInt(this.recordField.dataset.readOnly, 10) === 1,
input: this.recordField,
......
......@@ -93,7 +93,7 @@ class Popover {
$element.each((i, el) => {
const popover = $(el).data('typo3.bs.popover');
if (popover) {
popover.config[key] = value;
popover._config[key] = value;
}
});
}
......
......@@ -157,7 +157,7 @@ export class SvgTree extends LitElement {
delay: 50,
trigger: 'hover',
placement: 'right',
container: '#' + this.id,
container: typeof this.settings.id !== 'undefined' ? '#' + this.settings.id : 'body',
}
this.updateScrollPosition();
......
......@@ -82,7 +82,7 @@
"@popperjs/core": "^2.9.1",
"@typo3/icons": "^2.2.2",
"autosize": "^4.0.2",
"bootstrap": "^5.0.0",
"bootstrap": "^5.0.1",
"broadcastchannel-polyfill": "^1.0.0",
"chart.js": "^2.9.3",
"chosen-js": "^1.8.7",
......
......@@ -1316,10 +1316,10 @@ boolbase@^1.0.0, boolbase@~1.0.0:
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
bootstrap@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.0.0.tgz#97635ac0e0d6cb466700ebf0fd266bfabf352ed2"
integrity sha512-tmhPET9B9qCl8dCofvHeiIhi49iBt0EehmIsziZib65k1erBW1rHhj2s/2JsuQh5Pq+xz2E9bEbzp9B7xHG+VA==
bootstrap@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.0.1.tgz#e7939d599119dc818a90478a2a299bdaff037e09"
integrity sha512-Fl79+wsLOZKoiU345KeEaWD0ik8WKRI5zm0YSPj2oF1Qr+BO7z0fco6GbUtqjoG1h4VI89PeKJnMsMMVQdKKTw==
boxen@^1.2.1:
version "1.3.0"
......
......@@ -10,7 +10,7 @@
*
* The TYPO3 project - inspiring people to share!
*/
var __decorate=this&&this.__decorate||function(e,t,i,r){var a,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var d=e.length-1;d>=0;d--)(a=e[d])&&(s=(n<3?a(s):n>3?a(t,i,s):a(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};define(["require","exports","bootstrap","lit","lit/decorators","TYPO3/CMS/Core/lit-helper","TYPO3/CMS/Backend/FormEngineValidation","TYPO3/CMS/Backend/Element/IconElement","./SelectTree"],(function(e,t,i,r,a,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectTreeElement=void 0;t.SelectTreeElement=class{constructor(e,t,i){this.recordField=null,this.tree=null,this.selectNode=e=>{const t=e.detail.node;this.updateAncestorsIndeterminateState(t),this.calculateIndeterminate(this.tree.nodes),this.saveCheckboxes(),this.tree.setup.input.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},this.loadDataAfter=()=>{this.tree.nodes=this.tree.nodes.map(e=>(e.indeterminate=!1,e)),this.calculateIndeterminate(this.tree.nodes),this.saveCheckboxes(),s.validateField(this.recordField)},this.saveCheckboxes=()=>{void 0!==this.recordField&&(this.recordField.value=this.tree.getSelectedNodes().map(e=>e.identifier).join(","))},this.recordField=document.getElementById(t);const r=document.getElementById(e);this.tree=document.createElement("typo3-backend-form-selecttree"),this.tree.classList.add("svg-tree-wrapper"),this.tree.addEventListener("typo3:svg-tree:nodes-prepared",this.loadDataAfter),this.tree.addEventListener("typo3:svg-tree:node-selected",this.selectNode),this.tree.addEventListener("typo3:svg-tree:node-selected",()=>{i()});const a={dataUrl:this.generateRequestUrl(),readOnlyMode:1===parseInt(this.recordField.dataset.readOnly,10),input:this.recordField,exclusiveNodesIdentifiers:this.recordField.dataset.treeExclusiveKeys,validation:JSON.parse(this.recordField.dataset.formengineValidationRules)[0],expandUpToLevel:this.recordField.dataset.treeExpandUpToLevel,unselectableElements:[]};this.tree.addEventListener("svg-tree:initialized",()=>{const e=document.createElement("typo3-backend-form-selecttree-toolbar");e.tree=this.tree,this.tree.prepend(e)}),this.tree.setup=a,r.append(this.tree),this.listenForVisibleTree()}listenForVisibleTree(){if(!this.tree.offsetParent){let e=this.tree.closest(".tab-pane").getAttribute("id");if(e){document.querySelector('[aria-controls="'+e+'"]').addEventListener("shown.bs.tab",()=>{this.tree.dispatchEvent(new Event("svg-tree:visible"))})}}}generateRequestUrl(){const e={tableName:this.recordField.dataset.tablename,fieldName:this.recordField.dataset.fieldname,uid:this.recordField.dataset.uid,recordTypeValue:this.recordField.dataset.recordtypevalue,dataStructureIdentifier:this.recordField.dataset.datastructureidentifier,flexFormSheetName:this.recordField.dataset.flexformsheetname,flexFormFieldName:this.recordField.dataset.flexformfieldname,flexFormContainerName:this.recordField.dataset.flexformcontainername,flexFormContainerIdentifier:this.recordField.dataset.flexformcontaineridentifier,flexFormContainerFieldName:this.recordField.dataset.flexformcontainerfieldname,flexFormSectionContainerIsNew:this.recordField.dataset.flexformsectioncontainerisnew,command:this.recordField.dataset.command};return TYPO3.settings.ajaxUrls.record_tree_data+"&"+new URLSearchParams(e)}updateAncestorsIndeterminateState(e){let t=!1;e.parents.forEach(e=>{const i=this.tree.nodes[e];i.indeterminate=i.checked||i.indeterminate||t,t=i.checked||i.indeterminate||i.checked||i.indeterminate})}calculateIndeterminate(e){e.forEach(t=>{(t.checked||t.indeterminate)&&t.parents&&t.parents.length>0&&t.parents.forEach(t=>{e[t].indeterminate=!0})})}};let d=class extends r.LitElement{constructor(){super(...arguments),this.settings={collapseAllBtn:"collapse-all-btn",expandAllBtn:"expand-all-btn",searchInput:"search-input",toggleHideUnchecked:"hide-unchecked-btn"},this.hideUncheckedState=!1}createRenderRoot(){return this}firstUpdated(){this.querySelectorAll('[data-bs-toggle="tooltip"]').forEach(e=>new i.Tooltip(e))}render(){return r.html`
var __decorate=this&&this.__decorate||function(e,t,i,r){var a,n=arguments.length,s=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var d=e.length-1;d>=0;d--)(a=e[d])&&(s=(n<3?a(s):n>3?a(t,i,s):a(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};define(["require","exports","bootstrap","lit","lit/decorators","TYPO3/CMS/Core/lit-helper","TYPO3/CMS/Backend/FormEngineValidation","TYPO3/CMS/Backend/Element/IconElement","./SelectTree"],(function(e,t,i,r,a,n,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectTreeElement=void 0;t.SelectTreeElement=class{constructor(e,t,i){this.recordField=null,this.tree=null,this.selectNode=e=>{const t=e.detail.node;this.updateAncestorsIndeterminateState(t),this.calculateIndeterminate(this.tree.nodes),this.saveCheckboxes(),this.tree.setup.input.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))},this.loadDataAfter=()=>{this.tree.nodes=this.tree.nodes.map(e=>(e.indeterminate=!1,e)),this.calculateIndeterminate(this.tree.nodes),this.saveCheckboxes(),s.validateField(this.recordField)},this.saveCheckboxes=()=>{void 0!==this.recordField&&(this.recordField.value=this.tree.getSelectedNodes().map(e=>e.identifier).join(","))},this.recordField=document.getElementById(t);const r=document.getElementById(e);this.tree=document.createElement("typo3-backend-form-selecttree"),this.tree.classList.add("svg-tree-wrapper"),this.tree.addEventListener("typo3:svg-tree:nodes-prepared",this.loadDataAfter),this.tree.addEventListener("typo3:svg-tree:node-selected",this.selectNode),this.tree.addEventListener("typo3:svg-tree:node-selected",()=>{i()});const a={id:e,dataUrl:this.generateRequestUrl(),readOnlyMode:1===parseInt(this.recordField.dataset.readOnly,10),input:this.recordField,exclusiveNodesIdentifiers:this.recordField.dataset.treeExclusiveKeys,validation:JSON.parse(this.recordField.dataset.formengineValidationRules)[0],expandUpToLevel:this.recordField.dataset.treeExpandUpToLevel,unselectableElements:[]};this.tree.addEventListener("svg-tree:initialized",()=>{const e=document.createElement("typo3-backend-form-selecttree-toolbar");e.tree=this.tree,this.tree.prepend(e)}),this.tree.setup=a,r.append(this.tree),this.listenForVisibleTree()}listenForVisibleTree(){if(!this.tree.offsetParent){let e=this.tree.closest(".tab-pane").getAttribute("id");if(e){document.querySelector('[aria-controls="'+e+'"]').addEventListener("shown.bs.tab",()=>{this.tree.dispatchEvent(new Event("svg-tree:visible"))})}}}generateRequestUrl(){const e={tableName:this.recordField.dataset.tablename,fieldName:this.recordField.dataset.fieldname,uid:this.recordField.dataset.uid,recordTypeValue:this.recordField.dataset.recordtypevalue,dataStructureIdentifier:this.recordField.dataset.datastructureidentifier,flexFormSheetName:this.recordField.dataset.flexformsheetname,flexFormFieldName:this.recordField.dataset.flexformfieldname,flexFormContainerName:this.recordField.dataset.flexformcontainername,flexFormContainerIdentifier:this.recordField.dataset.flexformcontaineridentifier,flexFormContainerFieldName:this.recordField.dataset.flexformcontainerfieldname,flexFormSectionContainerIsNew:this.recordField.dataset.flexformsectioncontainerisnew,command:this.recordField.dataset.command};return TYPO3.settings.ajaxUrls.record_tree_data+"&"+new URLSearchParams(e)}updateAncestorsIndeterminateState(e){let t=!1;e.parents.forEach(e=>{const i=this.tree.nodes[e];i.indeterminate=i.checked||i.indeterminate||t,t=i.checked||i.indeterminate||i.checked||i.indeterminate})}calculateIndeterminate(e){e.forEach(t=>{(t.checked||t.indeterminate)&&t.parents&&t.parents.length>0&&t.parents.forEach(t=>{e[t].indeterminate=!0})})}};let d=class extends r.LitElement{constructor(){super(...arguments),this.settings={collapseAllBtn:"collapse-all-btn",expandAllBtn:"expand-all-btn",searchInput:"search-input",toggleHideUnchecked:"hide-unchecked-btn"},this.hideUncheckedState=!1}createRenderRoot(){return this}firstUpdated(){this.querySelectorAll('[data-bs-toggle="tooltip"]').forEach(e=>new i.Tooltip(e))}render(){return r.html`
<div class="tree-toolbar btn-toolbar">
<div class="input-group">
<span class="input-group-addon input-group-icon filter">
......
......@@ -10,4 +10,4 @@
*
* The TYPO3 project - inspiring people to share!
*/
var __importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};define(["require","exports","jquery","bootstrap"],(function(t,e,o,a){"use strict";o=__importDefault(o);return new class{constructor(){this.DEFAULT_SELECTOR='[data-bs-toggle="popover"]',this.initialize()}initialize(t){t=t||this.DEFAULT_SELECTOR,o.default(t).each((t,e)=>{const s=new a.Popover(e);o.default(e).data("typo3.bs.popover",s)})}popover(t){t.each((t,e)=>{const s=new a.Popover(e);o.default(e).data("typo3.bs.popover",s)})}setOptions(t,e){const a=(e=e||{}).title||t.data("title")||"",s=e.content||t.data("bs-content")||"";t.attr("data-bs-original-title",a).attr("data-bs-content",s).attr("data-bs-placement","auto"),o.default.each(e,(e,o)=>{this.setOption(t,e,o)})}setOption(t,e,a){"content"===e?(t.attr("data-bs-content",a),t.data("typo3.bs.popover").setContent(a)):t.each((t,s)=>{const p=o.default(s).data("typo3.bs.popover");p&&(p.config[e]=a)})}show(t){t.each((t,e)=>{const a=o.default(e).data("typo3.bs.popover");a&&a.show()})}hide(t){t.each((t,e)=>{const a=o.default(e).data("typo3.bs.popover");a&&a.hide()})}destroy(t){t.each((t,e)=>{const a=o.default(e).data("typo3.bs.popover");a&&a.dispose()})}toggle(t){t.each((t,e)=>{const a=o.default(e).data("typo3.bs.popover");a&&a.toggle()})}}}));
\ No newline at end of file
var __importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};define(["require","exports","jquery","bootstrap"],(function(t,e,o,a){"use strict";o=__importDefault(o);return new class{constructor(){this.DEFAULT_SELECTOR='[data-bs-toggle="popover"]',this.initialize()}initialize(t){t=t||this.DEFAULT_SELECTOR,o.default(t).each((t,e)=>{const s=new a.Popover(e);o.default(e).data("typo3.bs.popover",s)})}popover(t){t.each((t,e)=>{const s=new a.Popover(e);o.default(e).data("typo3.bs.popover",s)})}setOptions(t,e){const a=(e=e||{}).title||t.data("title")||"",s=e.content||t.data("bs-content")||"";t.attr("data-bs-original-title",a).attr("data-bs-content",s).attr("data-bs-placement","auto"),o.default.each(e,(e,o)=>{this.setOption(t,e,o)})}setOption(t,e,a){"content"===e?(t.attr("data-bs-content",a),t.data("typo3.bs.popover").setContent(a)):t.each((t,s)=>{const p=o.default(s).data("typo3.bs.popover");p&&(p._config[e]=a)})}show(t){t.each((t,e)=>{const a=o.default(e).data("typo3.bs.popover");a&&a.show()})}hide(t){t.each((t,e)=>{const a=o.default(e).data("typo3.bs.popover");a&&a.hide()})}destroy(t){t.each((t,e)=>{const a=o.default(e).data("typo3.bs.popover");a&&a.dispose()})}toggle(t){t.each((t,e)=>{const a=o.default(e).data("typo3.bs.popover");a&&a.toggle()})}}}));
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment