create-powerapps-project 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/packageManager.js
CHANGED
|
@@ -36,15 +36,15 @@ function getPackages(type) {
|
|
|
36
36
|
if (type === 'pcf') {
|
|
37
37
|
return {
|
|
38
38
|
dependencies: [
|
|
39
|
-
'react',
|
|
40
|
-
'react-dom',
|
|
39
|
+
'react@17.0.2',
|
|
40
|
+
'react-dom@17.0.2',
|
|
41
41
|
'@fluentui/react',
|
|
42
42
|
'@fluentui/font-icons-mdl2'
|
|
43
43
|
],
|
|
44
44
|
devDependencies: [
|
|
45
45
|
//`powerapps-project-${type}`,
|
|
46
|
-
'@types/react',
|
|
47
|
-
'@types/react-dom',
|
|
46
|
+
'@types/react@17.0.39',
|
|
47
|
+
'@types/react-dom@17.0.11',
|
|
48
48
|
'@types/xrm',
|
|
49
49
|
'-D'
|
|
50
50
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IInputs, IOutputs } from "./generated/ManifestTypes";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import ReactDOM from 'react-dom';
|
|
4
4
|
import { initializeIcons } from '@fluentui/font-icons-mdl2';
|
|
5
5
|
|
|
6
6
|
import { App, AppProps } from './App';
|
|
@@ -33,7 +33,6 @@ export class {{name}} implements ComponentFramework.StandardControl<IInputs, IOu
|
|
|
33
33
|
this.container = container;
|
|
34
34
|
this.context = context;
|
|
35
35
|
this.isTestHarness = document.getElementById('control-dimensions') !== null;
|
|
36
|
-
this.root = createRoot(this.container);
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
|
|
@@ -46,8 +45,9 @@ export class {{name}} implements ComponentFramework.StandardControl<IInputs, IOu
|
|
|
46
45
|
isTestHarness: this.isTestHarness
|
|
47
46
|
};
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
React.createElement(App, this.props)
|
|
48
|
+
ReactDOM.render(
|
|
49
|
+
React.createElement(App, this.props),
|
|
50
|
+
this.container
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -64,7 +64,7 @@ export class {{name}} implements ComponentFramework.StandardControl<IInputs, IOu
|
|
|
64
64
|
* i.e. cancelling any pending remote calls, removing listeners, etc.
|
|
65
65
|
*/
|
|
66
66
|
public destroy(): void {
|
|
67
|
-
this.
|
|
67
|
+
ReactDOM.unmountComponentAtNode(this.container);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
}
|