Skip to content

Commit 0c47c8f

Browse files
author
Michael Yu
committed
MAGETWO-91307: Clean up typescript errors
- Resolved tslint failures
1 parent fc8e93c commit 0c47c8f

File tree

6 files changed

+20
-8
lines changed

6 files changed

+20
-8
lines changed

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

Lines changed: 2 additions & 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-factory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import _ from "underscore";
99
import ConfigFieldInterface from "./config-field.d";
1010
import ContentTypeConfigInterface from "./content-type-config.d";
1111
import ContentTypeInterface from "./content-type.d";
12-
import masterFactory from "./content-type/master-factory";
1312
import ContentTypeMountEventParamsInterface from "./content-type/content-type-mount-event-params.d";
13+
import masterFactory from "./content-type/master-factory";
1414
import previewFactory from "./content-type/preview-factory";
1515
import FieldDefaultsInterface from "./field-defaults.d";
1616

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
import ko from "knockout";
77
import mageUtils from "mageUtils";
88
import events from "uiEvents";
9-
import Master from "./content-type/master";
109
import ContentTypeConfigInterface from "./content-type-config.d";
1110
import ContentTypeInterface from "./content-type.d";
12-
import DataStore from "./data-store";
11+
import Master from "./content-type/master";
1312
import Preview from "./content-type/preview";
13+
import DataStore from "./data-store";
1414

1515
export default class ContentType implements ContentTypeInterface {
1616
public id: string = mageUtils.uniqueid();

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/content-type/column-group/preview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import ko from "knockout";
88
import events from "uiEvents";
99
import _ from "underscore";
1010
import Config from "../../config";
11+
import ColumnGroup from "../../content-type-collection";
1112
import ContentTypeConfigInterface from "../../content-type-config.d";
1213
import ContentTypeInterface from "../../content-type.d";
13-
import ColumnGroup from "../../content-type-collection";
1414
import {ContentType as GroupContentType} from "../../panel/group/content-type";
1515
import {moveArrayItem} from "../../utils/array";
1616
import {default as ColumnGroupPreview} from "../column-group/preview";

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/content-type/slider/preview.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ export default class Preview extends PreviewCollection {
116116
this.setActiveSlide(args.newPosition);
117117
}
118118
});
119-
// When a slide content type is removed we need to force update the content of the slider due to KO rendering issues
119+
// When a slide content type is removed
120+
// we need to force update the content of the slider due to KO rendering issues
120121
events.on("slide:contentType:removed", (args: ContentTypeRemovedEventParamsInterface) => {
121122
if (args.contentType.parent.id === this.parent.id) {
122123
this.forceContainerHeight();

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/stage.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,18 @@ export default class Stage {
221221
return createContentType(params.contentType.config, params.parent, params.stageId)
222222
.then((contentType: ContentTypeInterface) => {
223223
params.parent.addChild(contentType, index);
224-
events.trigger("contentType:dropped:create", {id: contentType.id, contentType});
225-
events.trigger(params.contentType.config.name + ":contentType:dropped:create", {id: contentType.id, contentType});
224+
events.trigger("contentType:dropped:create",
225+
{
226+
id: contentType.id,
227+
contentType,
228+
},
229+
);
230+
events.trigger(params.contentType.config.name + ":contentType:dropped:create",
231+
{
232+
id: contentType.id,
233+
contentType,
234+
},
235+
);
226236
return contentType;
227237
});
228238
} else {

0 commit comments

Comments
 (0)