@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talxis/base-controls",
3
- "version": "1.2406.3",
3
+ "version": "1.2406.4",
4
4
  "description": "Set of React components that natively work with Power Apps Component Framework API's",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -1,53 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8" ?>
2
- <manifest>
3
- <control namespace="TALXIS.PCF" constructor="Currency" version="0.0.1" display-name-key="Currency" description-key="Currency 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="Currency" 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/Currency.css" order="1" />
37
- <resx path="strings/Currency.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,66 +0,0 @@
1
- import { IInputs, IOutputs } from "./generated/ManifestTypes";
2
- import * as ReactDOM from 'react-dom';
3
- import * as React from 'react';
4
- import { Decimal as DecimalComponent } from '../../../src/components/Decimal/Decimal';
5
- import { IDecimal } from '../../../src/components/Decimal/interfaces';
6
-
7
- export class Currency 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(DecimalComponent as any, {
38
- context: context,
39
- parameters: {
40
- value: context.parameters.value
41
- },
42
- onNotifyOutputChanged: (outputs) => {
43
- this._outputs = outputs;
44
- this._notifyOutputChanged();
45
- }
46
- } as IDecimal), this._container);
47
- }
48
-
49
- /**
50
- * It is called by the framework prior to a control receiving new data.
51
- * @returns an object based on nomenclature defined in manifest, expecting object[s] for property marked as "bound" or "output"
52
- */
53
- public getOutputs(): IOutputs
54
- {
55
- return this._outputs;
56
- }
57
-
58
- /**
59
- * Called when the control is to be removed from the DOM tree. Controls should use this call for cleanup.
60
- * i.e. cancelling any pending remote calls, removing listeners, etc.
61
- */
62
- public destroy(): void
63
- {
64
- // Add code to cleanup control if necessary
65
- }
66
- }
@@ -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>Currency</Name>
12
- <ProjectGuid>8ee34816-0f54-40ef-b681-ac90080bf8b6</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,58 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8" ?>
2
- <manifest>
3
- <control namespace="TALXIS.PCF" constructor="DateTime" version="0.0.1" display-name-key="DateTime" description-key="DateTime 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-group="datetime" usage="bound" required="true" />
22
-
23
- <type-group name="datetime">
24
- <type>DateAndTime.DateAndTime</type>
25
- <type>DateAndTime.DateOnly</type>
26
- </type-group>
27
- <!--
28
- Property node's of-type attribute can be of-type-group attribute.
29
- Example:
30
- <type-group name="numbers">
31
- <type>Whole.None</type>
32
- <type>Currency</type>
33
- <type>FP</type>
34
- <type>Decimal</type>
35
- </type-group>
36
- <property name="sampleProperty" display-name-key="Property_Display_Key" description-key="Property_Desc_Key" of-type-group="numbers" usage="bound" required="true" />
37
- -->
38
- <resources>
39
- <code path="index.ts" order="1"/>
40
- <!-- UNCOMMENT TO ADD MORE RESOURCES
41
- <css path="css/DateTime.css" order="1" />
42
- <resx path="strings/DateTime.1033.resx" version="1.0.0" />
43
- -->
44
- </resources>
45
- <!-- UNCOMMENT TO ENABLE THE SPECIFIED API
46
- <feature-usage>
47
- <uses-feature name="Device.captureAudio" required="true" />
48
- <uses-feature name="Device.captureImage" required="true" />
49
- <uses-feature name="Device.captureVideo" required="true" />
50
- <uses-feature name="Device.getBarcodeValue" required="true" />
51
- <uses-feature name="Device.getCurrentPosition" required="true" />
52
- <uses-feature name="Device.pickFile" required="true" />
53
- <uses-feature name="Utility" required="true" />
54
- <uses-feature name="WebAPI" required="true" />
55
- </feature-usage>
56
- -->
57
- </control>
58
- </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 { DateTime as DateTimeComponent } from '../../../src/components/DateTime/DateTime';
5
- import { IDateTime } from "../../../src/components/DateTime/interfaces";
6
-
7
- export class DateTime 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(DateTimeComponent as any, {
38
- context: context,
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 IDateTime), 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>DateTime</Name>
12
- <ProjectGuid>1a3e3043-b5a0-4ccb-8796-af73f63fa110</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,66 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <manifest>
3
- <control namespace="TALXIS.PCF" constructor="Decimal" version="0.0.1" display-name-key="Decimal"
4
- description-key="Decimal description" control-type="standard">
5
- <!--external-service-usage
6
- node declares whether this 3rd party PCF control is using external service or not, if yes, this
7
- control will be considered as premium and please also add the external domain it is using.
8
- If it is not using any external service, please set the enabled="false" and DO NOT add any domain
9
- below. The "enabled" will be false by default.
10
- Example1:
11
- <external-service-usage enabled="true">
12
- <domain>www.Microsoft.com</domain>
13
- </external-service-usage>
14
- Example2:
15
- <external-service-usage enabled="false">
16
- </external-service-usage>
17
- -->
18
- <external-service-usage enabled="false">
19
- <!--UNCOMMENT
20
- TO ADD EXTERNAL DOMAINS
21
- <domain></domain>
22
- <domain></domain>
23
- -->
24
- </external-service-usage>
25
- <!-- property node identifies a specific, configurable piece of data that the control expects
26
- from CDS -->
27
- <property name="value" display-name-key="Property_Display_Key"
28
- description-key="Property_Desc_Key" of-type-group="numeric" usage="bound" required="true" />
29
-
30
- <type-group name="numeric">
31
- <type>Decimal</type>
32
- <type>Whole.None</type>
33
- </type-group>
34
- <!--
35
- Property node's of-type attribute can be of-type-group attribute.
36
- Example:
37
- <type-group name="numbers">
38
- <type>Whole.None</type>
39
- <type>Currency</type>
40
- <type>FP</type>
41
- <type>Decimal</type>
42
- </type-group>
43
- <property name="sampleProperty" display-name-key="Property_Display_Key"
44
- description-key="Property_Desc_Key" of-type-group="numbers" usage="bound" required="true" />
45
- -->
46
- <resources>
47
- <code path="index.ts" order="1" />
48
- <!-- UNCOMMENT TO ADD MORE RESOURCES
49
- <css path="css/Decimal.css" order="1" />
50
- <resx path="strings/Decimal.1033.resx" version="1.0.0" />
51
- -->
52
- </resources>
53
- <!-- UNCOMMENT TO ENABLE THE SPECIFIED API
54
- <feature-usage>
55
- <uses-feature name="Device.captureAudio" required="true" />
56
- <uses-feature name="Device.captureImage" required="true" />
57
- <uses-feature name="Device.captureVideo" required="true" />
58
- <uses-feature name="Device.getBarcodeValue" required="true" />
59
- <uses-feature name="Device.getCurrentPosition" required="true" />
60
- <uses-feature name="Device.pickFile" required="true" />
61
- <uses-feature name="Utility" required="true" />
62
- <uses-feature name="WebAPI" required="true" />
63
- </feature-usage>
64
- -->
65
- </control>
66
- </manifest>
@@ -1,66 +0,0 @@
1
- import { IInputs, IOutputs } from "./generated/ManifestTypes";
2
- import * as ReactDOM from 'react-dom';
3
- import * as React from 'react';
4
- import { Decimal as DecimalComponent } from '../../../src/components/Decimal/Decimal';
5
- import { IDecimal } from '../../../src/components/Decimal/interfaces';
6
-
7
- export class Decimal 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(DecimalComponent as any, {
38
- context: context,
39
- parameters: {
40
- value: context.parameters.value
41
- },
42
- onNotifyOutputChanged: (outputs) => {
43
- this._outputs = outputs;
44
- this._notifyOutputChanged();
45
- }
46
- } as IDecimal), this._container);
47
- }
48
-
49
- /**
50
- * It is called by the framework prior to a control receiving new data.
51
- * @returns an object based on nomenclature defined in manifest, expecting object[s] for property marked as "bound" or "output"
52
- */
53
- public getOutputs(): IOutputs
54
- {
55
- return this._outputs;
56
- }
57
-
58
- /**
59
- * Called when the control is to be removed from the DOM tree. Controls should use this call for cleanup.
60
- * i.e. cancelling any pending remote calls, removing listeners, etc.
61
- */
62
- public destroy(): void
63
- {
64
- // Add code to cleanup control if necessary
65
- }
66
- }
@@ -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>Decimal</Name>
12
- <ProjectGuid>d42a3eac-e3cf-476c-b493-a2b3b5247159</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,28 +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
- }
28
- }
@@ -1,3 +0,0 @@
1
- {
2
- "outDir": "./out/controls"
3
- }