Skip to content

Commit 4322bc2

Browse files
authored
Migrate design-time and editor to React (#2700)
1 parent dd6fc78 commit 4322bc2

22 files changed

+316
-209
lines changed

package-lock.json

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

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@
8383
"@microsoft/applicationinsights-web": "^3.0.2",
8484
"@monaco-editor/loader": "^1.3.3",
8585
"@monaco-editor/react": "^4.6.0",
86-
"@paperbits/azure": "0.1.624",
87-
"@paperbits/common": "0.1.624",
88-
"@paperbits/core": "0.1.624",
89-
"@paperbits/forms": "0.1.624",
86+
"@paperbits/azure": "0.1.626",
87+
"@paperbits/common": "0.1.626",
88+
"@paperbits/core": "0.1.626",
89+
"@paperbits/forms": "0.1.626",
9090
"@paperbits/react": "1.0.8",
91-
"@paperbits/styles": "0.1.624",
91+
"@paperbits/styles": "0.1.626",
9292
"@webcomponents/custom-elements": "1.6.0",
9393
"@webcomponents/shadydom": "^1.11.0",
9494
"client-oauth2": "4.3.3",

src/apim.publish.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import { MapiObjectStorage, MapiBlobStorage } from "./persistence";
88
import { ListOfApisPublishModule } from "./components/apis/list-of-apis/ko/listOfApis.module";
99
import { DetailsOfApiPublishModule } from "./components/apis/details-of-api/ko/detailsOfApi.module";
1010
import { HistoryOfApiPublishModule } from "./components/apis/history-of-api/ko/historyOfApi.module";
11-
import { SigninPublishModule } from "./components/users/signin/signin.module";
11+
import { SigninPublishModule } from "./components/users/signin/signin.publish.module";
1212
import { SigninSocialPublishModule } from "./components/users/signin-social/signinSocial.module";
13-
import { SignupPublishModule } from "./components/users/signup/signup.module";
13+
import { SignupPublishModule } from "./components/users/signup/signup.publish.module";
1414
import { SignupSocialPublishModule } from "./components/users/signup-social/signupSocial.module";
1515
import { ProfilePublishModule } from "./components/users/profile/profile.module";
1616
import { SubscriptionsPublishModule } from "./components/users/subscriptions/subscriptions.module";
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
declare namespace JSX {
2+
interface IntrinsicElements {
3+
"fui-signup-runtime": any;
4+
"signup-runtime": any;
5+
"fui-validation-summary": any;
6+
"validation-summary": any;
7+
"fui-signin-runtime": any;
8+
"signin-runtime": any;
9+
}
10+
}

src/components/users/signin/ko/signin.html

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/components/users/signin/ko/signinViewModel.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import * as React from "react";
2+
3+
export class SigninViewModel extends React.Component {
4+
public state: any;
5+
6+
constructor(props) {
7+
super(props);
8+
9+
this.state = {
10+
runtimeConfig: props.runtimeConfig,
11+
styles: props.styles,
12+
isRedesignEnabled: props.isRedesignEnabled
13+
};
14+
}
15+
16+
public render(): JSX.Element {
17+
return this.state.isRedesignEnabled
18+
? <fui-signin-runtime props={JSON.stringify(this.state.runtimeConfig)} ></fui-signin-runtime>
19+
: <signin-runtime params={JSON.stringify(this.state.runtimeConfig)}></signin-runtime>;
20+
}
21+
}

0 commit comments

Comments
 (0)