diff --git a/Classes/Backend/Form/Element/TagsElement.php b/Classes/Backend/Form/Element/TagsElement.php
index 6f6f2ec..e3aec4d 100644
--- a/Classes/Backend/Form/Element/TagsElement.php
+++ b/Classes/Backend/Form/Element/TagsElement.php
@@ -8,6 +8,7 @@
use TYPO3\CMS\Backend\Form\NodeFactory;
use TYPO3\CMS\Core\Page\JavaScriptModuleInstruction;
use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\StringUtility;
use Zeroseven\Pagebased\Exception\ValueException;
use Zeroseven\Pagebased\Registration\Registration;
use Zeroseven\Pagebased\Registration\RegistrationService;
@@ -16,24 +17,21 @@
class TagsElement extends AbstractFormElement
{
- protected string $name;
- protected string $id;
- protected string $value;
- protected string $placeholder;
- protected ?Registration $registration;
- protected int $languageUid;
-
- /** @throws ValueException */
- public function __construct(NodeFactory $nodeFactory, array $data)
+ protected string $name = '';
+ protected string $id = '';
+ protected string $value = '';
+ protected string $placeholder = '';
+ protected ?Registration $registration = null;
+ protected int $languageUid = 0;
+
+ private function initializeFromData(): void
{
- parent::__construct($nodeFactory, $data);
-
$parameterArray = $this->data['parameterArray'] ?? [];
$placeholder = $parameterArray['fieldConf']['config']['placeholder'] ?? '';
$sysLanguageUid = $this->data['databaseRow']['sys_language_uid'] ?? 0;
$this->name = $parameterArray['itemFormElName'] ?? '';
- $this->id = $parameterArray['itemFormElID'] ?? '';
+ $this->id = StringUtility::getUniqueId('pagebased-tags');
$this->value = $parameterArray['itemFormElValue'] ?? '';
$this->placeholder = str_starts_with($placeholder, 'LLL') ? $this->getLanguageService()->sL($placeholder) : $placeholder;
$this->languageUid = (int)($sysLanguageUid[0] ?? $sysLanguageUid);
@@ -79,6 +77,8 @@ protected function renderHtml(): string
public function render(): array
{
+ $this->initializeFromData();
+
$result = $this->initializeResultArray();
if ($html = $this->renderHtml()) {
diff --git a/Classes/Controller/AbstractController.php b/Classes/Controller/AbstractController.php
index cc538c6..4d869cc 100644
--- a/Classes/Controller/AbstractController.php
+++ b/Classes/Controller/AbstractController.php
@@ -15,8 +15,7 @@ public function initializeAction(): void
{
parent::initializeAction();
- /** @extensionScannerIgnoreLine */
- $this->contentData = $this->configurationManager->getContentObject()->data;
+ $this->contentData = $this->request->getAttribute('currentContentObject');
}
protected function resolveView(): ViewInterface
diff --git a/Classes/Controller/AbstractObjectController.php b/Classes/Controller/AbstractObjectController.php
index d8373f3..c6247c7 100644
--- a/Classes/Controller/AbstractObjectController.php
+++ b/Classes/Controller/AbstractObjectController.php
@@ -73,26 +73,27 @@ protected function initializeRequestArguments(): void
/** @throws TypeException */
protected function controlCache(): void
{
- if (($GLOBALS['TSFE'] ?? null) instanceof TypoScriptFrontendController && $GLOBALS['TSFE']->no_cache === false) {
+ if (($GLOBALS['TSFE'] ?? null) instanceof TypoScriptFrontendController) {
$demandArguments = array_filter(array_keys($this->requestArguments), fn(string $argument) => $this->demand->hasProperty($argument));
// Limit caching on multiple arguments
if (count($demandArguments) > 2) {
- $GLOBALS['TSFE']->no_cache = true;
+ $GLOBALS['TSFE']->set_no_cache();
return;
}
// Limit pagination
if ((int)($this->requestArguments[PaginationViewHelper::REQUEST_ARGUMENT] ?? 0) > 3) {
- $GLOBALS['TSFE']->no_cache = true;
+ $GLOBALS['TSFE']->set_no_cache();
return;
}
// Limit caching on multiple array values
foreach ($demandArguments as $argument) {
- $this->demand->getProperty($argument)->isArray()
- && count(CastUtility::array($this->requestArguments[$argument] ?? null)) > 1
- && $GLOBALS['TSFE']->no_cache = true;
+ if ($this->demand->getProperty($argument)->isArray()
+ && count(CastUtility::array($this->requestArguments[$argument] ?? null)) > 1) {
+ $GLOBALS['TSFE']->set_no_cache();
+ }
}
}
}
@@ -129,7 +130,7 @@ protected function getPluginSettings(int $uid): ?array
->select('pi_flexform')
->from('tt_content')
->where($queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, PDO::PARAM_INT)))
- ->execute()
+ ->executeQuery()
->fetchOne();
} catch (DBALException | Exception $e) {
return null;
diff --git a/Classes/Domain/Model/Demand/AbstractDemand.php b/Classes/Domain/Model/Demand/AbstractDemand.php
index 61fb5ca..2952ffc 100644
--- a/Classes/Domain/Model/Demand/AbstractDemand.php
+++ b/Classes/Domain/Model/Demand/AbstractDemand.php
@@ -86,7 +86,8 @@ protected function getType(ReflectionProperty $reflection, array $tableDefinitio
// Check table definition
if (($column = $tableDefinition[$columnMap->getColumnName()] ?? null) && $type = $column->getType()) {
- if ($type->getName() === 'smallint') {
+ $typeName = $type->getName();
+ if (str_contains($typeName, 'SmallInt') || $typeName === 'smallint') {
return DemandProperty::TYPE_BOOLEAN;
}
@@ -114,7 +115,7 @@ public function detectPropertiesFromClass(string $className): self
if ($dataMap) {
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($dataMap->getTableName());
- if (($schemaManager = $queryBuilder->getSchemaManager()) && $tableDefinition = $schemaManager->listTableColumns($dataMap->getTableName())) {
+ if (($schemaManager = $queryBuilder->createSchemaManager()) && $tableDefinition = $schemaManager->listTableColumns($dataMap->getTableName())) {
foreach (GeneralUtility::makeInstance(ReflectionClass::class, $dataMap->getClassName())->getProperties() ?? [] as $reflection) {
$name = $reflection->getName();
diff --git a/Classes/Middleware/RssFeed.php b/Classes/Middleware/RssFeed.php
index 2e74b88..87ce078 100644
--- a/Classes/Middleware/RssFeed.php
+++ b/Classes/Middleware/RssFeed.php
@@ -11,6 +11,7 @@
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
+use TYPO3\CMS\Core\Context\LanguageAspect;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Error\Http\PageNotFoundException;
use TYPO3\CMS\Core\EventDispatcher\EventDispatcher;
@@ -67,7 +68,8 @@ protected function getObjects(Registration $registration, array $settings, SiteL
if ($languageId = $language->getLanguageId()) {
$querySettings = $repository->getDefaultQuerySettings();
- $querySettings->setLanguageUid($languageId);
+ $languageAspect = new LanguageAspect($languageId, $languageId, LanguageAspect::OVERLAYS_MIXED);
+ $querySettings->setLanguageAspect($languageAspect);
$repository->setDefaultQuerySettings($querySettings);
}
@@ -126,7 +128,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
)
->orderBy($GLOBALS['TCA'][self::TABLE_NAME]['ctrl']['sortby'])
->setMaxResults(1)
- ->execute()
+ ->executeQuery()
->fetchAllAssociative()[0] ?? null;
if (
diff --git a/Classes/Utility/ObjectUtility.php b/Classes/Utility/ObjectUtility.php
index 4c1ac54..ac71e55 100644
--- a/Classes/Utility/ObjectUtility.php
+++ b/Classes/Utility/ObjectUtility.php
@@ -53,8 +53,7 @@ public static function isSystemPage(int $pageUid = null, array $row = null): boo
PageRepository::DOKTYPE_BE_USER_SECTION,
PageRepository::DOKTYPE_MOUNTPOINT,
PageRepository::DOKTYPE_SPACER,
- PageRepository::DOKTYPE_SYSFOLDER,
- PageRepository::DOKTYPE_RECYCLER
+ PageRepository::DOKTYPE_SYSFOLDER
], true);
}
diff --git a/Classes/Utility/RootLineUtility.php b/Classes/Utility/RootLineUtility.php
index c492377..00c369e 100644
--- a/Classes/Utility/RootLineUtility.php
+++ b/Classes/Utility/RootLineUtility.php
@@ -130,7 +130,7 @@ protected static function getStartingPoint(array &$list, int $startingPoint, Que
$queryBuilder->where($queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($startingPoint, Connection::PARAM_INT)))
->orWhere($queryBuilder->expr()->eq('l10n_parent', $queryBuilder->createNamedParameter($startingPoint, Connection::PARAM_INT)));
- foreach ($queryBuilder->execute()->fetchAllAssociative() as $row) {
+ foreach ($queryBuilder->executeQuery()->fetchAllAssociative() as $row) {
if ($uid = (int)($row['uid'] ?? 0)) {
$list[$uid] = $row;
}
@@ -143,7 +143,7 @@ protected static function lookUp(array &$list, int $pid, int $looped, int $depth
if ($pid > 0 && $looped <= $depth) {
$queryBuilder->where($queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($pid, Connection::PARAM_INT)));
- $statement = $queryBuilder->execute();
+ $statement = $queryBuilder->executeQuery();
while ($row = $statement->fetchAssociative()) {
if ($uid = (int)($row['uid'] ?? 0)) {
if ($looped) {
@@ -164,7 +164,7 @@ protected static function lookDown(array &$list, int $uid, int $looped, int $dep
if ($looped < $depth) {
$queryBuilder->where($queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($uid, Connection::PARAM_INT)));
- $statement = $queryBuilder->execute();
+ $statement = $queryBuilder->executeQuery();
while ($row = $statement->fetchAssociative()) {
if ($uid = (int)($row['uid'] ?? 0)) {
$list[$uid] = $row;
@@ -196,7 +196,7 @@ protected static function searchContentElementInRootline(int $pid, string $plugi
$queryBuilder->andWhere(...$constraints);
// An element with the same CType can be found on the given pid
- if (count($result = $queryBuilder->execute()->fetchAllAssociative())) {
+ if (count($result = $queryBuilder->executeQuery()->fetchAllAssociative())) {
return $result[0];
}
diff --git a/Classes/Utility/TagUtility.php b/Classes/Utility/TagUtility.php
index 70d30e8..cc03f09 100644
--- a/Classes/Utility/TagUtility.php
+++ b/Classes/Utility/TagUtility.php
@@ -4,6 +4,7 @@
namespace Zeroseven\Pagebased\Utility;
+use TYPO3\CMS\Core\Context\LanguageAspect;
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
use Zeroseven\Pagebased\Domain\Model\Demand\ObjectDemandInterface;
use Zeroseven\Pagebased\Domain\Repository\RepositoryInterface;
@@ -34,9 +35,12 @@ public static function getTags(ObjectDemandInterface $demand, RepositoryInterfac
if ($languageUid !== null) {
$querySettings = $repository->getDefaultQuerySettings();
- $languageUid === -1
- ? $querySettings->setRespectSysLanguage(false)
- : $querySettings->setLanguageUid($languageUid);
+ if ($languageUid === -1) {
+ $querySettings->setRespectSysLanguage(false);
+ } else {
+ $languageAspect = new LanguageAspect($languageUid, $languageUid, LanguageAspect::OVERLAYS_MIXED);
+ $querySettings->setLanguageAspect($languageAspect);
+ }
$repository->setDefaultQuerySettings($querySettings);
}
diff --git a/Resources/Public/JavaScript/Backend/TagsElement.js b/Resources/Public/JavaScript/Backend/TagsElement.js
index 6e49b7e..ff7fdb1 100644
--- a/Resources/Public/JavaScript/Backend/TagsElement.js
+++ b/Resources/Public/JavaScript/Backend/TagsElement.js
@@ -36,4 +36,4 @@ var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typ
`+s);let e3=t4.nextSibling,i2="";for(;e3;)i2+=e3.textContent,e3=e3.nextSibling;i2.trim()&&b(t4.previousSibling)}else t4.previousSibling&&!w(t4.previousSibling)||t4.before(s)}),t3.removedNodes.forEach(t4=>{t4&&t4.nodeName=="BR"&&f.call(this,e2)&&(this.removeTags(e2),this.fixFirefoxLastTagNoCaret())})});var e2=this.DOM.input.lastChild;e2&&e2.nodeValue==""&&e2.remove(),e2&&e2.nodeName=="BR"||this.DOM.input.appendChild(document.createElement("br"))}}};function _(t2,e2){if(!t2){console.warn("Tagify:","input element not found",t2);const e3=new Proxy(this,{get:()=>()=>e3});return e3}if(t2.__tagify)return console.warn("Tagify: ","input element is already Tagified - Same instance is returned.",t2),t2.__tagify;var i2;p(this,function(t3){var e3=document.createTextNode("");function i3(t4,i4,s2){s2&&i4.split(/\s+/g).forEach(i5=>e3[t4+"EventListener"].call(e3,i5,s2))}return{off(t4,e4){return i3("remove",t4,e4),this},on(t4,e4){return e4&&typeof e4=="function"&&i3("add",t4,e4),this},trigger(i4,s2,a2){var n2;if(a2=a2||{cloneData:!0},i4)if(t3.settings.isJQueryPlugin)i4=="remove"&&(i4="removeTag"),jQuery(t3.DOM.originalInput).triggerHandler(i4,[s2]);else{try{var o2=typeof s2=="object"?s2:{value:s2};if((o2=a2.cloneData?p({},o2):o2).tagify=this,s2.event&&(o2.event=this.cloneEvent(s2.event)),s2 instanceof Object)for(var r2 in s2)s2[r2]instanceof HTMLElement&&(o2[r2]=s2[r2]);n2=new CustomEvent(i4,{detail:o2})}catch(t4){console.warn(t4)}e3.dispatchEvent(n2)}}}}(this)),this.isFirefox=/firefox|fxios/i.test(navigator.userAgent)&&!/seamonkey/i.test(navigator.userAgent),this.isIE=window.document.documentMode,e2=e2||{},this.getPersistedData=(i2=e2.id,t3=>{let e3,s2="/"+t3;if(localStorage.getItem(M+i2+"/v",1)==1)try{e3=JSON.parse(localStorage[M+i2+s2])}catch{}return e3}),this.setPersistedData=(t3=>t3?(localStorage.setItem(M+t3+"/v",1),(e3,i3)=>{let s2="/"+i3,a2=JSON.stringify(e3);e3&&i3&&(localStorage.setItem(M+t3+s2,a2),dispatchEvent(new Event("storage")))}):()=>{})(e2.id),this.clearPersistedData=(t3=>e3=>{const i3=M+"/"+t3+"/";if(e3)localStorage.removeItem(i3+e3);else for(let t4 in localStorage)t4.includes(i3)&&localStorage.removeItem(t4)})(e2.id),this.applySettings(t2,e2),this.state={inputText:"",editing:!1,composing:!1,actions:{},mixMode:{},dropdown:{},flaggedTags:{}},this.value=[],this.listeners={},this.DOM={},this.build(t2),O.call(this),this.getCSSVars(),this.loadOriginalValues(),this.events.customBinding.call(this),this.events.binding.call(this),t2.autofocus&&this.DOM.input.focus(),t2.__tagify=this}return _.prototype={_dropdown:D,getSetTagData:w,helpers:{sameStr:a,removeCollectionProp:n,omit:o,isObject:g,parseHTML:l,escapeHTML:h,extend:p,concatWithoutDups:c,getUID:v,isNodeTag:f},customEventsList:["change","add","remove","invalid","input","click","keydown","focus","blur","edit:input","edit:beforeUpdate","edit:updated","edit:start","edit:keydown","dropdown:show","dropdown:hide","dropdown:select","dropdown:updated","dropdown:noMatch","dropdown:scroll"],dataProps:["__isValid","__removed","__originalData","__originalHTML","__tagId"],trim(t2){return this.settings.trim&&t2&&typeof t2=="string"?t2.trim():t2},parseHTML:l,templates:S,parseTemplate(t2,e2){return l((t2=this.settings.templates[t2]||t2).apply(this,e2))},set whitelist(t2){const e2=t2&&Array.isArray(t2);this.settings.whitelist=e2?t2:[],this.setPersistedData(e2?t2:[],"whitelist")},get whitelist(){return this.settings.whitelist},generateClassSelectors(t2){for(let e2 in t2){let i2=e2;Object.defineProperty(t2,i2+"Selector",{get(){return"."+this[i2].split(" ")[0]}})}},applySettings(t2,i2){var _a,_b;x.templates=this.templates;var s2=p({},x,i2.mode=="mix"?{dropdown:{position:"text"}}:{}),a2=this.settings=p({},s2,i2);if(a2.disabled=t2.hasAttribute("disabled"),a2.readonly=a2.readonly||t2.hasAttribute("readonly"),a2.placeholder=h(t2.getAttribute("placeholder")||a2.placeholder||""),a2.required=t2.hasAttribute("required"),this.generateClassSelectors(a2.classNames),a2.dropdown.includeSelectedTags===void 0&&(a2.dropdown.includeSelectedTags=a2.duplicates),this.isIE&&(a2.autoComplete=!1),["whitelist","blacklist"].forEach(e2=>{var i3=t2.getAttribute("data-"+e2);i3&&(i3=i3.split(a2.delimiters))instanceof Array&&(a2[e2]=i3)}),"autoComplete"in i2&&!g(i2.autoComplete)&&(a2.autoComplete=x.autoComplete,a2.autoComplete.enabled=i2.autoComplete),a2.mode=="mix"&&(a2.pattern=a2.pattern||/@/,a2.autoComplete.rightKey=!0,a2.delimiters=i2.delimiters||null,a2.tagTextProp&&!a2.dropdown.searchKeys.includes(a2.tagTextProp)&&a2.dropdown.searchKeys.push(a2.tagTextProp)),t2.pattern)try{a2.pattern=new RegExp(t2.pattern)}catch{}if(a2.delimiters){a2._delimiters=a2.delimiters;try{a2.delimiters=new RegExp(this.settings.delimiters,"g")}catch{}}a2.disabled&&(a2.userInput=!1),this.TEXTS=e(e({},N),a2.texts||{}),(a2.mode!="select"||(_a=i2.dropdown)!=null&&_a.enabled)&&a2.userInput||(a2.dropdown.enabled=0),a2.dropdown.appendTarget=((_b=i2.dropdown)==null?void 0:_b.appendTarget)||document.body;let n2=this.getPersistedData("whitelist");Array.isArray(n2)&&(this.whitelist=Array.isArray(a2.whitelist)?c(a2.whitelist,n2):n2)},getAttributes(t2){var e2,i2=this.getCustomAttributes(t2),s2="";for(e2 in i2)s2+=" "+e2+(t2[e2]!==void 0?`="${i2[e2]}"`:"");return s2},getCustomAttributes(t2){if(!g(t2))return"";var e2,i2={};for(e2 in t2)e2.slice(0,2)!="__"&&e2!="class"&&t2.hasOwnProperty(e2)&&t2[e2]!==void 0&&(i2[e2]=h(t2[e2]));return i2},setStateSelection(){var t2=window.getSelection(),e2={anchorOffset:t2.anchorOffset,anchorNode:t2.anchorNode,range:t2.getRangeAt&&t2.rangeCount&&t2.getRangeAt(0)};return this.state.selection=e2,e2},getCSSVars(){var t2=getComputedStyle(this.DOM.scope,null),e2;this.CSSVars={tagHideTransition:(t3=>{let e3=t3.value;return t3.unit=="s"?1e3*e3:e3})(function(t3){if(!t3)return{};var e3=(t3=t3.trim().split(" ")[0]).split(/\d+/g).filter(t4=>t4).pop().trim();return{value:+t3.split(e3).filter(t4=>t4)[0].trim(),unit:e3}}((e2="tag-hide-transition",t2.getPropertyValue("--"+e2))))}},build(t2){var e2=this.DOM;this.settings.mixMode.integrated?(e2.originalInput=null,e2.scope=t2,e2.input=t2):(e2.originalInput=t2,e2.originalInput_tabIndex=t2.tabIndex,e2.scope=this.parseTemplate("wrapper",[t2,this.settings]),e2.input=e2.scope.querySelector(this.settings.classNames.inputSelector),t2.parentNode.insertBefore(e2.scope,t2),t2.tabIndex=-1)},destroy(){this.events.unbindGlobal.call(this),this.DOM.scope.parentNode.removeChild(this.DOM.scope),this.DOM.originalInput.tabIndex=this.DOM.originalInput_tabIndex,delete this.DOM.originalInput.__tagify,this.dropdown.hide(!0),clearTimeout(this.dropdownHide__bindEventsTimeout),clearInterval(this.listeners.main.originalInputValueObserverInterval)},loadOriginalValues(t2){var e2,i2=this.settings;if(this.state.blockChangeEvent=!0,t2===void 0){const e3=this.getPersistedData("value");t2=e3&&!this.DOM.originalInput.value?e3:i2.mixMode.integrated?this.DOM.input.textContent:this.DOM.originalInput.value}if(this.removeAllTags(),t2)if(i2.mode=="mix")this.parseMixTags(t2),(e2=this.DOM.input.lastChild)&&e2.tagName=="BR"||this.DOM.input.insertAdjacentHTML("beforeend","
");else{try{JSON.parse(t2)instanceof Array&&(t2=JSON.parse(t2))}catch{}this.addTags(t2,!0).forEach(t3=>t3&&t3.classList.add(i2.classNames.tagNoAnimation))}else this.postUpdate();this.state.lastOriginalValueReported=i2.mixMode.integrated?"":this.DOM.originalInput.value},cloneEvent(t2){var e2={};for(var i2 in t2)i2!="path"&&(e2[i2]=t2[i2]);return e2},loading(t2){return this.state.isLoading=t2,this.DOM.scope.classList[t2?"add":"remove"](this.settings.classNames.scopeLoading),this},tagLoading(t2,e2){return t2&&t2.classList[e2?"add":"remove"](this.settings.classNames.tagLoading),this},toggleClass(t2,e2){typeof t2=="string"&&this.DOM.scope.classList.toggle(t2,e2)},toggleScopeValidation(t2){var e2=t2===!0||t2===void 0;!this.settings.required&&t2&&t2===this.TEXTS.empty&&(e2=!0),this.toggleClass(this.settings.classNames.tagInvalid,!e2),this.DOM.scope.title=e2?"":t2},toggleFocusClass(t2){this.toggleClass(this.settings.classNames.focus,!!t2)},triggerChangeEvent:function(){if(!this.settings.mixMode.integrated){var t2=this.DOM.originalInput,e2=this.state.lastOriginalValueReported!==t2.value,i2=new CustomEvent("change",{bubbles:!0});e2&&(this.state.lastOriginalValueReported=t2.value,i2.simulated=!0,t2._valueTracker&&t2._valueTracker.setValue(Math.random()),t2.dispatchEvent(i2),this.trigger("change",this.state.lastOriginalValueReported),t2.value=this.state.lastOriginalValueReported)}},events:E,fixFirefoxLastTagNoCaret(){},setRangeAtStartEnd(t2,e2){if(e2){t2=typeof t2=="number"?t2:!!t2,e2=e2.lastChild||e2;var i2=document.getSelection();if(i2.focusNode instanceof Element&&!this.DOM.input.contains(i2.focusNode))return!0;try{i2.rangeCount>=1&&["Start","End"].forEach(s2=>i2.getRangeAt(0)["set"+s2](e2,t2||e2.length))}catch{}}},insertAfterTag(t2,e2){if(e2=e2||this.settings.mixMode.insertAfterTag,t2&&t2.parentNode&&e2)return e2=typeof e2=="string"?document.createTextNode(e2):e2,t2.parentNode.insertBefore(e2,t2.nextSibling),e2},editTagChangeDetected(t2){var e2=t2.__originalData;for(var i2 in e2)if(!this.dataProps.includes(i2)&&t2[i2]!=e2[i2])return!0;return!1},getTagTextNode(t2){return t2.querySelector(this.settings.classNames.tagTextSelector)},setTagTextNode(t2,e2){this.getTagTextNode(t2).innerHTML=h(e2)},editTag(t2,e2){t2=t2||this.getLastTag(),e2=e2||{},this.dropdown.hide();var i2=this.settings,s2=this.getTagTextNode(t2),a2=this.getNodeIndex(t2),n2=w(t2),o2=this.events.callbacks,r2=this,l2=!0;if(s2){if(!(n2 instanceof Object&&"editable"in n2)||n2.editable)return n2=w(t2,{__originalData:p({},n2),__originalHTML:t2.cloneNode(!0)}),w(n2.__originalHTML,n2.__originalData),s2.setAttribute("contenteditable",!0),t2.classList.add(i2.classNames.tagEditing),s2.addEventListener("focus",o2.onEditTagFocus.bind(this,t2)),s2.addEventListener("blur",function(){setTimeout(()=>o2.onEditTagBlur.call(r2,r2.getTagTextNode(t2)))}),s2.addEventListener("input",o2.onEditTagInput.bind(this,s2)),s2.addEventListener("paste",o2.onEditTagPaste.bind(this,s2)),s2.addEventListener("keydown",e3=>o2.onEditTagkeydown.call(this,e3,t2)),s2.addEventListener("compositionstart",o2.onCompositionStart.bind(this)),s2.addEventListener("compositionend",o2.onCompositionEnd.bind(this)),e2.skipValidation||(l2=this.editTagToggleValidity(t2)),s2.originalIsValid=l2,this.trigger("edit:start",{tag:t2,index:a2,data:n2,isValid:l2}),s2.focus(),this.setRangeAtStartEnd(!1,s2),this}else console.warn("Cannot find element in Tag template: .",i2.classNames.tagTextSelector)},editTagToggleValidity(t2,e2){var i2;if(e2=e2||w(t2))return(i2=!("__isValid"in e2)||e2.__isValid===!0)||this.removeTagsFromValue(t2),this.update(),t2.classList.toggle(this.settings.classNames.tagNotAllowed,!i2),e2.__isValid=i2,e2.__isValid;console.warn("tag has no data: ",t2,e2)},onEditTagDone(t2,e2){e2=e2||{};var i2={tag:t2=t2||this.state.editing.scope,index:this.getNodeIndex(t2),previousData:w(t2),data:e2};this.trigger("edit:beforeUpdate",i2,{cloneData:!1}),this.state.editing=!1,delete e2.__originalData,delete e2.__originalHTML,t2&&e2[this.settings.tagTextProp]?(t2=this.replaceTag(t2,e2),this.editTagToggleValidity(t2,e2),this.settings.a11y.focusableTags?t2.focus():b(t2)):t2&&this.removeTags(t2),this.trigger("edit:updated",i2),this.dropdown.hide(),this.settings.keepInvalidTags&&this.reCheckInvalidTags()},replaceTag(t2,e2){e2&&e2.value||(e2=t2.__tagifyTagData),e2.__isValid&&e2.__isValid!=1&&p(e2,this.getInvalidTagAttrs(e2,e2.__isValid));var i2=this.createTagElem(e2);return t2.parentNode.replaceChild(i2,t2),this.updateValueByDOMTags(),i2},updateValueByDOMTags(){this.value.length=0,[].forEach.call(this.getTagElms(),t2=>{t2.classList.contains(this.settings.classNames.tagNotAllowed.split(" ")[0])||this.value.push(w(t2))}),this.update()},injectAtCaret(t2,e2){var _a;return!(e2=e2||((_a=this.state.selection)==null?void 0:_a.range))&&t2?(this.appendMixTags(t2),this):(T(t2,e2),this.setRangeAtStartEnd(!1,t2),this.updateValueByDOMTags(),this.update(),this)},input:{set(){let t2=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e2=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];var i2=this.settings.dropdown.closeOnSelect;this.state.inputText=t2,e2&&(this.DOM.input.innerHTML=h(""+t2)),!t2&&i2&&this.dropdown.hide.bind(this),this.input.autocomplete.suggest.call(this),this.input.validate.call(this)},raw(){return this.DOM.input.textContent},validate(){var t2=!this.state.inputText||this.validateTag({value:this.state.inputText})===!0;return this.DOM.input.classList.toggle(this.settings.classNames.inputInvalid,!t2),t2},normalize(t2){var e2=t2||this.DOM.input,i2=[];e2.childNodes.forEach(t3=>t3.nodeType==3&&i2.push(t3.nodeValue)),i2=i2.join(`
`);try{i2=i2.replace(/(?:\r\n|\r|\n)/g,this.settings.delimiters.source.charAt(0))}catch{}return i2=i2.replace(/\s/g," "),this.trim(i2)},autocomplete:{suggest(t2){if(this.settings.autoComplete.enabled){typeof(t2=t2||{value:""})=="string"&&(t2={value:t2});var e2=this.dropdown.getMappedValue(t2);if(typeof e2!="number"){var i2=e2.substr(0,this.state.inputText.length).toLowerCase(),s2=e2.substring(this.state.inputText.length);e2&&this.state.inputText&&i2==this.state.inputText.toLowerCase()?(this.DOM.input.setAttribute("data-suggest",s2),this.state.inputSuggestion=t2):(this.DOM.input.removeAttribute("data-suggest"),delete this.state.inputSuggestion)}}},set(t2){var e2=this.DOM.input.getAttribute("data-suggest"),i2=t2||(e2?this.state.inputText+e2:null);return!!i2&&(this.settings.mode=="mix"?this.replaceTextWithNode(document.createTextNode(this.state.tag.prefix+i2)):(this.input.set.call(this,i2),this.setRangeAtStartEnd(!1,this.DOM.input)),this.input.autocomplete.suggest.call(this),this.dropdown.hide(),!0)}}},getTagIdx(t2){return this.value.findIndex(e2=>e2.__tagId==(t2||{}).__tagId)},getNodeIndex(t2){var e2=0;if(t2)for(;t2=t2.previousElementSibling;)e2++;return e2},getTagElms(){for(var t2=arguments.length,e2=new Array(t2),i2=0;i2{s2.__tagifyTagData&&a(this.trim(s2.__tagifyTagData.value),t2,i2)&&e2.push(n2)}),e2},getTagElmByValue(t2){var e2=this.getTagIndexByValue(t2)[0];return this.getTagElms()[e2]},flashTag(t2){t2&&(t2.classList.add(this.settings.classNames.tagFlash),setTimeout(()=>{t2.classList.remove(this.settings.classNames.tagFlash)},100))},isTagBlacklisted(t2){return t2=this.trim(t2.toLowerCase()),this.settings.blacklist.filter(e2=>(""+e2).toLowerCase()==t2).length},isTagWhitelisted(t2){return!!this.getWhitelistItem(t2)},getWhitelistItem(t2,e2,i2){e2=e2||"value";var s2,n2=this.settings;return(i2=i2||n2.whitelist).some(i3=>{var o2=typeof i3=="string"?i3:i3[e2]||i3.value;if(a(o2,t2,n2.dropdown.caseSensitive,n2.trim))return s2=typeof i3=="string"?{value:i3}:i3,!0}),s2||e2!="value"||n2.tagTextProp=="value"||(s2=this.getWhitelistItem(t2,n2.tagTextProp,i2)),s2},validateTag(t2){var e2=this.settings,i2="value"in t2?"value":e2.tagTextProp,s2=this.trim(t2[i2]+"");return(t2[i2]+"").trim()?e2.mode!="mix"&&e2.pattern&&e2.pattern instanceof RegExp&&!e2.pattern.test(s2)?this.TEXTS.pattern:!e2.duplicates&&this.isTagDuplicate(s2,e2.dropdown.caseSensitive,t2.__tagId)?this.TEXTS.duplicate:this.isTagBlacklisted(s2)||e2.enforceWhitelist&&!this.isTagWhitelisted(s2)?this.TEXTS.notAllowed:!e2.validate||e2.validate(t2):this.TEXTS.empty},getInvalidTagAttrs(t2,e2){return{"aria-invalid":!0,class:`${t2.class||""} ${this.settings.classNames.tagNotAllowed}`.trim(),title:e2}},hasMaxTags(){return this.value.length>=this.settings.maxTags&&this.TEXTS.exceed},setReadonly(t2,e2){var i2=this.settings;document.activeElement.blur(),i2[e2||"readonly"]=t2,this.DOM.scope[(t2?"set":"remove")+"Attribute"](e2||"readonly",!0),this.settings.userInput=!0,this.setContentEditable(!t2)},setContentEditable(t2){this.settings.userInput&&(this.DOM.input.contentEditable=t2,this.DOM.input.tabIndex=t2?0:-1)},setDisabled(t2){this.setReadonly(t2,"disabled")},normalizeTags(t2){var e2=this.settings,i2=e2.whitelist,s2=e2.delimiters,a2=e2.mode,n2=e2.tagTextProp,o2=[],r2=!!i2&&i2[0]instanceof Object,l2=Array.isArray(t2),d2=l2&&t2[0].value,h2=t3=>(t3+"").split(s2).filter(t4=>t4).map(t4=>({[n2]:this.trim(t4),value:this.trim(t4)}));if(typeof t2=="number"&&(t2=t2.toString()),typeof t2=="string"){if(!t2.trim())return[];t2=h2(t2)}else l2&&(t2=[].concat(...t2.map(t3=>t3.value!=null?t3:h2(t3))));return r2&&!d2&&(t2.forEach(t3=>{var e3=o2.map(t4=>t4.value),i3=this.dropdown.filterListItems.call(this,t3[n2],{exact:!0});this.settings.duplicates||(i3=i3.filter(t4=>!e3.includes(t4.value)));var s3=i3.length>1?this.getWhitelistItem(t3[n2],n2,i3):i3[0];s3&&s3 instanceof Object?o2.push(s3):a2!="mix"&&(t3.value==null&&(t3.value=t3[n2]),o2.push(t3))}),o2.length&&(t2=o2)),t2},parseMixTags(t2){var e2=this.settings,i2=e2.mixTagsInterpolator,s2=e2.duplicates,a2=e2.transformTag,n2=e2.enforceWhitelist,o2=e2.maxTags,r2=e2.tagTextProp,l2=[];t2=t2.split(i2[0]).map((t3,e3)=>{var d3,h2,g2,p2=t3.split(i2[1]),c2=p2[0],u2=l2.length==o2;try{if(c2==+c2)throw Error;h2=JSON.parse(c2)}catch{h2=this.normalizeTags(c2)[0]||{value:c2}}if(a2.call(this,h2),u2||!(p2.length>1)||n2&&!this.isTagWhitelisted(h2.value)||!s2&&this.isTagDuplicate(h2.value)){if(t3)return e3?i2[0]+t3:t3}else h2[d3=h2[r2]?r2:"value"]=this.trim(h2[d3]),g2=this.createTagElem(h2),l2.push(h2),g2.classList.add(this.settings.classNames.tagNoAnimation),p2[0]=g2.outerHTML,this.value.push(h2);return p2.join("")}).join(""),this.DOM.input.innerHTML=t2,this.DOM.input.appendChild(document.createTextNode("")),this.DOM.input.normalize();var d2=this.getTagElms();return d2.forEach((t3,e3)=>w(t3,l2[e3])),this.update({withoutChangeEvent:!0}),y(d2,this.state.hasFocus),t2},replaceTextWithNode(t2,e2){if(this.state.tag||e2){e2=e2||this.state.tag.prefix+this.state.tag.value;var i2,s2,a2=this.state.selection||window.getSelection(),n2=a2.anchorNode,o2=this.state.tag.delimiters?this.state.tag.delimiters.length:0;return n2.splitText(a2.anchorOffset-o2),(i2=n2.nodeValue.lastIndexOf(e2))==-1||(s2=n2.splitText(i2),t2&&n2.parentNode.replaceChild(t2,s2)),!0}},selectTag(t2,e2){var i2=this.settings;if(!i2.enforceWhitelist||this.isTagWhitelisted(e2.value)){this.input.set.call(this,e2[i2.tagTextProp]||e2.value,!0),this.state.actions.selectOption&&setTimeout(()=>this.setRangeAtStartEnd(!1,this.DOM.input));var s2=this.getLastTag();return s2?this.replaceTag(s2,e2):this.appendTag(t2),this.value[0]=e2,this.update(),this.trigger("add",{tag:t2,data:e2}),[t2]}},addEmptyTag(t2){var e2=p({value:""},t2||{}),i2=this.createTagElem(e2);w(i2,e2),this.appendTag(i2),this.editTag(i2,{skipValidation:!0})},addTags(t2,e2,i2){var s2=[],a2=this.settings,n2=[],o2=document.createDocumentFragment();if(i2=i2||a2.skipInvalid,!t2||t2.length==0)return s2;switch(t2=this.normalizeTags(t2),a2.mode){case"mix":return this.addMixTags(t2);case"select":e2=!1,this.removeAllTags()}return this.DOM.input.removeAttribute("style"),t2.forEach(t3=>{var e3,r2={},l2=Object.assign({},t3,{value:t3.value+""});if(t3=Object.assign({},l2),a2.transformTag.call(this,t3),t3.__isValid=this.hasMaxTags()||this.validateTag(t3),t3.__isValid!==!0){if(i2)return;if(p(r2,this.getInvalidTagAttrs(t3,t3.__isValid),{__preInvalidData:l2}),t3.__isValid==this.TEXTS.duplicate&&this.flashTag(this.getTagElmByValue(t3.value)),!a2.createInvalidTags)return void n2.push(t3.value)}if("readonly"in t3&&(t3.readonly?r2["aria-readonly"]=!0:delete t3.readonly),e3=this.createTagElem(t3,r2),s2.push(e3),a2.mode=="select")return this.selectTag(e3,t3);o2.appendChild(e3),t3.__isValid&&t3.__isValid===!0?(this.value.push(t3),this.trigger("add",{tag:e3,index:this.value.length-1,data:t3})):(this.trigger("invalid",{data:t3,index:this.value.length,tag:e3,message:t3.__isValid}),a2.keepInvalidTags||setTimeout(()=>this.removeTags(e3,!0),1e3)),this.dropdown.position()}),this.appendTag(o2),this.update(),t2.length&&e2&&(this.input.set.call(this,a2.createInvalidTags?"":n2.join(a2._delimiters)),this.setRangeAtStartEnd(!1,this.DOM.input)),a2.dropdown.enabled&&this.dropdown.refilter(),s2},addMixTags(t2){if((t2=this.normalizeTags(t2))[0].prefix||this.state.tag)return this.prefixedTextToTag(t2[0]);var e2=document.createDocumentFragment();return t2.forEach(t3=>{var i2=this.createTagElem(t3);e2.appendChild(i2)}),this.appendMixTags(e2),e2},appendMixTags(t2){var e2=!!this.state.selection;e2?this.injectAtCaret(t2):(this.DOM.input.focus(),(e2=this.setStateSelection()).range.setStart(this.DOM.input,e2.range.endOffset),e2.range.setEnd(this.DOM.input,e2.range.endOffset),this.DOM.input.appendChild(t2),this.updateValueByDOMTags(),this.update())},prefixedTextToTag(t2){var e2,i2=this.settings,s2=this.state.tag.delimiters;if(i2.transformTag.call(this,t2),t2.prefix=t2.prefix||this.state.tag?this.state.tag.prefix:(i2.pattern.source||i2.pattern)[0],e2=this.createTagElem(t2),this.replaceTextWithNode(e2)||this.DOM.input.appendChild(e2),setTimeout(()=>e2.classList.add(this.settings.classNames.tagNoAnimation),300),this.value.push(t2),this.update(),!s2){var a2=this.insertAfterTag(e2)||e2;setTimeout(b,0,a2)}return this.state.tag=null,this.trigger("add",p({},{tag:e2},{data:t2})),e2},appendTag(t2){var e2=this.DOM,i2=e2.input;e2.scope.insertBefore(t2,i2)},createTagElem(t2,i2){t2.__tagId=v();var s2,a2=p({},t2,e({value:h(t2.value+"")},i2));return function(t3){for(var e2,i3=document.createNodeIterator(t3,NodeFilter.SHOW_TEXT,null,!1);e2=i3.nextNode();)e2.textContent.trim()||e2.parentNode.removeChild(e2)}(s2=this.parseTemplate("tag",[a2,this])),w(s2,t2),s2},reCheckInvalidTags(){var t2=this.settings;this.getTagElms(t2.classNames.tagNotAllowed).forEach((e2,i2)=>{var s2=w(e2),a2=this.hasMaxTags(),n2=this.validateTag(s2),o2=n2===!0&&!a2;if(t2.mode=="select"&&this.toggleScopeValidation(n2),o2)return s2=s2.__preInvalidData?s2.__preInvalidData:{value:s2.value},this.replaceTag(e2,s2);e2.title=a2||n2})},removeTags(t2,e2,i2){var s2,a2=this.settings;if(t2=t2&&t2 instanceof HTMLElement?[t2]:t2 instanceof Array?t2:t2?[t2]:[this.getLastTag()],s2=t2.reduce((t3,e3)=>{e3&&typeof e3=="string"&&(e3=this.getTagElmByValue(e3));var i3=w(e3);return e3&&i3&&!i3.readonly&&t3.push({node:e3,idx:this.getTagIdx(i3),data:w(e3,{__removed:!0})}),t3},[]),i2=typeof i2=="number"?i2:this.CSSVars.tagHideTransition,a2.mode=="select"&&(i2=0,this.input.set.call(this)),s2.length==1&&a2.mode!="select"&&s2[0].node.classList.contains(a2.classNames.tagNotAllowed)&&(e2=!0),s2.length)return a2.hooks.beforeRemoveTag(s2,{tagify:this}).then(()=>{function t3(t4){t4.node.parentNode&&(t4.node.parentNode.removeChild(t4.node),e2?a2.keepInvalidTags&&this.trigger("remove",{tag:t4.node,index:t4.idx}):(this.trigger("remove",{tag:t4.node,index:t4.idx,data:t4.data}),this.dropdown.refilter(),this.dropdown.position(),this.DOM.input.normalize(),a2.keepInvalidTags&&this.reCheckInvalidTags()))}i2&&i2>10&&s2.length==1?(function(e3){e3.node.style.width=parseFloat(window.getComputedStyle(e3.node).width)+"px",document.body.clientTop,e3.node.classList.add(a2.classNames.tagHide),setTimeout(t3.bind(this),i2,e3)}).call(this,s2[0]):s2.forEach(t3.bind(this)),e2||(this.removeTagsFromValue(s2.map(t4=>t4.node)),this.update(),a2.mode=="select"&&this.setContentEditable(!0))}).catch(t3=>{})},removeTagsFromDOM(){[].slice.call(this.getTagElms()).forEach(t2=>t2.parentNode.removeChild(t2))},removeTagsFromValue(t2){(t2=Array.isArray(t2)?t2:[t2]).forEach(t3=>{var e2=w(t3),i2=this.getTagIdx(e2);i2>-1&&this.value.splice(i2,1)})},removeAllTags(t2){t2=t2||{},this.value=[],this.settings.mode=="mix"?this.DOM.input.innerHTML="":this.removeTagsFromDOM(),this.dropdown.refilter(),this.dropdown.position(),this.state.dropdown.visible&&setTimeout(()=>{this.DOM.input.focus()}),this.settings.mode=="select"&&(this.input.set.call(this),this.setContentEditable(!0)),this.update(t2)},postUpdate(){var _a,_b;this.state.blockChangeEvent=!1;var t2=this.settings,e2=t2.classNames,i2=t2.mode=="mix"?t2.mixMode.integrated?this.DOM.input.textContent:this.DOM.originalInput.value.trim():this.value.length+this.input.raw.call(this).length;this.toggleClass(e2.hasMaxTags,this.value.length>=t2.maxTags),this.toggleClass(e2.hasNoTags,!this.value.length),this.toggleClass(e2.empty,!i2),t2.mode=="select"&&this.toggleScopeValidation((_b=(_a=this.value)==null?void 0:_a[0])==null?void 0:_b.__isValid)},setOriginalInputValue(t2){var e2=this.DOM.originalInput;this.settings.mixMode.integrated||(e2.value=t2,e2.tagifyValue=e2.value,this.setPersistedData(t2,"value"))},update(t2){clearTimeout(this.debouncedUpdateTimeout),this.debouncedUpdateTimeout=setTimeout((function(){var e2=this.getInputValue();this.setOriginalInputValue(e2),this.settings.onChangeAfterBlur&&(t2||{}).withoutChangeEvent||this.state.blockChangeEvent||this.triggerChangeEvent(),this.postUpdate()}).bind(this),100)},getInputValue(){var t2=this.getCleanValue();return this.settings.mode=="mix"?this.getMixedTagsAsString(t2):t2.length?this.settings.originalInputValueFormat?this.settings.originalInputValueFormat(t2):JSON.stringify(t2):""},getCleanValue(t2){return n(t2||this.value,this.dataProps)},getMixedTagsAsString(){var t2="",e2=this,i2=this.settings,s2=i2.originalInputValueFormat||JSON.stringify,a2=i2.mixTagsInterpolator;return function i3(n2){n2.childNodes.forEach(n3=>{if(n3.nodeType==1){const r2=w(n3);if(n3.tagName=="BR"&&(t2+=`\r
`),r2&&f.call(e2,n3)){if(r2.__removed)return;t2+=a2[0]+s2(o(r2,e2.dataProps))+a2[1]}else n3.getAttribute("style")||["B","I","U"].includes(n3.tagName)?t2+=n3.textContent:n3.tagName!="DIV"&&n3.tagName!="P"||(t2+=`\r
-`,i3(n3))}else t2+=n3.textContent})}(this.DOM.input),t2}},_.prototype.removeTag=_.prototype.removeTags,_})})(tagify_min);var tagify_minExports=tagify_min.exports;const Tagify=getDefaultExportFromCjs(tagify_minExports);class TagsElement{constructor(id,...tags){this.element=document.getElementById(id),this.tags=tags,new Tagify(this.element,{whitelist:this.tags,originalInputValueFormat:value=>value.map(item=>item.value).join(", ").trim()})}}export{TagsElement as default};
+`,i3(n3))}else t2+=n3.textContent})}(this.DOM.input),t2}},_.prototype.removeTag=_.prototype.removeTags,_})})(tagify_min);var tagify_minExports=tagify_min.exports;const Tagify=getDefaultExportFromCjs(tagify_minExports);class TagsElement{constructor(id,...tags){if(!id||typeof id!="string"||id.trim()===""){console.error("TagsElement: Invalid or empty ID provided:",id);return}if(this.element=document.getElementById(id),this.tags=tags,!this.element){console.error('TagsElement: Element with ID "'+id+'" not found in DOM');return}new Tagify(this.element,{whitelist:this.tags,originalInputValueFormat:value=>value.map(item=>item.value).join(", ").trim()})}}export{TagsElement as default};
diff --git a/composer.json b/composer.json
index 0da0e9f..36bccdc 100644
--- a/composer.json
+++ b/composer.json
@@ -20,7 +20,7 @@
"ext-pdo": "*",
"php": "^8.0 | ^8.1",
"symfony/property-access": "*",
- "typo3/cms-core": "^12.4.0"
+ "typo3/cms-core": "^13.4"
},
"autoload": {
"psr-4": {
diff --git a/ext_emconf.php b/ext_emconf.php
index 0d0a3c1..6060ce1 100644
--- a/ext_emconf.php
+++ b/ext_emconf.php
@@ -12,7 +12,7 @@
'version' => '1.3.1',
'constraints' => [
'depends' => [
- 'typo3' => '12.4.0-12.4.99'
+ 'typo3' => '13.4.0-13.4.99'
],
'suggests' => [
'pagebased_blog' => ''