TYPO3 v15 dev-main snapshot ()

This commit is contained in:
2026-08-10 22:31:00 +02:00
commit f9941541b7
1178 changed files with 135377 additions and 0 deletions
@@ -0,0 +1,13 @@
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
import o from"@typo3/core/document-service.js";import u from"@typo3/core/event/regular-event.js";var n;(function(s){s.CUSTOM="custom"})(n||(n={}));class c{constructor(r){o.ready().then(()=>{this.registerEventHandler(r)})}registerEventHandler(r){new u("change",i=>{const t=i.target,e=t.closest(".t3js-formengine-field-item")?.querySelector("[data-formengine-input-name]");if(!e)return;const a=e.dataset.lastL10nState||!1,l=t.value;a&&l===a||(l===n.CUSTOM?(a&&(t.dataset.originalLanguageValue=e.value),e.disabled=!1):(a===n.CUSTOM&&(t.closest(".t3js-l10n-state-container").querySelector(".t3js-l10n-state-custom").dataset.originalLanguageValue=e.value),e.disabled=!0),e.value=t.dataset.originalLanguageValue,e.dispatchEvent(new Event("change")),e.dataset.lastL10nState=t.value)}).delegateTo(document,'.t3js-l10n-state-container input[type="radio"][name="'+r+'"]')}}export{c as default};
@@ -0,0 +1,13 @@
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
import d from"@typo3/core/document-service.js";import o from"@typo3/backend/form-engine.js";class u{constructor(){d.ready().then(()=>{this.run()})}run(){const e=document.querySelector('[name$="[shortcut]"]'),t=document.querySelector('[name$="[shortcut_mode]"]'),i=e?.closest("form");!e||!t||!i||t.addEventListener("change",()=>{this.apply(e,i,t)})}async apply(e,t,i){const a=parseInt(i.value,10)===0,n=JSON.parse(e.dataset.formengineValidationRules||"[]"),r=n.findIndex(s=>s.type==="required");a&&r===-1?n.push({type:"required"}):!a&&r!==-1&&n.splice(r,1),e.dataset.formengineValidationRules=JSON.stringify(n),o.reinitialize(),o.Validation.initializeInputFields(),o.Validation.validate(t)}}var c=new u;export{c as default};
@@ -0,0 +1,13 @@
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
class t extends HTMLElement{constructor(){super(),this.valuePicker=null,this.linkedField=null,this.initialValueSet=!1,this.onChange=()=>{this.setValue(),this.valuePicker.blur()},this.linkedFieldOnChange=()=>{this.valuePicker!==null&&this.selectValue(this.linkedField.value)};const e=document.createElement("slot");e.addEventListener("slotchange",()=>this.initializeValuePicker(e)),this.attachShadow({mode:"open"}).append(e)}connectedCallback(){this.linkedField=document.querySelector(this.getAttribute("linked-field")),this.linkedField?.addEventListener("change",this.linkedFieldOnChange),this.initializeValuePicker(this.shadowRoot.querySelector("slot"))}disconnectedCallback(){this.linkedField?.removeEventListener("change",this.linkedFieldOnChange),this.linkedField=null}initializeValuePicker(e){const i=e.assignedElements()[0]??null;if(i!==null&&i.tagName.toLowerCase()!=="select")throw new Error(`ValuePicker could not be initialized. Expected <select> child name, but found: ${i}`);i!==this.valuePicker&&(this.valuePicker?.removeEventListener("change",this.onChange),this.valuePicker=i,this.valuePicker?.addEventListener("change",this.onChange),this.initialValueSet=!1),this.setInitialPickerValue()}setInitialPickerValue(){if(this.linkedField===null||this.valuePicker===null||this.initialValueSet)return;const e=document.getElementsByName(this.linkedField.dataset.formengineInputName)[0]??null;e!==null&&(this.selectValue(e.value),this.initialValueSet=!0)}selectValue(e){this.valuePicker.selectedIndex=Array.from(this.valuePicker.options).findIndex(i=>i.value===e)}setValue(){const e=this.valuePicker.options[this.valuePicker.selectedIndex].value;this.linkedField.value=e,this.linkedField.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))}}window.customElements.define("typo3-formengine-valuepicker",t);export{t as ValuePicker};
@@ -0,0 +1,13 @@
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
import r from"@typo3/core/document-service.js";import u from"@typo3/core/event/throttle-event.js";var i;(function(l){l.integer="integer",l.decimal="decimal"})(i||(i={}));class n extends HTMLElement{constructor(){super(...arguments),this.valueSlider=null,this.handleRangeChange=t=>{const e=t.target;this.updateValue(e),this.updateTooltipValue(e)}}async connectedCallback(){this.valueSlider===null&&(await r.ready(),this.valueSlider=this.querySelector("input"),this.valueSlider!==null&&new u("input",this.handleRangeChange,25).bindTo(this.valueSlider))}updateValue(t){const e=document.querySelector(this.getAttribute("linked-field"));e.value=t.value,e.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))}updateTooltipValue(t){let e;const a=t.value;switch(this.getAttribute("format")){case i.decimal:e=parseFloat(a).toFixed(Number(this.getAttribute("precision"))||2);break;case i.integer:default:e=parseInt(a,10)}t.title=e.toString()}}window.customElements.define("typo3-formengine-valueslider",n);export{n as ValueSlider};