├── src
├── pcfconfig.json
├── tsconfig.json
├── .gitignore
├── package.json
├── IframePCF
│ ├── ControlManifest.Input.xml
│ └── index.ts
└── src.pcfproj
├── BTDIFrame_1_0_0_1.zip
├── BTDIFrame_1_0_0_1_managed.zip
├── IFrameSolution_1_0_0_1_managed.zip
├── solution
├── Other
│ ├── Relationships.xml
│ ├── Customizations.xml
│ └── Solution.xml
├── .gitignore
└── solution.cdsproj
└── README.md
/src/pcfconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "outDir": "./out/controls"
3 | }
--------------------------------------------------------------------------------
/BTDIFrame_1_0_0_1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yashag2255/iframePCF/HEAD/BTDIFrame_1_0_0_1.zip
--------------------------------------------------------------------------------
/BTDIFrame_1_0_0_1_managed.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yashag2255/iframePCF/HEAD/BTDIFrame_1_0_0_1_managed.zip
--------------------------------------------------------------------------------
/IFrameSolution_1_0_0_1_managed.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yashag2255/iframePCF/HEAD/IFrameSolution_1_0_0_1_managed.zip
--------------------------------------------------------------------------------
/solution/Other/Relationships.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/solution/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # msbuild output directories
4 | /bin
5 | /obj
--------------------------------------------------------------------------------
/src/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./node_modules/pcf-scripts/tsconfig_base.json",
3 | "compilerOptions": {
4 | "typeRoots": ["node_modules/@types"],
5 | }
6 | }
--------------------------------------------------------------------------------
/src/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # generated directory
7 | **/generated
8 |
9 | # output directory
10 | /out
11 |
12 | # msbuild output directories
13 | /bin
14 | /obj
--------------------------------------------------------------------------------
/solution/Other/Customizations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | 1033
17 |
18 |
--------------------------------------------------------------------------------
/src/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "pcf-project",
3 | "version": "1.0.0",
4 | "description": "Project containing your PowerApps Component Framework (PCF) control.",
5 | "scripts": {
6 | "build": "pcf-scripts build",
7 | "clean": "pcf-scripts clean",
8 | "rebuild": "pcf-scripts rebuild",
9 | "start": "pcf-scripts start"
10 | },
11 | "dependencies": {
12 | "@types/node": "^10.12.18",
13 | "@types/powerapps-component-framework": "^1.2.0"
14 | },
15 | "devDependencies": {
16 | "pcf-scripts": "^1",
17 | "pcf-start": "^1"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # iframePCF
2 | PCF to enable an iframe functionality in canvas apps for Power Apps.
3 |
4 | Steps to push the component:
5 |
6 | You can push this component directly using the Visual studio developer command prompt. The steps to do so are:
7 |
8 | 1. Clone the repository
9 | 2. cd into the src folder
10 | 3. Get the developer resource URL for your environment from advanced settings in Power Apps.
11 | 4. Use the command: pac auth create --url and authenticate with your credentials.
12 | 5. Use the command: pac pcf push --publisher-prefix contoso to push the component.
13 |
--------------------------------------------------------------------------------
/src/IframePCF/ControlManifest.Input.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
23 |
24 |
36 |
37 |
--------------------------------------------------------------------------------
/src/src.pcfproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\PowerApps
5 |
6 |
7 |
8 |
9 |
10 |
11 | src
12 | 0b759fe8-a720-4165-83e8-0171c15c2294
13 | $(MSBuildThisFileDirectory)out\controls
14 |
15 |
16 |
17 | v4.6.2
18 |
19 | net462
20 | PackageReference
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/solution/solution.cdsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\PowerApps
5 |
6 |
7 |
8 |
9 |
10 |
11 | 01602154-fa1a-4028-99bd-74f226861cd0
12 | v4.6.2
13 |
14 | net462
15 | PackageReference
16 |
17 |
18 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/src/IframePCF/index.ts:
--------------------------------------------------------------------------------
1 | import {IInputs, IOutputs} from "./generated/ManifestTypes";
2 |
3 | export class IframePCF implements ComponentFramework.StandardControl {
4 | private iframeelem:HTMLIFrameElement;
5 |
6 | /**
7 | * Empty constructor.
8 | */
9 | constructor()
10 | {
11 |
12 | }
13 |
14 | /**
15 | * Used to initialize the control instance. Controls can kick off remote server calls and other initialization actions here.
16 | * Data-set values are not initialized here, use updateView.
17 | * @param context The entire property bag available to control via Context Object; It contains values as set up by the customizer mapped to property names defined in the manifest, as well as utility functions.
18 | * @param notifyOutputChanged A callback method to alert the framework that the control has new outputs ready to be retrieved asynchronously.
19 | * @param state A piece of data that persists in one session for a single user. Can be set at any point in a controls life cycle by calling 'setControlState' in the Mode interface.
20 | * @param container If a control is marked control-type='standard', it will receive an empty div element within which it can render its content.
21 | */
22 | public init(context: ComponentFramework.Context, notifyOutputChanged: () => void, state: ComponentFramework.Dictionary, container:HTMLDivElement)
23 | {
24 | // Add control initialization code
25 | this.iframeelem = document.createElement("iframe");
26 |
27 | if( context.parameters.src.raw)
28 | {
29 | this.iframeelem.src = context.parameters.src.raw
30 | };
31 |
32 | this.iframeelem.width = "500";
33 | this.iframeelem.height ="700";
34 | this.iframeelem.frameBorder = "0";
35 |
36 | container.appendChild(this.iframeelem);
37 | }
38 |
39 |
40 | /**
41 | * Called when any value in the property bag has changed. This includes field values, data-sets, global values such as container height and width, offline status, control metadata values such as label, visible, etc.
42 | * @param context The entire property bag available to control via Context Object; It contains values as set up by the customizer mapped to names defined in the manifest, as well as utility functions
43 | */
44 | public updateView(context: ComponentFramework.Context): void
45 | {
46 | // Add code to update control view
47 | // Add code to update control view
48 | if( context.parameters.src.raw)
49 | {
50 | this.iframeelem.src = context.parameters.src.raw
51 | };
52 |
53 | this.iframeelem.width = "500";
54 | this.iframeelem.height ="700";
55 | this.iframeelem.frameBorder = "0";
56 | }
57 |
58 | /**
59 | * It is called by the framework prior to a control receiving new data.
60 | * @returns an object based on nomenclature defined in manifest, expecting object[s] for property marked as “bound” or “output”
61 | */
62 | public getOutputs(): IOutputs
63 | {
64 | return {};
65 | }
66 |
67 | /**
68 | * Called when the control is to be removed from the DOM tree. Controls should use this call for cleanup.
69 | * i.e. cancelling any pending remote calls, removing listeners, etc.
70 | */
71 | public destroy(): void
72 | {
73 | // Add code to cleanup control if necessary
74 | }
75 | }
--------------------------------------------------------------------------------
/solution/Other/Solution.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | solution
6 |
7 |
8 |
9 |
10 |
11 | 1.0
12 |
13 | 2
14 |
15 |
16 | btd
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | btd
29 |
30 | 55784
31 |
32 |
33 |
34 | 1
35 | 1
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | 1
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | 2
63 | 1
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 | 1
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------