@talxis/base-controls 1.2406.3 → 1.2406.4

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.
Files changed (46) hide show
  1. package/package.json +1 -1
  2. package/examples/Currency/Currency/ControlManifest.Input.xml +0 -53
  3. package/examples/Currency/Currency/index.ts +0 -66
  4. package/examples/Currency/Currency.pcfproj +0 -46
  5. package/examples/Currency/package.json +0 -29
  6. package/examples/Currency/pcfconfig.json +0 -3
  7. package/examples/DateTime/DateTime/ControlManifest.Input.xml +0 -58
  8. package/examples/DateTime/DateTime/index.ts +0 -69
  9. package/examples/DateTime/DateTime.pcfproj +0 -46
  10. package/examples/DateTime/package.json +0 -29
  11. package/examples/DateTime/pcfconfig.json +0 -3
  12. package/examples/Decimal/Decimal/ControlManifest.Input.xml +0 -66
  13. package/examples/Decimal/Decimal/index.ts +0 -66
  14. package/examples/Decimal/Decimal.pcfproj +0 -46
  15. package/examples/Decimal/package.json +0 -28
  16. package/examples/Decimal/pcfconfig.json +0 -3
  17. package/examples/Duration/Duration/ControlManifest.Input.xml +0 -53
  18. package/examples/Duration/Duration/index.ts +0 -66
  19. package/examples/Duration/Duration.pcfproj +0 -46
  20. package/examples/Duration/package.json +0 -29
  21. package/examples/Duration/pcfconfig.json +0 -3
  22. package/examples/Grid/Grid/ControlManifest.Input.xml +0 -28
  23. package/examples/Grid/Grid/index.ts +0 -100
  24. package/examples/Grid/Grid.pcfproj +0 -46
  25. package/examples/Grid/package.json +0 -30
  26. package/examples/Grid/pcfconfig.json +0 -3
  27. package/examples/Lookup/Lookup/ControlManifest.Input.xml +0 -51
  28. package/examples/Lookup/Lookup/index.ts +0 -90
  29. package/examples/Lookup/Lookup.pcfproj +0 -46
  30. package/examples/Lookup/package.json +0 -29
  31. package/examples/Lookup/pcfconfig.json +0 -3
  32. package/examples/MultiSelectOptionSet/MultiSelectOptionSet/ControlManifest.Input.xml +0 -53
  33. package/examples/MultiSelectOptionSet/MultiSelectOptionSet/index.ts +0 -86
  34. package/examples/MultiSelectOptionSet/MultiSelectOptionSet.pcfproj +0 -46
  35. package/examples/MultiSelectOptionSet/package.json +0 -31
  36. package/examples/MultiSelectOptionSet/pcfconfig.json +0 -3
  37. package/examples/OptionSet/OptionSet/ControlManifest.Input.xml +0 -53
  38. package/examples/OptionSet/OptionSet/index.ts +0 -70
  39. package/examples/OptionSet/OptionSet.pcfproj +0 -46
  40. package/examples/OptionSet/package.json +0 -29
  41. package/examples/OptionSet/pcfconfig.json +0 -3
  42. package/examples/TwoOptions/TwoOptions/ControlManifest.Input.xml +0 -53
  43. package/examples/TwoOptions/TwoOptions/index.ts +0 -69
  44. package/examples/TwoOptions/TwoOptions.pcfproj +0 -46
  45. package/examples/TwoOptions/package.json +0 -29
  46. package/examples/TwoOptions/pcfconfig.json +0 -3
@@ -1,53 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8" ?>
2
- <manifest>
3
- <control namespace="TALXIS.PCF" constructor="MultiSelectOptionSet" version="0.0.1" display-name-key="MultiSelectOptionSet" description-key="MultiSelectOptionSet description" control-type="standard" >
4
- <!--external-service-usage node declares whether this 3rd party PCF control is using external service or not, if yes, this control will be considered as premium and please also add the external domain it is using.
5
- If it is not using any external service, please set the enabled="false" and DO NOT add any domain below. The "enabled" will be false by default.
6
- Example1:
7
- <external-service-usage enabled="true">
8
- <domain>www.Microsoft.com</domain>
9
- </external-service-usage>
10
- Example2:
11
- <external-service-usage enabled="false">
12
- </external-service-usage>
13
- -->
14
- <external-service-usage enabled="false">
15
- <!--UNCOMMENT TO ADD EXTERNAL DOMAINS
16
- <domain></domain>
17
- <domain></domain>
18
- -->
19
- </external-service-usage>
20
- <!-- property node identifies a specific, configurable piece of data that the control expects from CDS -->
21
- <property name="value" display-name-key="Property_Display_Key" description-key="Property_Desc_Key" of-type="MultiSelectOptionSet" usage="bound" required="true" />
22
- <!--
23
- Property node's of-type attribute can be of-type-group attribute.
24
- Example:
25
- <type-group name="numbers">
26
- <type>Whole.None</type>
27
- <type>Currency</type>
28
- <type>FP</type>
29
- <type>Decimal</type>
30
- </type-group>
31
- <property name="sampleProperty" display-name-key="Property_Display_Key" description-key="Property_Desc_Key" of-type-group="numbers" usage="bound" required="true" />
32
- -->
33
- <resources>
34
- <code path="index.ts" order="1"/>
35
- <!-- UNCOMMENT TO ADD MORE RESOURCES
36
- <css path="css/MultiSelectOptionSet.css" order="1" />
37
- <resx path="strings/MultiSelectOptionSet.1033.resx" version="1.0.0" />
38
- -->
39
- </resources>
40
- <!-- UNCOMMENT TO ENABLE THE SPECIFIED API
41
- <feature-usage>
42
- <uses-feature name="Device.captureAudio" required="true" />
43
- <uses-feature name="Device.captureImage" required="true" />
44
- <uses-feature name="Device.captureVideo" required="true" />
45
- <uses-feature name="Device.getBarcodeValue" required="true" />
46
- <uses-feature name="Device.getCurrentPosition" required="true" />
47
- <uses-feature name="Device.pickFile" required="true" />
48
- <uses-feature name="Utility" required="true" />
49
- <uses-feature name="WebAPI" required="true" />
50
- </feature-usage>
51
- -->
52
- </control>
53
- </manifest>
@@ -1,86 +0,0 @@
1
- import { IInputs, IOutputs } from "./generated/ManifestTypes";
2
- import * as ReactDOM from 'react-dom';
3
- import * as React from 'react';
4
- import { IMultiSelectOptionSet } from "../../../src/components/MultiSelectOptionSet";
5
- import { MultiSelectOptionSet as MultiSelectOptionSetComponent } from '../../../src/components/MultiSelectOptionSet';
6
-
7
- export class MultiSelectOptionSet implements ComponentFramework.StandardControl<IInputs, IOutputs> {
8
-
9
- private _notifyOutputChanged: () => void;
10
- private _container: HTMLDivElement;
11
- private _outputs: IOutputs = {};
12
- constructor() {
13
-
14
- }
15
-
16
- /**
17
- * Used to initialize the control instance. Controls can kick off remote server calls and other initialization actions here.
18
- * Data-set values are not initialized here, use updateView.
19
- * @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.
20
- * @param notifyOutputChanged A callback method to alert the framework that the control has new outputs ready to be retrieved asynchronously.
21
- * @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.
22
- * @param container If a control is marked control-type='standard', it will receive an empty div element within which it can render its content.
23
- */
24
- public init(context: ComponentFramework.Context<IInputs>, notifyOutputChanged: () => void, state: ComponentFramework.Dictionary, container: HTMLDivElement): void {
25
- //local debugger adds string here
26
- context.parameters.value.raw = null;
27
- this._notifyOutputChanged = notifyOutputChanged;
28
- this._container = container;
29
- // Add control initialization code
30
- }
31
- /**
32
- * 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.
33
- * @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
34
- */
35
- public updateView(context: ComponentFramework.Context<IInputs>): void {
36
- //@ts-ignore - local debugger does not have options
37
- context.parameters.value.attributes?.Options = [
38
- {
39
- Color: null,
40
- Label: 'Option 1',
41
- Value: 1
42
- },
43
- {
44
- Color: null,
45
- Label: 'Option 2',
46
- Value: 2
47
- },
48
- {
49
- Color: null,
50
- Label: 'Option 3',
51
- Value: 3
52
- }
53
- ];
54
- ReactDOM.render(React.createElement(MultiSelectOptionSetComponent as any, {
55
- context: context as any,
56
- parameters: {
57
- value: context.parameters.value,
58
- AutoFocus: {
59
- raw: true
60
- }
61
- },
62
- onNotifyOutputChanged: (outputs) => {
63
- this._outputs = {
64
- value: outputs.value
65
- };
66
- this._notifyOutputChanged();
67
- }
68
- } as IMultiSelectOptionSet), this._container);
69
- }
70
-
71
- /**
72
- * It is called by the framework prior to a control receiving new data.
73
- * @returns an object based on nomenclature defined in manifest, expecting object[s] for property marked as "bound" or "output"
74
- */
75
- public getOutputs(): IOutputs {
76
- return this._outputs;
77
- }
78
-
79
- /**
80
- * Called when the control is to be removed from the DOM tree. Controls should use this call for cleanup.
81
- * i.e. cancelling any pending remote calls, removing listeners, etc.
82
- */
83
- public destroy(): void {
84
- // Add code to cleanup control if necessary
85
- }
86
- }
@@ -1,46 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
- <PropertyGroup>
4
- <PowerAppsTargetsPath>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\PowerApps</PowerAppsTargetsPath>
5
- </PropertyGroup>
6
-
7
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
8
- <Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Pcf.props" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Pcf.props')" />
9
-
10
- <PropertyGroup>
11
- <Name>MultiSelectOptionSet</Name>
12
- <ProjectGuid>2abf8556-a546-41f0-a0bd-4f5f7f718871</ProjectGuid>
13
- <OutputPath>$(MSBuildThisFileDirectory)out\controls</OutputPath>
14
- </PropertyGroup>
15
-
16
- <PropertyGroup>
17
- <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
18
- <!--Remove TargetFramework when this is available in 16.1-->
19
- <TargetFramework>net462</TargetFramework>
20
- <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
21
- </PropertyGroup>
22
-
23
- <ItemGroup>
24
- <PackageReference Include="Microsoft.PowerApps.MSBuild.Pcf" Version="1.*" />
25
- <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
26
- </ItemGroup>
27
-
28
- <ItemGroup>
29
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\.gitignore" />
30
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\bin\**" />
31
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\obj\**" />
32
- <ExcludeDirectories Include="$(OutputPath)\**" />
33
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.pcfproj" />
34
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.pcfproj.user" />
35
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.sln" />
36
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\node_modules\**" />
37
- </ItemGroup>
38
-
39
- <ItemGroup>
40
- <None Include="$(MSBuildThisFileDirectory)\**" Exclude="@(ExcludeDirectories)" />
41
- </ItemGroup>
42
-
43
- <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
44
- <Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Pcf.targets" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Pcf.targets')" />
45
-
46
- </Project>
@@ -1,31 +0,0 @@
1
- {
2
- "name": "pcf-project",
3
- "version": "1.2406.3",
4
- "description": "Project containing your PowerApps Component Framework (PCF) control.",
5
- "scripts": {
6
- "build": "pcf-scripts build",
7
- "clean": "pcf-scripts clean",
8
- "lint": "pcf-scripts lint",
9
- "lint:fix": "pcf-scripts lint fix",
10
- "rebuild": "pcf-scripts rebuild",
11
- "start": "pcf-scripts start",
12
- "start:watch": "pcf-scripts start watch",
13
- "refreshTypes": "pcf-scripts refreshTypes"
14
- },
15
- "dependencies": {
16
- },
17
- "devDependencies": {
18
- "@microsoft/eslint-plugin-power-apps": "^0.2.6",
19
- "@types/node": "^18.8.2",
20
- "@types/powerapps-component-framework": "^1.3.4",
21
- "@typescript-eslint/eslint-plugin": "^5.39.0",
22
- "@typescript-eslint/parser": "^5.39.0",
23
- "eslint": "^8.24.0",
24
- "eslint-plugin-import": "^2.26.0",
25
- "eslint-plugin-node": "^11.1.0",
26
- "eslint-plugin-promise": "^6.0.1",
27
- "pcf-scripts": "^1",
28
- "pcf-start": "^1",
29
- "typescript": "^4.9.5"
30
- }
31
- }
@@ -1,3 +0,0 @@
1
- {
2
- "outDir": "./out/controls"
3
- }
@@ -1,53 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8" ?>
2
- <manifest>
3
- <control namespace="TALXIS.PCF" constructor="OptionSet" version="0.0.1" display-name-key="OptionSet" description-key="OptionSet description" control-type="standard" >
4
- <!--external-service-usage node declares whether this 3rd party PCF control is using external service or not, if yes, this control will be considered as premium and please also add the external domain it is using.
5
- If it is not using any external service, please set the enabled="false" and DO NOT add any domain below. The "enabled" will be false by default.
6
- Example1:
7
- <external-service-usage enabled="true">
8
- <domain>www.Microsoft.com</domain>
9
- </external-service-usage>
10
- Example2:
11
- <external-service-usage enabled="false">
12
- </external-service-usage>
13
- -->
14
- <external-service-usage enabled="false">
15
- <!--UNCOMMENT TO ADD EXTERNAL DOMAINS
16
- <domain></domain>
17
- <domain></domain>
18
- -->
19
- </external-service-usage>
20
- <!-- property node identifies a specific, configurable piece of data that the control expects from CDS -->
21
- <property name="value" display-name-key="Property_Display_Key" description-key="Property_Desc_Key" of-type="OptionSet" usage="bound" required="true" />
22
- <!--
23
- Property node's of-type attribute can be of-type-group attribute.
24
- Example:
25
- <type-group name="numbers">
26
- <type>Whole.None</type>
27
- <type>Currency</type>
28
- <type>FP</type>
29
- <type>Decimal</type>
30
- </type-group>
31
- <property name="sampleProperty" display-name-key="Property_Display_Key" description-key="Property_Desc_Key" of-type-group="numbers" usage="bound" required="true" />
32
- -->
33
- <resources>
34
- <code path="index.ts" order="1"/>
35
- <!-- UNCOMMENT TO ADD MORE RESOURCES
36
- <css path="css/OptionSet.css" order="1" />
37
- <resx path="strings/OptionSet.1033.resx" version="1.0.0" />
38
- -->
39
- </resources>
40
- <!-- UNCOMMENT TO ENABLE THE SPECIFIED API
41
- <feature-usage>
42
- <uses-feature name="Device.captureAudio" required="true" />
43
- <uses-feature name="Device.captureImage" required="true" />
44
- <uses-feature name="Device.captureVideo" required="true" />
45
- <uses-feature name="Device.getBarcodeValue" required="true" />
46
- <uses-feature name="Device.getCurrentPosition" required="true" />
47
- <uses-feature name="Device.pickFile" required="true" />
48
- <uses-feature name="Utility" required="true" />
49
- <uses-feature name="WebAPI" required="true" />
50
- </feature-usage>
51
- -->
52
- </control>
53
- </manifest>
@@ -1,70 +0,0 @@
1
- import { IInputs, IOutputs } from "./generated/ManifestTypes";
2
- import * as ReactDOM from 'react-dom';
3
- import * as React from 'react';
4
- import { OptionSet as OptionSetComponent } from '../../../src/components/OptionSet/OptionSet';
5
- import { IOptionSet } from "../../../src/components/OptionSet/interfaces";
6
-
7
- export class OptionSet implements ComponentFramework.StandardControl<IInputs, IOutputs> {
8
-
9
- private _notifyOutputChanged: () => void;
10
- private _container: HTMLDivElement;
11
- private _outputs: IOutputs = {};
12
- constructor()
13
- {
14
-
15
- }
16
-
17
- /**
18
- * Used to initialize the control instance. Controls can kick off remote server calls and other initialization actions here.
19
- * Data-set values are not initialized here, use updateView.
20
- * @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.
21
- * @param notifyOutputChanged A callback method to alert the framework that the control has new outputs ready to be retrieved asynchronously.
22
- * @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.
23
- * @param container If a control is marked control-type='standard', it will receive an empty div element within which it can render its content.
24
- */
25
- public init(context: ComponentFramework.Context<IInputs>, notifyOutputChanged: () => void, state: ComponentFramework.Dictionary, container:HTMLDivElement): void
26
- {
27
- this._notifyOutputChanged = notifyOutputChanged;
28
- this._container = container;
29
- // Add control initialization code
30
- }
31
- /**
32
- * 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.
33
- * @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
34
- */
35
- public updateView(context: ComponentFramework.Context<IInputs>): void
36
- {
37
- console.log(context.parameters.value);
38
- ReactDOM.render(React.createElement(OptionSetComponent as any, {
39
- context: context as any,
40
- parameters: {
41
- value: context.parameters.value,
42
- AutoFocus: {
43
- raw: true
44
- }
45
- },
46
- onNotifyOutputChanged: (outputs) => {
47
- this._outputs = outputs;
48
- this._notifyOutputChanged();
49
- }
50
- } as IOptionSet), this._container);
51
- }
52
-
53
- /**
54
- * It is called by the framework prior to a control receiving new data.
55
- * @returns an object based on nomenclature defined in manifest, expecting object[s] for property marked as "bound" or "output"
56
- */
57
- public getOutputs(): IOutputs
58
- {
59
- return this._outputs;
60
- }
61
-
62
- /**
63
- * Called when the control is to be removed from the DOM tree. Controls should use this call for cleanup.
64
- * i.e. cancelling any pending remote calls, removing listeners, etc.
65
- */
66
- public destroy(): void
67
- {
68
- // Add code to cleanup control if necessary
69
- }
70
- }
@@ -1,46 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
- <PropertyGroup>
4
- <PowerAppsTargetsPath>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\PowerApps</PowerAppsTargetsPath>
5
- </PropertyGroup>
6
-
7
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
8
- <Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Pcf.props" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Pcf.props')" />
9
-
10
- <PropertyGroup>
11
- <Name>OptionSet</Name>
12
- <ProjectGuid>4ea291f2-a843-4e29-92a3-06355922b360</ProjectGuid>
13
- <OutputPath>$(MSBuildThisFileDirectory)out\controls</OutputPath>
14
- </PropertyGroup>
15
-
16
- <PropertyGroup>
17
- <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
18
- <!--Remove TargetFramework when this is available in 16.1-->
19
- <TargetFramework>net462</TargetFramework>
20
- <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
21
- </PropertyGroup>
22
-
23
- <ItemGroup>
24
- <PackageReference Include="Microsoft.PowerApps.MSBuild.Pcf" Version="1.*" />
25
- <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
26
- </ItemGroup>
27
-
28
- <ItemGroup>
29
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\.gitignore" />
30
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\bin\**" />
31
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\obj\**" />
32
- <ExcludeDirectories Include="$(OutputPath)\**" />
33
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.pcfproj" />
34
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.pcfproj.user" />
35
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.sln" />
36
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\node_modules\**" />
37
- </ItemGroup>
38
-
39
- <ItemGroup>
40
- <None Include="$(MSBuildThisFileDirectory)\**" Exclude="@(ExcludeDirectories)" />
41
- </ItemGroup>
42
-
43
- <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
44
- <Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Pcf.targets" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Pcf.targets')" />
45
-
46
- </Project>
@@ -1,29 +0,0 @@
1
- {
2
- "name": "pcf-project",
3
- "version": "1.2406.3",
4
- "description": "Project containing your PowerApps Component Framework (PCF) control.",
5
- "scripts": {
6
- "build": "pcf-scripts build",
7
- "clean": "pcf-scripts clean",
8
- "lint": "pcf-scripts lint",
9
- "lint:fix": "pcf-scripts lint fix",
10
- "rebuild": "pcf-scripts rebuild",
11
- "start": "pcf-scripts start",
12
- "start:watch": "pcf-scripts start watch",
13
- "refreshTypes": "pcf-scripts refreshTypes"
14
- },
15
- "devDependencies": {
16
- "@microsoft/eslint-plugin-power-apps": "^0.2.6",
17
- "@types/node": "^18.8.2",
18
- "@types/powerapps-component-framework": "^1.3.4",
19
- "@typescript-eslint/eslint-plugin": "^5.39.0",
20
- "@typescript-eslint/parser": "^5.39.0",
21
- "eslint": "^8.24.0",
22
- "eslint-plugin-import": "^2.26.0",
23
- "eslint-plugin-node": "^11.1.0",
24
- "eslint-plugin-promise": "^6.0.1",
25
- "pcf-scripts": "^1",
26
- "pcf-start": "^1",
27
- "typescript": "^4.9.5"
28
- }
29
- }
@@ -1,3 +0,0 @@
1
- {
2
- "outDir": "./out/controls"
3
- }
@@ -1,53 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8" ?>
2
- <manifest>
3
- <control namespace="TALXIS.PCF" constructor="TwoOptions" version="0.0.1" display-name-key="TwoOptions" description-key="TwoOptions description" control-type="standard" >
4
- <!--external-service-usage node declares whether this 3rd party PCF control is using external service or not, if yes, this control will be considered as premium and please also add the external domain it is using.
5
- If it is not using any external service, please set the enabled="false" and DO NOT add any domain below. The "enabled" will be false by default.
6
- Example1:
7
- <external-service-usage enabled="true">
8
- <domain>www.Microsoft.com</domain>
9
- </external-service-usage>
10
- Example2:
11
- <external-service-usage enabled="false">
12
- </external-service-usage>
13
- -->
14
- <external-service-usage enabled="false">
15
- <!--UNCOMMENT TO ADD EXTERNAL DOMAINS
16
- <domain></domain>
17
- <domain></domain>
18
- -->
19
- </external-service-usage>
20
- <!-- property node identifies a specific, configurable piece of data that the control expects from CDS -->
21
- <property name="value" display-name-key="Property_Display_Key" description-key="Property_Desc_Key" of-type="TwoOptions" usage="bound" required="true" />
22
- <!--
23
- Property node's of-type attribute can be of-type-group attribute.
24
- Example:
25
- <type-group name="numbers">
26
- <type>Whole.None</type>
27
- <type>Currency</type>
28
- <type>FP</type>
29
- <type>Decimal</type>
30
- </type-group>
31
- <property name="sampleProperty" display-name-key="Property_Display_Key" description-key="Property_Desc_Key" of-type-group="numbers" usage="bound" required="true" />
32
- -->
33
- <resources>
34
- <code path="index.ts" order="1"/>
35
- <!-- UNCOMMENT TO ADD MORE RESOURCES
36
- <css path="css/TwoOptions.css" order="1" />
37
- <resx path="strings/TwoOptions.1033.resx" version="1.0.0" />
38
- -->
39
- </resources>
40
- <!-- UNCOMMENT TO ENABLE THE SPECIFIED API
41
- <feature-usage>
42
- <uses-feature name="Device.captureAudio" required="true" />
43
- <uses-feature name="Device.captureImage" required="true" />
44
- <uses-feature name="Device.captureVideo" required="true" />
45
- <uses-feature name="Device.getBarcodeValue" required="true" />
46
- <uses-feature name="Device.getCurrentPosition" required="true" />
47
- <uses-feature name="Device.pickFile" required="true" />
48
- <uses-feature name="Utility" required="true" />
49
- <uses-feature name="WebAPI" required="true" />
50
- </feature-usage>
51
- -->
52
- </control>
53
- </manifest>
@@ -1,69 +0,0 @@
1
- import { IInputs, IOutputs } from "./generated/ManifestTypes";
2
- import * as ReactDOM from 'react-dom';
3
- import * as React from 'react';
4
- import { TwoOptions as TwoOptionsComponent } from '../../../src/components/TwoOptions/TwoOptions';
5
- import { ITwoOptions } from "../../../src/components/TwoOptions/interfaces";
6
-
7
- export class TwoOptions implements ComponentFramework.StandardControl<IInputs, IOutputs> {
8
-
9
- private _notifyOutputChanged: () => void;
10
- private _container: HTMLDivElement;
11
- private _outputs: IOutputs = {};
12
- constructor()
13
- {
14
-
15
- }
16
-
17
- /**
18
- * Used to initialize the control instance. Controls can kick off remote server calls and other initialization actions here.
19
- * Data-set values are not initialized here, use updateView.
20
- * @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.
21
- * @param notifyOutputChanged A callback method to alert the framework that the control has new outputs ready to be retrieved asynchronously.
22
- * @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.
23
- * @param container If a control is marked control-type='standard', it will receive an empty div element within which it can render its content.
24
- */
25
- public init(context: ComponentFramework.Context<IInputs>, notifyOutputChanged: () => void, state: ComponentFramework.Dictionary, container:HTMLDivElement): void
26
- {
27
- this._notifyOutputChanged = notifyOutputChanged;
28
- this._container = container;
29
- // Add control initialization code
30
- }
31
- /**
32
- * 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.
33
- * @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
34
- */
35
- public updateView(context: ComponentFramework.Context<IInputs>): void
36
- {
37
- ReactDOM.render(React.createElement(TwoOptionsComponent as any, {
38
- context: context as any,
39
- parameters: {
40
- value: context.parameters.value,
41
- AutoFocus: {
42
- raw: true
43
- }
44
- },
45
- onNotifyOutputChanged: (outputs) => {
46
- this._outputs = outputs;
47
- this._notifyOutputChanged();
48
- }
49
- } as ITwoOptions), this._container);
50
- }
51
-
52
- /**
53
- * It is called by the framework prior to a control receiving new data.
54
- * @returns an object based on nomenclature defined in manifest, expecting object[s] for property marked as "bound" or "output"
55
- */
56
- public getOutputs(): IOutputs
57
- {
58
- return this._outputs;
59
- }
60
-
61
- /**
62
- * Called when the control is to be removed from the DOM tree. Controls should use this call for cleanup.
63
- * i.e. cancelling any pending remote calls, removing listeners, etc.
64
- */
65
- public destroy(): void
66
- {
67
- // Add code to cleanup control if necessary
68
- }
69
- }
@@ -1,46 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
- <PropertyGroup>
4
- <PowerAppsTargetsPath>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\PowerApps</PowerAppsTargetsPath>
5
- </PropertyGroup>
6
-
7
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
8
- <Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Pcf.props" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Pcf.props')" />
9
-
10
- <PropertyGroup>
11
- <Name>TwoOptions</Name>
12
- <ProjectGuid>52507120-e5ad-4fab-8b48-327ae282b1cc</ProjectGuid>
13
- <OutputPath>$(MSBuildThisFileDirectory)out\controls</OutputPath>
14
- </PropertyGroup>
15
-
16
- <PropertyGroup>
17
- <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
18
- <!--Remove TargetFramework when this is available in 16.1-->
19
- <TargetFramework>net462</TargetFramework>
20
- <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
21
- </PropertyGroup>
22
-
23
- <ItemGroup>
24
- <PackageReference Include="Microsoft.PowerApps.MSBuild.Pcf" Version="1.*" />
25
- <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
26
- </ItemGroup>
27
-
28
- <ItemGroup>
29
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\.gitignore" />
30
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\bin\**" />
31
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\obj\**" />
32
- <ExcludeDirectories Include="$(OutputPath)\**" />
33
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.pcfproj" />
34
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.pcfproj.user" />
35
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\*.sln" />
36
- <ExcludeDirectories Include="$(MSBuildThisFileDirectory)\node_modules\**" />
37
- </ItemGroup>
38
-
39
- <ItemGroup>
40
- <None Include="$(MSBuildThisFileDirectory)\**" Exclude="@(ExcludeDirectories)" />
41
- </ItemGroup>
42
-
43
- <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
44
- <Import Project="$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Pcf.targets" Condition="Exists('$(PowerAppsTargetsPath)\Microsoft.PowerApps.VisualStudio.Pcf.targets')" />
45
-
46
- </Project>
@@ -1,29 +0,0 @@
1
- {
2
- "name": "pcf-project",
3
- "version": "1.2406.3",
4
- "description": "Project containing your PowerApps Component Framework (PCF) control.",
5
- "scripts": {
6
- "build": "pcf-scripts build",
7
- "clean": "pcf-scripts clean",
8
- "lint": "pcf-scripts lint",
9
- "lint:fix": "pcf-scripts lint fix",
10
- "rebuild": "pcf-scripts rebuild",
11
- "start": "pcf-scripts start",
12
- "start:watch": "pcf-scripts start watch",
13
- "refreshTypes": "pcf-scripts refreshTypes"
14
- },
15
- "devDependencies": {
16
- "@microsoft/eslint-plugin-power-apps": "^0.2.6",
17
- "@types/node": "^18.8.2",
18
- "@types/powerapps-component-framework": "^1.3.4",
19
- "@typescript-eslint/eslint-plugin": "^5.39.0",
20
- "@typescript-eslint/parser": "^5.39.0",
21
- "eslint": "^8.24.0",
22
- "eslint-plugin-import": "^2.26.0",
23
- "eslint-plugin-node": "^11.1.0",
24
- "eslint-plugin-promise": "^6.0.1",
25
- "pcf-scripts": "^1",
26
- "pcf-start": "^1",
27
- "typescript": "^4.9.5"
28
- }
29
- }
@@ -1,3 +0,0 @@
1
- {
2
- "outDir": "./out/controls"
3
- }