Skip to content

Commit 647d348

Browse files
authored
Switched build from CommonJS to ES2022. (#2819)
1 parent 0e91333 commit 647d348

File tree

75 files changed

+488
-454
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+488
-454
lines changed

package-lock.json

Lines changed: 58 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@
9292
"@microsoft/applicationinsights-web": "^3.0.2",
9393
"@monaco-editor/loader": "^1.3.3",
9494
"@monaco-editor/react": "^4.6.0",
95-
"@paperbits/azure": "0.1.649",
96-
"@paperbits/common": "0.1.649",
97-
"@paperbits/core": "0.1.649",
98-
"@paperbits/forms": "0.1.649",
99-
"@paperbits/react": "1.0.8",
100-
"@paperbits/styles": "0.1.649",
95+
"@paperbits/azure": "0.1.650",
96+
"@paperbits/common": "0.1.650",
97+
"@paperbits/core": "0.1.650",
98+
"@paperbits/forms": "0.1.650",
99+
"@paperbits/react": "1.0.10",
100+
"@paperbits/styles": "0.1.650",
101101
"@webcomponents/custom-elements": "1.6.0",
102102
"@webcomponents/shadydom": "^1.11.0",
103103
"client-oauth2": "4.3.3",

src/admin/custom-widgets/customWidgetDetailsModal.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ const technology: IChoiceGroupOption[] = [
4242

4343
export class CustomWidgetDetailsModal extends React.Component<CustomWidgetDetailsModalProps, CustomWidgetDetailsModalState> {
4444
@Resolve('widgetService')
45-
public widgetService: IWidgetService;
45+
public declare widgetService: IWidgetService;
4646

4747
@Resolve('blobStorage')
48-
public blobStorage: MapiBlobStorage;
48+
public declare blobStorage: MapiBlobStorage;
4949

5050
@Resolve('eventManager')
51-
public eventManager: EventManager;
51+
public declare eventManager: EventManager;
5252

5353
constructor(props: CustomWidgetDetailsModalProps) {
5454
super(props);
@@ -200,7 +200,7 @@ export class CustomWidgetDetailsModal extends React.Component<CustomWidgetDetail
200200
}
201201
<Stack className={`collapsible-section${!this.state.showInstructions ? ' hidden' : ''}`}>
202202
<Text block styles={{ root: { paddingTop: 20 } }}>
203-
Follow the steps below to create, implement, and deploy a custom widget.
203+
Follow the steps below to create, implement, and deploy a custom widget.
204204
<Link href="https://aka.ms/apimdocs/portal/customwidgets" target="_blank">Learn more</Link>.
205205
</Text>
206206
<ol>

src/admin/custom-widgets/customWidgets.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ const iconStyles = { width: '16px', color: lightTheme.palette.themePrimary };
2727

2828
export class CustomWidgets extends React.Component<CustomWidgetsProps, CustomWidgetsState> {
2929
@Resolve('viewManager')
30-
public viewManager: ViewManager;
30+
public declare viewManager: ViewManager;
3131

3232
@Resolve('blobStorage')
33-
public blobStorage: MapiBlobStorage;
33+
public declare blobStorage: MapiBlobStorage;
3434

3535
constructor(props: CustomWidgetsProps) {
3636
super(props);
@@ -63,7 +63,7 @@ export class CustomWidgets extends React.Component<CustomWidgetsProps, CustomWid
6363
configsAll.forEach(config => {
6464
if (config.override) configs[config.name] = config;
6565
});
66-
66+
6767
this.setState({ customWidgets: Object.values(configs)});
6868
}).finally(() => this.setState({ isLoading: false }));
6969
}
@@ -109,7 +109,7 @@ export class CustomWidgets extends React.Component<CustomWidgetsProps, CustomWid
109109
<BackButton onClick={this.props.onBackButtonClick} />
110110
<Stack className="nav-item-description-container">
111111
<Text className="description-text">
112-
Custom widgets let you extend the developer portal's functionality in a modular way. For example, you can implement an integration
112+
Custom widgets let you extend the developer portal's functionality in a modular way. For example, you can implement an integration
113113
with a support system, reuse it on several pages, and source-control the code in a git repository.
114114
</Text>
115115
</Stack>

src/admin/help/helpModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const headerStyles = { root: { paddingTop: 15, margin: 0 } };
1616

1717
export class HelpModal extends React.Component<HelpModalProps, HelpModalState> {
1818
@Resolve('policyService')
19-
public policyService: PolicyService;
19+
public declare policyService: PolicyService;
2020

2121
constructor(props: HelpModalProps) {
2222
super(props);
@@ -64,7 +64,7 @@ export class HelpModal extends React.Component<HelpModalProps, HelpModalState> {
6464
<li><Text block><Link href="https://aka.ms/apimdocs/portal" target="_blank">Overview</Link> of the developer portal.</Text></li>
6565
<li><Text block><Link href="https://aka.ms/apimdocs/customizeportal" target="_blank">Access and customize the developer portal</Link> with a step-by-step tutorial.</Text></li>
6666
</ul>
67-
67+
6868
<Text as="h3" block variant="large" styles={headerStyles}>How-to</Text>
6969
<ul>
7070
<li><Text block><Link href="https://aka.ms/apimdocs/portal/cors" target="_blank">Enable CORS</Link></Text></li>

src/admin/leftPanel.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,19 @@ const iconStyles = { root: { color: lightTheme.palette.themePrimary, fontSize: 2
5959

6060
export class LeftPanel extends React.Component<{}, LeftPanelState> {
6161
@Resolve('siteService')
62-
public siteService: ISiteService;
62+
public declare siteService: ISiteService;
6363

6464
@Resolve('eventManager')
65-
public eventManager: EventManager;
66-
65+
public declare eventManager: EventManager;
66+
6767
@Resolve('viewManager')
68-
public viewManager: ViewManager;
68+
public declare viewManager: ViewManager;
6969

7070
@Resolve('router')
71-
public router: Router;
71+
public declare router: Router;
7272

7373
@Resolve('logger')
74-
public logger: Logger;
74+
public declare logger: Logger;
7575

7676
constructor(props: any) {
7777
super(props);
@@ -128,7 +128,7 @@ export class LeftPanel extends React.Component<{}, LeftPanelState> {
128128
this.setState({ selectedNavItem: NavItem.Main });
129129
this.viewManager.setHost({ name: 'page-host' });
130130
}
131-
131+
132132
handleOnboardingModalClose = (): void => {
133133
this.setState({ showOnboardingModal: false });
134134
localStorage.setItem('isOnboardingSeen', 'true');
@@ -210,7 +210,7 @@ export class LeftPanel extends React.Component<{}, LeftPanelState> {
210210
/>
211211
<CommandBarButton
212212
iconProps={feedbackIcon}
213-
onRenderText={() =>
213+
onRenderText={() =>
214214
<Text block styles={{ root: { flexGrow: 1, margin: '0 4px' } }}>
215215
Give feedback
216216
<Icon iconName="OpenInNewWindow" styles={{ root: { paddingLeft: 5 } }} />
@@ -268,7 +268,7 @@ export class LeftPanel extends React.Component<{}, LeftPanelState> {
268268
this.logger.trackEvent(`${checked ? 'Checked' : 'Unchecked'}: Preview new UI design`);
269269
this.eventManager.dispatchEvent('onSaveChanges');
270270
this.eventManager.dispatchEvent('onDataPush'); // Needed to reload the runtime part
271-
}}
271+
}}
272272
/>
273273
}
274274
</div>

0 commit comments

Comments
 (0)