Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] compatibility 12 (& 13) #769

Draft
wants to merge 14 commits into
base: typo3-12-reactjs
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Build/Sources/components/ReactFlow/CustomModelNode.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,8 @@ export const CustomModelNode = (props) => {
identifier="propertyName"
initialValue={property.name}
onChange={(value) => {
updateProperty(index, "name", value.toLowerCase());
value = value.replace(/(^|_)./g, s => s.slice(-1).toUpperCase());
updateProperty(index, "name", value.charAt(0).toLowerCase() + value.slice(1));
}}
/>
<SelectComponent
Expand Down Expand Up @@ -811,7 +812,8 @@ export const CustomModelNode = (props) => {
initialValue={relation.relationName}
identifier="relationName"
onChange={(value) => {
updateRelation(index, "relationName", value);
value = value.replace(/(^|_)./g, s => s.slice(-1).toUpperCase());
updateProperty(index, "name", value.charAt(0).toLowerCase() + value.slice(1));
}}
/>
<SelectComponent
Expand Down
18 changes: 6 additions & 12 deletions Classes/Controller/BuilderModuleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,7 @@ public function indexAction(): ResponseInterface
return new ForwardResponse('domainmodelling');
}
}

$this->moduleTemplate->setContent($this->view->render());

return new HtmlResponse($this->moduleTemplate->renderContent());
return $this->moduleTemplate->renderResponse();
}

public function domainmodellingAction(): ResponseInterface
Expand Down Expand Up @@ -172,9 +169,7 @@ public function domainmodellingAction(): ResponseInterface
);
$this->getBackendUserAuthentication()->pushModuleData('extensionbuilder', ['firstTime' => 0]);

$this->moduleTemplate->setContent($this->view->render());

return $this->htmlResponse($this->moduleTemplate->renderContent());
return $this->moduleTemplate->renderResponse();
}

/**
Expand Down Expand Up @@ -210,9 +205,7 @@ public function helpAction() {
);
$this->getBackendUserAuthentication()->pushModuleData('extensionbuilder', ['firstTime' => 0]);

$this->moduleTemplate->setContent($this->view->render());

return $this->htmlResponse($this->moduleTemplate->renderContent());
return $this->moduleTemplate->renderResponse();
}


Expand Down Expand Up @@ -527,14 +520,15 @@ protected function rpcActionSave(): array
}

/**
* Shows a list with available extensions (if they have an ExtensionBuilder.json
* file).
* Shows a list with locally available extensions for editing
* (if they have a file `ExtensionBuilder.json`).
*
* @return array
*/
protected function rpcActionList(): array
{
$extensions = $this->extensionRepository->findAll();
sort($extensions);
return [
'success' => true,
'result' => $extensions,
Expand Down
2 changes: 1 addition & 1 deletion Classes/Utility/SpycYAMLParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ private static function greedilyNeedNextLine($line): bool
private function addLiteralLine($literalBlock, $line, $literalBlockStyle): string
{
$line = self::stripIndent($line);
$line = rtrim($line, CRLF . TAB) . PHP_EOL;
$line = rtrim($line, CRLF . "\t") . PHP_EOL;
if ($literalBlockStyle == '|') {
return $literalBlock . $line;
}
Expand Down
Loading
Loading