@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="Duration" version="0.0.1" display-name-key="Duration" description-key="Duration 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="Whole.None" 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/Duration.css" order="1" />
37
- <resx path="strings/Duration.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 { Duration as DurationComponent } from '../../../src/components/Duration/Duration';
5
- import { IDuration } from "../../../src/components/Duration/interfaces";
6
-
7
- export class Duration 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(DurationComponent 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 IDuration), 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>Duration</Name>
12
- <ProjectGuid>1d9cbdfd-28b7-4ab6-9e12-df37d1112887</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,28 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8" ?>
2
- <manifest>
3
- <control namespace="TALXIS.PCF" constructor="Grid" version="5.0.1" display-name-key="Grid" description-key="Grid description" control-type="standard">
4
- <data-set name="Grid" display-name-key="Dataset_Display_Key">
5
- </data-set>
6
- <property name="EnableEditing" display-name-key="EnableEditing_Display_Key" description-key="EnableEditing_Description_Key" of-type="TwoOptions" usage="input" />
7
- <property name="EnablePagination" display-name-key="EnablePagination_Display_Key" description-key="EnablePagination_Description_Key" of-type="TwoOptions" usage="input" />
8
- <property name="EnableFiltering" display-name-key="EnableFiltering_Display_Key" description-key="EnableFiltering_Description_Key" of-type="TwoOptions" usage="input" />
9
- <property name="EnableSorting" display-name-key="EnableSorting_Display_Key" description-key="EnableSorting_Description_Key" of-type="TwoOptions" usage="input" />
10
- <property name="EnableNavigation" display-name-key="EnableNavigation_Display_Key" description-key="EnableNavigation_Description_Key" of-type="TwoOptions" usage="input" />
11
- <property name="SelectableRows" display-name-key="SelectableRows_Display_Key" description-key="SelectableRows_Description_Key" of-type="SingleLine.Text" usage="input">
12
- </property>
13
-
14
- <resources>
15
- <code path="index.ts" order="1"/>
16
- </resources>
17
- <feature-usage>
18
- <uses-feature name="Device.captureAudio" required="true" />
19
- <uses-feature name="Device.captureImage" required="true" />
20
- <uses-feature name="Device.captureVideo" required="true" />
21
- <uses-feature name="Device.getBarcodeValue" required="true" />
22
- <uses-feature name="Device.getCurrentPosition" required="true" />
23
- <uses-feature name="Device.pickFile" required="true" />
24
- <uses-feature name="Utility" required="true" />
25
- <uses-feature name="WebAPI" required="true" />
26
- </feature-usage>
27
- </control>
28
- </manifest>
@@ -1,100 +0,0 @@
1
- import { IInputs, IOutputs } from "./generated/ManifestTypes";
2
- import * as ReactDOM from 'react-dom';
3
- import * as React from 'react';
4
- import { Grid as GridComponent } from '../../../dist/components/Grid/Grid';
5
- import { IGrid, IGridParameters } from "../../../dist/components/Grid/interfaces";
6
-
7
- export class Grid implements ComponentFramework.StandardControl<IInputs, IOutputs> {
8
- private _container: HTMLDivElement;
9
- private _selectedRecordIds: string[] = [];
10
- constructor() {
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<IInputs>, notifyOutputChanged: () => void, state: ComponentFramework.Dictionary, container: HTMLDivElement): void {
23
- this._container = container;
24
- }
25
-
26
- /**
27
- * 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.
28
- * @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
29
- */
30
- public updateView(context: ComponentFramework.Context<IInputs>): void {
31
- if (window.location.port === '8181') {
32
- context.factory.requestRender = () => {
33
- this.updateView(context);
34
- };
35
- //@ts-ignore - inject
36
- context.utils.getEntityMetadata = () => {
37
- return {
38
- Attributes: {
39
- get: () => {
40
- return {
41
- attributeDescriptor: {
42
- RequiredLevel: 2,
43
- IsValidForUpdate: true
44
- }
45
- };
46
- }
47
- }
48
- };
49
- };
50
- context.parameters.Grid = {
51
- ...context.parameters.Grid,
52
- columns: [...context.parameters.Grid.columns],
53
- sorting: context.parameters.Grid.sorting ?? [],
54
- //@ts-ignore - not part of types
55
- paging: {...context.parameters.Grid.paging, pageNumber: 1, pageSize: 25},
56
- refresh: () => {
57
- this.updateView(context);
58
- },
59
- getSelectedRecordIds: () => {
60
- return this._selectedRecordIds;
61
- },
62
- setSelectedRecordIds: (ids: string[]) => {
63
- this._selectedRecordIds = ids;
64
- this.updateView(context);
65
- }
66
- };
67
- for(const [key, value] of Object.entries(context.parameters.Grid.records)) {
68
- //@ts-ignore / misssing implementation
69
- context.parameters.Grid.records[key].setValue = () => {
70
- context.factory.requestRender();
71
- };
72
- }
73
- }
74
- ReactDOM.render(React.createElement(GridComponent, {
75
- context: context,
76
- parameters: {
77
- ...context.parameters,
78
- EnableEditing: {
79
- raw: true
80
- }
81
- }
82
- } as any), this._container);
83
- }
84
-
85
- /**
86
- * It is called by the framework prior to a control receiving new data.
87
- * @returns an object based on nomenclature defined in manifest, expecting object[s] for property marked as "bound" or "output"
88
- */
89
- public getOutputs(): IOutputs {
90
- return {};
91
- }
92
-
93
- /**
94
- * Called when the control is to be removed from the DOM tree. Controls should use this call for cleanup.
95
- * i.e. cancelling any pending remote calls, removing listeners, etc.
96
- */
97
- public destroy(): void {
98
- // Add code to cleanup control if necessary
99
- }
100
- }
@@ -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>Grid</Name>
12
- <ProjectGuid>f3abb6c4-d594-4bf7-a4f6-15d438e64388</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,30 +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
- "@types/react": "17.0.2"
29
- }
30
- }
@@ -1,3 +0,0 @@
1
- {
2
- "outDir": "./out/controls"
3
- }
@@ -1,51 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8" ?>
2
- <manifest>
3
- <control namespace="TALXIS.PCF" constructor="Lookup" version="0.0.1" display-name-key="Lookup" description-key="Lookup 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="Lookup.Simple" 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/Lookup.css" order="1" />
37
- <resx path="strings/Lookup.1033.resx" version="1.0.0" />
38
- -->
39
- </resources>
40
- <feature-usage>
41
- <uses-feature name="Device.captureAudio" required="true" />
42
- <uses-feature name="Device.captureImage" required="true" />
43
- <uses-feature name="Device.captureVideo" required="true" />
44
- <uses-feature name="Device.getBarcodeValue" required="true" />
45
- <uses-feature name="Device.getCurrentPosition" required="true" />
46
- <uses-feature name="Device.pickFile" required="true" />
47
- <uses-feature name="Utility" required="true" />
48
- <uses-feature name="WebAPI" required="true" />
49
- </feature-usage>
50
- </control>
51
- </manifest>
@@ -1,90 +0,0 @@
1
- //@ts-nocheck - types;
2
- import { IInputs, IOutputs } from "./generated/ManifestTypes";
3
- import * as ReactDOM from 'react-dom';
4
- import * as React from 'react';
5
- import { Lookup as LookupComponent } from '../../../src/components/Lookup/Lookup';
6
- import { ILookup } from '../../../src/components/Lookup/interfaces';
7
- import { Context as MockContext } from '../../../src/sandbox/mock/Context';
8
-
9
- export class Lookup implements ComponentFramework.StandardControl<IInputs, IOutputs> {
10
-
11
- private _notifyOutputChanged: () => void;
12
- private _container: HTMLDivElement;
13
- private _outputs: IOutputs = {};
14
- constructor() {
15
-
16
- }
17
-
18
- /**
19
- * Used to initialize the control instance. Controls can kick off remote server calls and other initialization actions here.
20
- * Data-set values are not initialized here, use updateView.
21
- * @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.
22
- * @param notifyOutputChanged A callback method to alert the framework that the control has new outputs ready to be retrieved asynchronously.
23
- * @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.
24
- * @param container If a control is marked control-type='standard', it will receive an empty div element within which it can render its content.
25
- */
26
- public init(context: ComponentFramework.Context<IInputs>, notifyOutputChanged: () => void, state: ComponentFramework.Dictionary, container: HTMLDivElement): void {
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
- if (window.location.href.includes('localhost')) {
37
- context.mode.allocatedHeight = 0;
38
- const mockContext = new MockContext();
39
- context.utils = mockContext.utils;
40
- //@ts-ignore - tooling sucks
41
- context.parameters.value.attributes.Targets = [
42
- 'talxis_team',
43
- 'talxis_person'
44
-
45
- ];
46
- if (!Array.isArray(context.parameters.value.raw)) {
47
- context.parameters.value.raw = [
48
- {
49
- entityType: 'talxis_team',
50
- id: '0000',
51
- name: 'Team 1'
52
- }
53
- ];
54
- }
55
- context.mode.allocatedHeight = 42;
56
- }
57
- ReactDOM.render(React.createElement(LookupComponent as any, {
58
- context: context,
59
- parameters: {
60
- value: context.parameters.value,
61
- AutoFocus: {
62
- raw: true
63
- },
64
- MultipleEnabled: {
65
- raw: false
66
- }
67
- },
68
- onNotifyOutputChanged: (outputs) => {
69
- this._outputs = outputs;
70
- this._notifyOutputChanged();
71
- }
72
- } as ILookup), this._container);
73
- }
74
-
75
- /**
76
- * It is called by the framework prior to a control receiving new data.
77
- * @returns an object based on nomenclature defined in manifest, expecting object[s] for property marked as "bound" or "output"
78
- */
79
- public getOutputs(): IOutputs {
80
- return this._outputs;
81
- }
82
-
83
- /**
84
- * Called when the control is to be removed from the DOM tree. Controls should use this call for cleanup.
85
- * i.e. cancelling any pending remote calls, removing listeners, etc.
86
- */
87
- public destroy(): void {
88
- // Add code to cleanup control if necessary
89
- }
90
- }
@@ -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>Lookup</Name>
12
- <ProjectGuid>88160cba-bbd4-4cfc-99db-8b34f7f7e07b</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
- }