Skip to content

Commit e1ffefc

Browse files
committed
MC-3095: Display TypeScript errors within local build process
- Revert accidental change to suite.xml - Resolve further TypeScript errors - Add types for appearances config
1 parent 7647de0 commit e1ffefc

18 files changed

+158
-47
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Suite/suite.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<suite name="PageBuilderWithWYSIWYG">
1010
<before>
1111
<createData stepKey="enablePageBuilderAndWYSIWYG" entity="enablePageBuilderAndWYSIWYGForm"/>
12-
<!--<magentoCLI command="config:set cms/pagebuilder/google_maps_api_key AIzaSyCw10cOO31cpxb2bcwnHPHKtxov8oUbxJw" stepKey="setGoogleMapsAPIKey"/>-->
12+
<magentoCLI command="config:set cms/pagebuilder/google_maps_api_key AIzaSyCw10cOO31cpxb2bcwnHPHKtxov8oUbxJw" stepKey="setGoogleMapsAPIKey"/>
1313
</before>
1414
<after>
1515
<createData stepKey="DisabledWYSIWYG" entity="disableWYSYWYGForm"/>

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type-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-toolbar.js

Lines changed: 2 additions & 2 deletions
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/converter/converter-pool-factory.js

Lines changed: 5 additions & 2 deletions
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/converter/converter-pool.js

Lines changed: 14 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/js/stage-builder.js

Lines changed: 2 additions & 2 deletions
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/utils/string.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/config-field.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* @api
77
*/
8-
export interface ConfigFieldInterface {
8+
export default interface ConfigFieldInterface {
99
[key: string]: {
1010
default: null | string | number;
1111
};

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

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,75 @@ export default interface ContentTypeConfigInterface {
2121
preview_component: string;
2222
master_component: string;
2323
component: string;
24-
appearances: string[];
24+
appearances: {
25+
[key: string]: ContentTypeConfigAppearanceInterface;
26+
};
2527
readers: string[];
2628
allowed_parents: string[];
2729
is_visible: boolean;
2830
}
31+
32+
export interface ContentTypeConfigAppearanceInterface {
33+
readers: string[];
34+
data_mapping: DataMappingInterface;
35+
preview_template: string;
36+
render_template: string;
37+
render: string;
38+
default: string;
39+
form: string;
40+
}
41+
42+
export interface DataMappingInterface {
43+
path: string;
44+
elements: {
45+
[key: string]: {
46+
style: DataMappingStyleInterface[];
47+
attributes: DataMappingAttributesInterface[];
48+
html: DataMappingHtmlInterface;
49+
css: DataMappingCssInterface[];
50+
tag: DataMappingTagInterface[];
51+
};
52+
};
53+
}
54+
55+
export interface DataMappingStyleInterface {
56+
var?: string;
57+
name: string;
58+
value?: string;
59+
converter?: string;
60+
preview_converter?: string;
61+
virtual?: string;
62+
persist?: string;
63+
complex?: boolean;
64+
static?: boolean;
65+
}
66+
67+
export interface DataMappingAttributesInterface {
68+
var?: string;
69+
name: string;
70+
reader?: string;
71+
value?: string;
72+
converter?: string;
73+
preview_converter?: string;
74+
virtual?: string;
75+
persist?: string;
76+
complex?: boolean;
77+
static?: boolean;
78+
}
79+
80+
export interface DataMappingHtmlInterface {
81+
var: string;
82+
converter: string;
83+
preview_converter: string;
84+
}
85+
86+
export interface DataMappingCssInterface {
87+
var: string;
88+
converter: string;
89+
filter: string[];
90+
}
91+
92+
export interface DataMappingTagInterface {
93+
var: string;
94+
converter: string;
95+
}

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
@@ -3,7 +3,7 @@
33
* See COPYING.txt for license details.
44
*/
55

6-
import loadModule from "Magento_PageBuilder/js/loader";
6+
import loadModule from "Magento_PageBuilder/js/utils/loader";
77
import events from "uiEvents";
88
import _ from "underscore";
99
import ConfigFieldInterface from "./config-field.d";

0 commit comments

Comments
 (0)