Skip to content

Commit e113f67

Browse files
committed
MC-3305: Architectural Review for MC-1416
1 parent c8f44c5 commit e113f67

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/wysiwyg-factory.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/wysiwyg.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/content-type/wysiwyg-factory.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
* See COPYING.txt for license details.
44
*/
55

6-
import WysiwygSetup from "mage/adminhtml/wysiwyg/tiny_mce/setup";
7-
import WysiwygInstance from "wysiwygAdapter";
6+
import WysiwygSetupInterface from "mage/adminhtml/wysiwyg/tiny_mce/setup";
7+
import WysiwygInstanceInterface from "wysiwygAdapter";
88
import {AdditionalDataConfigInterface} from "../content-type-config";
99

1010
/**
1111
* Create new wysiwyg adapter instance
1212
* @param {string} elementId
1313
* @param {AdditionalDataConfigInterface} config
14-
* @returns {WysiwygInstance}
14+
* @returns {WysiwygInstanceInterface}
1515
* @api
1616
*/
1717
export default function create(
1818
elementId: string,
1919
config: AdditionalDataConfigInterface,
20-
): WysiwygInstance {
21-
const wysiwygSetup = new WysiwygSetup(elementId, config.adapter);
20+
): WysiwygInstanceInterface {
21+
const wysiwygSetup = new WysiwygSetupInterface(elementId, config.adapter);
2222

2323
if (config.additional.mode) {
2424
wysiwygSetup.setup(config.additional.mode);

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/types/wysiwyg.d.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,37 @@
33
* See COPYING.txt for license details.
44
*/
55

6-
interface EventBus {
6+
interface EventBusInterface {
77
attachEventHandler(eventName: string, handler: () => any): void;
88
}
99

10-
interface WysiwygSetup {
11-
eventBus: EventBus,
10+
interface WysiwygSetupInterface {
11+
eventBus: EventBusInterface,
1212
setup(mode: string): void,
13-
wysiwygInstance: WysiwygInstance
13+
wysiwygInstance: WysiwygInstanceInterface
1414
}
1515

16-
interface WysiwygInstance {
17-
eventBus: EventBus,
16+
interface WysiwygInstanceInterface {
17+
eventBus: EventBusInterface,
1818
EVENT: any,
1919
getContent(): string,
2020
setContent(content: string): void
2121
}
2222

23-
declare var WysiwygSetup: {
24-
prototype: WysiwygSetup;
25-
new (id: string, config: object): WysiwygSetup;
23+
declare var WysiwygSetupInterface: {
24+
prototype: WysiwygSetupInterface;
25+
new (id: string, config: object): WysiwygSetupInterface;
2626
};
2727

2828
declare var WysiwygInstance: {
29-
prototype: WysiwygInstance;
30-
new (id: string, config: object): WysiwygInstance
29+
prototype: WysiwygInstanceInterface;
30+
new (id: string, config: object): WysiwygInstanceInterface
3131
};
3232

3333
declare module "mage/adminhtml/wysiwyg/tiny_mce/setup" {
34-
export = WysiwygSetup;
34+
export = WysiwygSetupInterface;
3535
}
3636

3737
declare module "wysiwygAdapter" {
38-
export = WysiwygInstance;
38+
export = WysiwygInstanceInterface;
3939
}

app/code/Magento/PageBuilder/view/base/layout/default.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<body>
1010
<referenceContainer name="after.body.start">
1111
<block class="Magento\PageBuilder\Block\GoogleMapsApi" name="google.maps.api" template="Magento_PageBuilder::googlemaps.phtml" />
12-
<block class="Magento\PageBuilder\Block\WysiwygSetup" name="wysiwyg" template="Magento_PageBuilder::wysiwyg_setup.phtml" />
12+
<block class="Magento\PageBuilder\Block\WysiwygSetup" name="wysiwyg.setup" template="Magento_PageBuilder::wysiwyg_setup.phtml" />
1313
</referenceContainer>
1414
</body>
1515
</page>

0 commit comments

Comments
 (0)