create-powerapps-project 1.1.0 → 1.2.1
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/package.json
CHANGED
|
@@ -6,7 +6,7 @@ export interface IAppProps {
|
|
|
6
6
|
context: ComponentFramework.Context<IInputs>;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export const App =
|
|
9
|
+
export const App = (props: IAppProps) => {
|
|
10
10
|
const {
|
|
11
11
|
context
|
|
12
12
|
} = props;
|
|
@@ -15,6 +15,6 @@ export const App = React.memo((props: IAppProps) => {
|
|
|
15
15
|
<AppContextProvider context={context}>
|
|
16
16
|
</AppContextProvider>
|
|
17
17
|
);
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
19
|
|
|
20
20
|
App.displayName = 'App';
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IInputs } from './generated/ManifestTypes';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
interface IAppContextProviderProps {
|
|
4
|
+
interface IAppContext {
|
|
7
5
|
context: ComponentFramework.Context<IInputs>;
|
|
6
|
+
theme?: Record<string, string>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const AppContext = React.createContext<IAppContext>({} as IAppContext);
|
|
10
|
+
|
|
11
|
+
interface IAppContextProviderProps extends IAppContext {
|
|
8
12
|
children?: React.ReactNode;
|
|
9
13
|
}
|
|
10
14
|
|
|
@@ -14,4 +18,4 @@ export const AppContextProvider = (props: IAppContextProviderProps): JSX.Element
|
|
|
14
18
|
return <AppContext.Provider value={context}>{children}</AppContext.Provider>;
|
|
15
19
|
};
|
|
16
20
|
|
|
17
|
-
export const useAppContext = ():
|
|
21
|
+
export const useAppContext = (): IAppContext => React.useContext(AppContext);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports = function (plop) {
|
|
2
|
-
plop.load('powerapps-project-pcf');
|
|
1
|
+
module.exports = async function (plop) {
|
|
2
|
+
await plop.load('powerapps-project-pcf');
|
|
3
3
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports = function (plop) {
|
|
2
|
-
plop.load('powerapps-project-webresource');
|
|
1
|
+
module.exports = async function (plop) {
|
|
2
|
+
await plop.load('powerapps-project-webresource');
|
|
3
3
|
};
|