Skip to content

Commit

Permalink
Update: Replace build stack, write editor as a function
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnitto committed Oct 9, 2024
1 parent b992f74 commit 6dd3ffc
Show file tree
Hide file tree
Showing 21 changed files with 2,392 additions and 9,905 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
20
2 changes: 1 addition & 1 deletion Configuration/Settings.Neos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ Neos:
resources:
javascript:
Garagist.Mautic:EmailModuleEditor:
resource: resource://Garagist.Mautic/Public/EmailModuleEditor/Plugin.js
resource: resource://Garagist.Mautic/Public/Editor/Plugin.js
1 change: 0 additions & 1 deletion Resources/Private/Editor/.nvmrc

This file was deleted.

39 changes: 39 additions & 0 deletions Resources/Private/Editor/EmailModuleEditor.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from "react";
import { Button, Icon, Label } from "@neos-project/react-ui-components";
import I18n from "@neos-project/neos-ui-i18n";

function EmailModuleEditor(props) {
const { label, className, identifier, options, renderHelpIcon, renderSecondaryInspector } = props;
const { src, icon, name, disabled} = options;

return (
<div style={{display:"flex"}}>
<Label htmlFor={identifier}>
<Button
className={className}
disabled={disabled}
onClick={() => {
renderSecondaryInspector("IFRAME", () => (
<iframe
style={{ height: "100%", width: "100%", border: 0 }}
name={name || "email-module"}
src={
src.startsWith("ClientEval:")
? (0, eval)(src.replace("ClientEval:", ""))
: src
}
/>
))
}}
style="lighter"
>
{icon && <Icon icon={icon} padded="right" />}
<I18n id={label} />
</Button>
</Label>
{renderHelpIcon && renderHelpIcon()}
</div>
);
}

export default EmailModuleEditor;
File renamed without changes.
16 changes: 0 additions & 16 deletions Resources/Private/Editor/package.json

This file was deleted.

53 changes: 0 additions & 53 deletions Resources/Private/Editor/src/EmailModuleEditor/index.js

This file was deleted.

1 change: 0 additions & 1 deletion Resources/Private/Editor/src/index.js

This file was deleted.

Loading

0 comments on commit 6dd3ffc

Please sign in to comment.