├── .gitattributes
├── .gitignore
├── CHANGELOG.md
├── Deploy
├── App.config
├── Deploy.csproj
├── Extensions.cs
├── ImportManager.cs
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
├── ResourceTypeEnum.cs
├── Setting.cs
├── XrmOrganization
│ ├── OAuthOrganizationService.cs
│ └── TokenHelper.cs
├── demo
│ ├── .angular-cli.json
│ ├── .editorconfig
│ ├── .gitignore
│ ├── README.md
│ ├── deploy.cmd
│ ├── e2e
│ │ ├── app.e2e-spec.ts
│ │ ├── app.po.ts
│ │ └── tsconfig.e2e.json
│ ├── karma.conf.js
│ ├── package.json
│ ├── protractor.conf.js
│ ├── proxy-config.json
│ ├── src
│ │ ├── app
│ │ │ ├── app.component.css
│ │ │ ├── app.component.html
│ │ │ ├── app.component.spec.ts
│ │ │ ├── app.component.ts
│ │ │ ├── app.module.ts
│ │ │ └── shared
│ │ │ │ └── xrm.service.ts
│ │ ├── assets
│ │ │ └── .gitkeep
│ │ ├── environments
│ │ │ ├── environment.prod.ts
│ │ │ └── environment.ts
│ │ ├── favicon.ico
│ │ ├── index.html
│ │ ├── main.ts
│ │ ├── polyfills.ts
│ │ ├── styles.css
│ │ ├── test.ts
│ │ ├── tsconfig.app.json
│ │ ├── tsconfig.spec.json
│ │ └── typings.d.ts
│ ├── tsconfig.json
│ ├── tslint.json
│ └── xrm.deploy.json
└── packages.config
├── Documentation
├── angular-first-build.png
├── angular-running-in-dynamic-ie.png
├── angular-running-in-dynamic-with-count.png
├── angular-running-in-dynamic.png
├── angular-serve-xrm-service.png
├── enable-basic-authentication.png
├── solution-add-angular-application.png
├── xrm-deploy-result.png
├── xrm-deploy-solution-result.png
└── xrm-sdk-assemblies.png
├── Kipon.Angular.Xrm.WebResource.sln
├── LICENSE
└── README.md
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | bld/
21 | [Bb]in/
22 | [Oo]bj/
23 | [Ll]og/
24 |
25 | # Visual Studio 2015 cache/options directory
26 | .vs/
27 | # Uncomment if you have tasks that create the project's static files in wwwroot
28 | #wwwroot/
29 |
30 | # MSTest test Results
31 | [Tt]est[Rr]esult*/
32 | [Bb]uild[Ll]og.*
33 |
34 | # NUNIT
35 | *.VisualState.xml
36 | TestResult.xml
37 |
38 | # Build Results of an ATL Project
39 | [Dd]ebugPS/
40 | [Rr]eleasePS/
41 | dlldata.c
42 |
43 | # DNX
44 | project.lock.json
45 | project.fragment.lock.json
46 | artifacts/
47 |
48 | *_i.c
49 | *_p.c
50 | *_i.h
51 | *.ilk
52 | *.meta
53 | *.obj
54 | *.pch
55 | *.pdb
56 | *.pgc
57 | *.pgd
58 | *.rsp
59 | *.sbr
60 | *.tlb
61 | *.tli
62 | *.tlh
63 | *.tmp
64 | *.tmp_proj
65 | *.log
66 | *.vspscc
67 | *.vssscc
68 | .builds
69 | *.pidb
70 | *.svclog
71 | *.scc
72 |
73 | # Chutzpah Test files
74 | _Chutzpah*
75 |
76 | # Visual C++ cache files
77 | ipch/
78 | *.aps
79 | *.ncb
80 | *.opendb
81 | *.opensdf
82 | *.sdf
83 | *.cachefile
84 | *.VC.db
85 | *.VC.VC.opendb
86 |
87 | # Visual Studio profiler
88 | *.psess
89 | *.vsp
90 | *.vspx
91 | *.sap
92 |
93 | # TFS 2012 Local Workspace
94 | $tf/
95 |
96 | # Guidance Automation Toolkit
97 | *.gpState
98 |
99 | # ReSharper is a .NET coding add-in
100 | _ReSharper*/
101 | *.[Rr]e[Ss]harper
102 | *.DotSettings.user
103 |
104 | # JustCode is a .NET coding add-in
105 | .JustCode
106 |
107 | # TeamCity is a build add-in
108 | _TeamCity*
109 |
110 | # DotCover is a Code Coverage Tool
111 | *.dotCover
112 |
113 | # NCrunch
114 | _NCrunch_*
115 | .*crunch*.local.xml
116 | nCrunchTemp_*
117 |
118 | # MightyMoose
119 | *.mm.*
120 | AutoTest.Net/
121 |
122 | # Web workbench (sass)
123 | .sass-cache/
124 |
125 | # Installshield output folder
126 | [Ee]xpress/
127 |
128 | # DocProject is a documentation generator add-in
129 | DocProject/buildhelp/
130 | DocProject/Help/*.HxT
131 | DocProject/Help/*.HxC
132 | DocProject/Help/*.hhc
133 | DocProject/Help/*.hhk
134 | DocProject/Help/*.hhp
135 | DocProject/Help/Html2
136 | DocProject/Help/html
137 |
138 | # Click-Once directory
139 | publish/
140 |
141 | # Publish Web Output
142 | *.[Pp]ublish.xml
143 | *.azurePubxml
144 | # TODO: Comment the next line if you want to checkin your web deploy settings
145 | # but database connection strings (with potential passwords) will be unencrypted
146 | #*.pubxml
147 | *.publishproj
148 |
149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
150 | # checkin your Azure Web App publish settings, but sensitive information contained
151 | # in these scripts will be unencrypted
152 | PublishScripts/
153 |
154 | # NuGet Packages
155 | *.nupkg
156 | # The packages folder can be ignored because of Package Restore
157 | **/packages/*
158 | # except build/, which is used as an MSBuild target.
159 | !**/packages/build/
160 | # Uncomment if necessary however generally it will be regenerated when needed
161 | #!**/packages/repositories.config
162 | # NuGet v3's project.json files produces more ignoreable files
163 | *.nuget.props
164 | *.nuget.targets
165 |
166 | # Microsoft Azure Build Output
167 | csx/
168 | *.build.csdef
169 |
170 | # Microsoft Azure Emulator
171 | ecf/
172 | rcf/
173 |
174 | # Windows Store app package directories and files
175 | AppPackages/
176 | BundleArtifacts/
177 | Package.StoreAssociation.xml
178 | _pkginfo.txt
179 |
180 | # Visual Studio cache files
181 | # files ending in .cache can be ignored
182 | *.[Cc]ache
183 | # but keep track of directories ending in .cache
184 | !*.[Cc]ache/
185 |
186 | # Others
187 | ClientBin/
188 | ~$*
189 | *~
190 | *.dbmdl
191 | *.dbproj.schemaview
192 | *.jfm
193 | *.pfx
194 | *.publishsettings
195 | node_modules/
196 | orleans.codegen.cs
197 |
198 | # Since there are multiple workflows, uncomment next line to ignore bower_components
199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
200 | #bower_components/
201 |
202 | # RIA/Silverlight projects
203 | Generated_Code/
204 |
205 | # Backup & report files from converting an old project file
206 | # to a newer Visual Studio version. Backup files are not needed,
207 | # because we have git ;-)
208 | _UpgradeReport_Files/
209 | Backup*/
210 | UpgradeLog*.XML
211 | UpgradeLog*.htm
212 |
213 | # SQL Server files
214 | *.mdf
215 | *.ldf
216 |
217 | # Business Intelligence projects
218 | *.rdl.data
219 | *.bim.layout
220 | *.bim_*.settings
221 |
222 | # Microsoft Fakes
223 | FakesAssemblies/
224 |
225 | # GhostDoc plugin setting file
226 | *.GhostDoc.xml
227 |
228 | # Node.js Tools for Visual Studio
229 | .ntvs_analysis.dat
230 |
231 | # Visual Studio 6 build log
232 | *.plg
233 |
234 | # Visual Studio 6 workspace options file
235 | *.opt
236 |
237 | # Visual Studio LightSwitch build output
238 | **/*.HTMLClient/GeneratedArtifacts
239 | **/*.DesktopClient/GeneratedArtifacts
240 | **/*.DesktopClient/ModelManifest.xml
241 | **/*.Server/GeneratedArtifacts
242 | **/*.Server/ModelManifest.xml
243 | _Pvt_Extensions
244 |
245 | # Paket dependency manager
246 | .paket/paket.exe
247 | paket-files/
248 |
249 | # FAKE - F# Make
250 | .fake/
251 |
252 | # JetBrains Rider
253 | .idea/
254 | *.sln.iml
255 |
256 | # CodeRush
257 | .cr/
258 |
259 | # Python Tools for Visual Studio (PTVS)
260 | __pycache__/
261 | *.pyc
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 2022-10-17 Added support for application base online connection string in deploy tool
2 |
3 | ## 2020-11-08 Moved to new DEV server
4 |
5 | ## 2019-08-23: 1.0.1.4 Support for routes
6 | Added description how to handle angular routes, and extended the deploy to to support auto deploy of index.html for each route defined in the deployment configuration file.
7 |
8 | ## 2018-01-13: 1.0.1.3 Documentation only
9 | Added link to kipon-xrmservice for anyone interested.
10 |
11 | ## 2017-05-30: 1.0.1.2 Handling empty files
12 | For Html, Css and js files, the upload to Dynamics 365 will now generate default content for empty files. This will remove an eventual 404, because Empty files cannot be send to the browser
13 | from a Dynamics 365 resource.
14 |
15 | ## 2017-06-01: 1.0.1.1 Changed template suggestion in readme
16 | Readme file update in regards to suggested Visual Studio template for your angular cli folder.
17 |
--------------------------------------------------------------------------------
/Deploy/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Deploy/Deploy.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {102002FC-E3ED-40C4-9B05-DB2B8749F3A6}
8 | Exe
9 | Deploy
10 | Deploy
11 | v4.6.2
12 | 512
13 | true
14 |
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 | ..\packages\Microsoft.CrmSdk.CoreAssemblies.9.0.2.23\lib\net462\Microsoft.Crm.Sdk.Proxy.dll
38 |
39 |
40 | ..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.3.19.8\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll
41 |
42 |
43 | ..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.3.19.8\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll
44 |
45 |
46 | ..\packages\Microsoft.CrmSdk.XrmTooling.CoreAssembly.9.1.0.51\lib\net462\Microsoft.Rest.ClientRuntime.dll
47 |
48 |
49 | ..\packages\Microsoft.CrmSdk.CoreAssemblies.9.0.2.23\lib\net462\Microsoft.Xrm.Sdk.dll
50 |
51 |
52 | ..\packages\Microsoft.CrmSdk.Deployment.9.0.2.23\lib\net462\Microsoft.Xrm.Sdk.Deployment.dll
53 |
54 |
55 | ..\packages\Microsoft.CrmSdk.Workflow.9.0.2.23\lib\net462\Microsoft.Xrm.Sdk.Workflow.dll
56 |
57 |
58 | ..\packages\Microsoft.CrmSdk.XrmTooling.CoreAssembly.9.1.0.51\lib\net462\Microsoft.Xrm.Tooling.Connector.dll
59 |
60 |
61 | ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
--------------------------------------------------------------------------------
/Deploy/Extensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Deploy
8 | {
9 | public static class Extensions
10 | {
11 | public static ResourceTypeEnum ToResourceType(this string filename)
12 | {
13 | var upperExtension = filename.ToUpper().Split('.').Last();
14 |
15 | switch (upperExtension)
16 | {
17 | case "HTM":
18 | case "HTML": return ResourceTypeEnum.Html;
19 | case "CSS": return ResourceTypeEnum.Css;
20 | case "JS": return ResourceTypeEnum.Jscript;
21 | case "XML": return ResourceTypeEnum.Xml;
22 | case "PNG": return ResourceTypeEnum.Png;
23 | case "JPEG":
24 | case "JPG": return ResourceTypeEnum.Jpg;
25 | case "GIF": return ResourceTypeEnum.Gif;
26 | case "XAP": return ResourceTypeEnum.Xap;
27 | case "XLS": return ResourceTypeEnum.Xsl;
28 | case "XSLT": return ResourceTypeEnum.Xsl;
29 | case "ICO": return ResourceTypeEnum.Ico;
30 | }
31 | return ResourceTypeEnum.Unknown;
32 | }
33 |
34 | public static byte[] DefaultContentForEmplyFile(this string filename)
35 | {
36 | var type = filename.ToResourceType();
37 | switch(type)
38 | {
39 | case ResourceTypeEnum.Html: return System.Text.Encoding.ASCII.GetBytes("");
40 | case ResourceTypeEnum.Css: return System.Text.Encoding.ASCII.GetBytes("/* Empty css file */");
41 | case ResourceTypeEnum.Jscript: return System.Text.Encoding.ASCII.GetBytes("/* Empty javascript file */");
42 | }
43 | return new byte[0];
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Deploy/ImportManager.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Crm.Sdk.Messages;
2 | using Microsoft.Xrm.Sdk;
3 | using Microsoft.Xrm.Sdk.Client;
4 | using Microsoft.Xrm.Sdk.Query;
5 | using System;
6 | using System.IO;
7 | using System.Linq;
8 | using System.ServiceModel.Description;
9 |
10 | namespace Deploy
11 | {
12 | public class ImportManager
13 | {
14 | private const string HREF = "href=\"";
15 | private const string HREF_HTTP = "href=\"http";
16 | private const string HREF_PROTECT = "$HREFPROTECT$";
17 | private const string SRC = "src=\"";
18 | private const string SRC_HTTP = "src=\"http";
19 | private const string SRC_PROTECT = "$SRCPROTECT";
20 |
21 | IOrganizationService orgService;
22 |
23 | public ImportManager(string user, string pwd, string url)
24 | {
25 | var credentials = new ClientCredentials();
26 | credentials.UserName.UserName = user;
27 | credentials.UserName.Password = pwd;
28 |
29 | var config = ServiceConfigurationFactory.CreateConfiguration(
30 | new Uri(url));
31 |
32 | orgService = new OrganizationServiceProxy(config, credentials);
33 | }
34 |
35 | public ImportManager(string connectionStrig)
36 | {
37 | orgService = new XrmOrganization.OAuthOrganizationService(connectionStrig);
38 | }
39 |
40 | public void Import(string dist, string name, string subPath, string solution, string[] routes, string prefix = null)
41 | {
42 | var path = dist;
43 |
44 | if (!string.IsNullOrEmpty(subPath))
45 | {
46 | path += @"\" + subPath;
47 | }
48 |
49 | if (prefix == null)
50 | {
51 | prefix = findCustomizationPrefix(solution);
52 | }
53 |
54 | #region upload files
55 | foreach (var file in Directory.GetFiles(path))
56 | {
57 | var filename = Path.GetFileName(file);
58 | var resourceName = prefix + "_/" + name + (!string.IsNullOrEmpty(subPath) ? "/" + subPath.Replace("\\", "/") : "") + "/" + filename;
59 | this.UploadContent(name, solution, resourceName, file, null, true);
60 |
61 | if (file.EndsWith("index.html") && routes != null && routes.Length > 0)
62 | {
63 | foreach (var route in routes)
64 | {
65 | resourceName = prefix + "_/" + name + "/" + route;
66 | var html = File.ReadAllText(file);
67 | var count = route.Split('/').Length;
68 |
69 | if (count > 0)
70 | {
71 | html = html.Replace(HREF_HTTP, HREF_PROTECT);
72 | var newhref = HREF + "./%7B" + System.DateTime.Now.Ticks.ToString() + "%7D/";
73 | for (var i=0;i ((DateTime)webResource["modifiedon"]).ToUniversalTime())
146 | {
147 | Console.WriteLine("Updating " + resourceName);
148 |
149 | webResource["content"] = data;
150 | orgService.Update(webResource);
151 |
152 | var publishRequest = new PublishXmlRequest
153 | {
154 | ParameterXml = string.Format("{0}", webResource.Id)
155 | };
156 | orgService.Execute(publishRequest);
157 | }
158 | }
159 | else
160 | {
161 | webResource = new Entity
162 | {
163 | Id = Guid.NewGuid(),
164 | LogicalName = "webresource"
165 | };
166 | webResource["name"] = resourceName;
167 | webResource["content"] = data;
168 | webResource["displayname"] = name + ": " + resourceName;
169 | webResource["description"] = "Imported as part of the " + name + " application";
170 | var type = hasData ? ResourceTypeEnum.Html : filename.ToResourceType();
171 |
172 | if (type == ResourceTypeEnum.Unknown)
173 | {
174 | Console.WriteLine("Warning : unable to map file to Dynamics 365 web resource type " + filename + ". The file was ignored");
175 | return;
176 | }
177 | webResource["webresourcetype"] = new Microsoft.Xrm.Sdk.OptionSetValue((int)type);
178 | orgService.Create(webResource);
179 |
180 | var publishRequest = new PublishXmlRequest
181 | {
182 | ParameterXml = string.Format("{0}", webResource.Id)
183 | };
184 | orgService.Execute(publishRequest);
185 |
186 | // attach new webResource to solution
187 | var request = new Microsoft.Crm.Sdk.Messages.AddSolutionComponentRequest
188 | {
189 | ComponentType = 61, // Web Resource,
190 | ComponentId = webResource.Id,
191 | SolutionUniqueName = solution
192 | };
193 |
194 | orgService.Execute(request);
195 | Console.WriteLine("Created " + resourceName);
196 | }
197 | }
198 |
199 | private Entity findWebresource(string filename)
200 | {
201 | var query = new QueryExpression("webresource");
202 | query.ColumnSet = new ColumnSet(true);
203 | query.Criteria.AddCondition("name", ConditionOperator.Equal, filename);
204 |
205 | var res = orgService.RetrieveMultiple(query);
206 | return res.Entities.SingleOrDefault();
207 | }
208 |
209 | private string findCustomizationPrefix(string uniqueName)
210 | {
211 | var query = new QueryExpression("solution");
212 | query.ColumnSet = new ColumnSet(true);
213 | query.Criteria.AddCondition("uniquename", ConditionOperator.Equal, uniqueName);
214 |
215 | var res = orgService.RetrieveMultiple(query);
216 | Entity solution = null;
217 | solution = res.Entities.SingleOrDefault();
218 |
219 | if (solution != null)
220 | {
221 | var publisherid = ((Microsoft.Xrm.Sdk.EntityReference)solution["publisherid"]).Id;
222 |
223 | query = new QueryExpression("publisher");
224 | query.ColumnSet = new ColumnSet(true);
225 | query.Criteria.AddCondition("publisherid", ConditionOperator.Equal, publisherid);
226 |
227 | res = orgService.RetrieveMultiple(query);
228 | return (string)res.Entities.Single()["customizationprefix"];
229 |
230 | }
231 | throw new InvalidPluginExecutionException("Unable to map solution name " + uniqueName + " to a customization prefix");
232 | }
233 |
234 | }
235 | }
236 |
--------------------------------------------------------------------------------
/Deploy/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Deploy
8 | {
9 | class Program
10 | {
11 | static void Main(string[] args)
12 | {
13 | var settings = Setting.GetSettings();
14 | foreach (var setting in settings)
15 | {
16 | if (string.IsNullOrEmpty(setting.Connectionstring))
17 | {
18 | var importManager = new ImportManager(setting.User, setting.Password, setting.Url);
19 | importManager.Import(setting.Dist, setting.Name, null, setting.Solution, setting.Routes);
20 | }
21 | else
22 | {
23 | var importManager = new ImportManager(setting.Connectionstring);
24 | importManager.Import(setting.Dist, setting.Name, null, setting.Solution, setting.Routes);
25 | }
26 | Console.WriteLine("Upload done - press [ENTER]");
27 | Console.ReadLine();
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Deploy/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Deploy")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Deploy")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("102002fc-e3ed-40c4-9b05-db2b8749f3a6")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Deploy/ResourceTypeEnum.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Deploy
8 | {
9 | public enum ResourceTypeEnum
10 | {
11 | Html = 1,
12 | Css = 2,
13 | Jscript = 3,
14 | Xml = 4,
15 | Png = 5,
16 | Jpg = 6,
17 | Gif = 7,
18 | Xap = 8,
19 | Xsl = 9,
20 | Ico = 10,
21 | Unknown = 9999
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Deploy/Setting.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Runtime.Serialization;
7 | using System.Runtime.Serialization.Json;
8 | using System.IO;
9 |
10 | namespace Deploy
11 | {
12 | [DataContract]
13 | public class Setting
14 | {
15 | [DataMember(Name = "solution")]
16 | public string Solution { get; set; }
17 |
18 | [DataMember(Name = "name")]
19 | public string Name { get; set; }
20 |
21 | [DataMember(Name = "dist")]
22 | public string Dist { get; set; }
23 |
24 | [DataMember(Name = "connectionstring")]
25 | public string Connectionstring { get; set; }
26 |
27 | [DataMember(Name = "url")]
28 | public string Url { get; set; }
29 |
30 | [DataMember(Name = "user")]
31 | public string User { get; set; }
32 |
33 | [DataMember(Name = "password")]
34 | public string Password { get; set; }
35 |
36 | [DataMember(Name = "routes")]
37 | public string[] Routes { get; set; }
38 |
39 | public static Setting[] GetSettings()
40 | {
41 | if (System.IO.File.Exists("xrm.deploy.json"))
42 | {
43 | // the double read nature of this is to overcome the json BOM parse problem, when the json config file is created or maintained with visual studio
44 | DataContractJsonSerializer js = new DataContractJsonSerializer(typeof(Setting[]));
45 | var settingString = System.IO.File.ReadAllText("xrm.deploy.json", Encoding.UTF8);
46 | using (var mem = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(settingString)))
47 | {
48 |
49 | return (Setting[])js.ReadObject(mem);
50 | }
51 | }
52 | else
53 | {
54 | throw new FileNotFoundException("Expected to find a file name [xrm.deploy.json] in current folder");
55 | }
56 | }
57 |
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Deploy/XrmOrganization/OAuthOrganizationService.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xrm.Sdk;
2 | using Microsoft.Xrm.Sdk.Query;
3 | using Microsoft.Xrm.Sdk.WebServiceClient;
4 | using System;
5 |
6 | namespace Deploy.XrmOrganization
7 | {
8 | internal class OAuthOrganizationService : IOrganizationService, IDisposable
9 | {
10 | private OrganizationWebProxyClient client;
11 | private string organizationUrl;
12 | private Guid tenentid;
13 |
14 | private TokenHelper tokenHelper;
15 |
16 | internal OAuthOrganizationService(string connectionString)
17 | {
18 | var conn = new Connection(connectionString);
19 | this.organizationUrl = conn.organizationUrl;
20 | this.tenentid = conn.tenentid;
21 | this.Initialze(conn.clientId, conn.secret);
22 | }
23 |
24 | private bool Initialze(Guid clientId, string secret)
25 | {
26 | this.tokenHelper = TokenHelper.GetTokenHelper(clientId, secret, this.organizationUrl, tenentid);
27 | this.client = new OrganizationWebProxyClient(GetServiceUrl(), new TimeSpan(0, 15, 0), this.GetType().Assembly);
28 | this.RefreshToken();
29 | return true;
30 | }
31 |
32 | public Guid CallerId
33 | {
34 | get
35 | {
36 | return this.client.CallerId;
37 | }
38 | set
39 | {
40 | this.client.CallerId = value;
41 | }
42 | }
43 |
44 | private bool RefreshToken()
45 | {
46 | this.client.HeaderToken = tokenHelper.GetToken();
47 | return true;
48 | }
49 |
50 | public void Associate(string entityName, Guid entityId, Relationship relationship, EntityReferenceCollection relatedEntities)
51 | {
52 | this.RefreshToken();
53 | client.Associate(entityName, entityId, relationship, relatedEntities);
54 | }
55 |
56 | public Guid Create(Entity entity)
57 | {
58 | this.RefreshToken();
59 | return client.Create(entity);
60 | }
61 |
62 | public void Delete(string entityName, Guid id)
63 | {
64 | this.RefreshToken();
65 | client.Delete(entityName, id);
66 | }
67 |
68 | public void Disassociate(string entityName, Guid entityId, Relationship relationship, EntityReferenceCollection relatedEntities)
69 | {
70 | this.RefreshToken();
71 | client.Disassociate(entityName, entityId, relationship, relatedEntities);
72 | }
73 |
74 | public OrganizationResponse Execute(OrganizationRequest request)
75 | {
76 | this.RefreshToken();
77 | return client.Execute(request);
78 | }
79 |
80 | public Entity Retrieve(string entityName, Guid id, ColumnSet columnSet)
81 | {
82 | this.RefreshToken();
83 | return client.Retrieve(entityName, id, columnSet);
84 | }
85 |
86 | public EntityCollection RetrieveMultiple(QueryBase query)
87 | {
88 | this.RefreshToken();
89 | return client.RetrieveMultiple(query);
90 | }
91 |
92 | public void Update(Entity entity)
93 | {
94 | this.RefreshToken();
95 | this.client.Update(entity);
96 | }
97 |
98 | private Uri GetServiceUrl()
99 | {
100 | return new Uri(this.organizationUrl + @"/xrmservices/2011/organization.svc/web?SdkClientVersion=9.0");
101 | }
102 |
103 | public void Dispose()
104 | {
105 | this.client.Dispose();
106 | }
107 |
108 | internal class Connection
109 | {
110 | internal Connection(string connectionString)
111 | {
112 | var pms = connectionString.Split(';');
113 | foreach (var pm in pms)
114 | {
115 | if (!string.IsNullOrEmpty(pm))
116 | {
117 | var splitpos = pm.IndexOf('=');
118 | if (splitpos > 0)
119 | {
120 | var name = pm.Substring(0, splitpos).Trim().ToUpper();
121 | var value = pm.Substring(splitpos + 1);
122 | switch (name)
123 | {
124 | case "URL": this.organizationUrl = value; break;
125 | case "CLIENTID": this.clientId = new Guid(value); break;
126 | case "PASSWORD": this.secret = value; break;
127 | case "CLIENTSECRET": this.secret = value; break;
128 | case "TENENTID": this.tenentid = new Guid(value); break;
129 | }
130 | }
131 | }
132 | }
133 | }
134 |
135 | internal string organizationUrl;
136 | internal System.Guid clientId;
137 | internal string secret;
138 | internal Guid tenentid;
139 | }
140 | }
141 | }
142 |
--------------------------------------------------------------------------------
/Deploy/XrmOrganization/TokenHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Net;
5 | using System.Runtime.Serialization;
6 | using System.Runtime.Serialization.Json;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 |
10 | namespace Deploy.XrmOrganization
11 | {
12 | internal class TokenHelper
13 | {
14 | private Guid applicationId;
15 | private string secret;
16 | private string resourceUrl;
17 | private Guid tenentId;
18 |
19 | private string token;
20 | private DateTime expire;
21 |
22 | private string tokenUrl = "https://login.microsoftonline.com/{0}/oauth2/token";
23 |
24 | private static Dictionary helpers = new Dictionary();
25 |
26 | internal static TokenHelper GetTokenHelper(Guid applicationId, string secret, string resourceUrl, Guid tenentId)
27 | {
28 | lock (helpers)
29 | {
30 | if (helpers.ContainsKey(applicationId))
31 | {
32 | return helpers[applicationId];
33 | }
34 | var helper = new TokenHelper(applicationId, secret, resourceUrl, tenentId);
35 | helpers.Add(applicationId, helper);
36 | return helper;
37 | }
38 | }
39 |
40 | private TokenHelper(Guid applicationId, string secret, string resourceUrl, Guid tenentId)
41 | {
42 | this.applicationId = applicationId;
43 | this.secret = secret;
44 | this.resourceUrl = resourceUrl;
45 | this.tenentId = tenentId;
46 | }
47 |
48 | internal string GetToken()
49 | {
50 | if (!string.IsNullOrEmpty(token) && expire > System.DateTime.Now)
51 | {
52 | return this.token;
53 | }
54 |
55 | var client = WebRequest.Create(string.Format(this.tokenUrl, this.tenentId.ToString()));
56 |
57 | client.Method = "POST";
58 | client.ContentType = "application/x-www-form-urlencoded";
59 |
60 | using (var req = client.GetRequestStream())
61 | {
62 | var v = "grant_type=client_credentials&client_id=" + System.Web.HttpUtility.UrlEncode(this.applicationId.ToString()) + "&client_secret=" + System.Web.HttpUtility.UrlEncode(this.secret) + "&resource=" + System.Web.HttpUtility.UrlEncode(this.resourceUrl);
63 | var data = System.Text.Encoding.UTF8.GetBytes(v);
64 | req.Write(data, 0, data.Length);
65 |
66 | var resp = client.GetResponse();
67 | using (var result = resp.GetResponseStream())
68 | {
69 | var ser = new DataContractJsonSerializer(typeof(Token));
70 | var token = (Token)ser.ReadObject(result);
71 | this.token = token.access_token;
72 | this.expire = System.DateTime.Now.AddSeconds((Int32.Parse(token.expires_in) - 5));
73 | }
74 | }
75 | return this.token;
76 | }
77 |
78 | [DataContract]
79 | internal class Token
80 | {
81 | [DataMember]
82 | public string token_type { get; set; }
83 |
84 | [DataMember]
85 | public string expires_in { get; set; }
86 |
87 | [DataMember]
88 | public string ext_expires_in { get; set; }
89 |
90 | [DataMember]
91 | public string expires_on { get; set; }
92 |
93 | [DataMember]
94 | public string not_before { get; set; }
95 |
96 | [DataMember]
97 | public string resource { get; set; }
98 |
99 | [DataMember]
100 | public string access_token { get; set; }
101 | }
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/Deploy/demo/.angular-cli.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "project": {
4 | "name": "demo"
5 | },
6 | "apps": [
7 | {
8 | "root": "src",
9 | "outDir": "dist",
10 | "assets": [
11 | "assets",
12 | "favicon.ico"
13 | ],
14 | "index": "index.html",
15 | "main": "main.ts",
16 | "polyfills": "polyfills.ts",
17 | "test": "test.ts",
18 | "tsconfig": "tsconfig.app.json",
19 | "testTsconfig": "tsconfig.spec.json",
20 | "prefix": "app",
21 | "styles": [
22 | "styles.css"
23 | ],
24 | "scripts": [],
25 | "environmentSource": "environments/environment.ts",
26 | "environments": {
27 | "dev": "environments/environment.ts",
28 | "prod": "environments/environment.prod.ts"
29 | }
30 | }
31 | ],
32 | "e2e": {
33 | "protractor": {
34 | "config": "./protractor.conf.js"
35 | }
36 | },
37 | "lint": [
38 | {
39 | "project": "src/tsconfig.app.json"
40 | },
41 | {
42 | "project": "src/tsconfig.spec.json"
43 | },
44 | {
45 | "project": "e2e/tsconfig.e2e.json"
46 | }
47 | ],
48 | "test": {
49 | "karma": {
50 | "config": "./karma.conf.js"
51 | }
52 | },
53 | "defaults": {
54 | "styleExt": "css",
55 | "component": {}
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/Deploy/demo/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/Deploy/demo/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/Deploy/demo/README.md:
--------------------------------------------------------------------------------
1 | # Demo
2 |
3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.0.4.
4 |
5 | ## Development server
6 |
7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8 |
9 | ## Code scaffolding
10 |
11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|module`.
12 |
13 | ## Build
14 |
15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
16 |
17 | ## Running unit tests
18 |
19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20 |
21 | ## Running end-to-end tests
22 |
23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
24 | Before running the tests make sure you are serving the app via `ng serve`.
25 |
26 | ## Further help
27 |
28 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
29 |
--------------------------------------------------------------------------------
/Deploy/demo/deploy.cmd:
--------------------------------------------------------------------------------
1 | call ng build --prod --output-hashing none
2 | call del dist\*.txt
3 | call del dist\*.map
4 | call "F:\Projects\OpenSource\Kipon.Angular.Xrm.WebResource\Deploy\bin\Debug\Deploy.exe"
5 |
--------------------------------------------------------------------------------
/Deploy/demo/e2e/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { DemoPage } from './app.po';
2 |
3 | describe('demo App', () => {
4 | let page: DemoPage;
5 |
6 | beforeEach(() => {
7 | page = new DemoPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/Deploy/demo/e2e/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, by, element } from 'protractor';
2 |
3 | export class DemoPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Deploy/demo/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types": [
8 | "jasmine",
9 | "node"
10 | ]
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Deploy/demo/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration file, see link for more information
2 | // https://karma-runner.github.io/0.13/config/configuration-file.html
3 |
4 | module.exports = function (config) {
5 | config.set({
6 | basePath: '',
7 | frameworks: ['jasmine', '@angular/cli'],
8 | plugins: [
9 | require('karma-jasmine'),
10 | require('karma-chrome-launcher'),
11 | require('karma-jasmine-html-reporter'),
12 | require('karma-coverage-istanbul-reporter'),
13 | require('@angular/cli/plugins/karma')
14 | ],
15 | client:{
16 | clearContext: false // leave Jasmine Spec Runner output visible in browser
17 | },
18 | files: [
19 | { pattern: './src/test.ts', watched: false }
20 | ],
21 | preprocessors: {
22 | './src/test.ts': ['@angular/cli']
23 | },
24 | mime: {
25 | 'text/x-typescript': ['ts','tsx']
26 | },
27 | coverageIstanbulReporter: {
28 | reports: [ 'html', 'lcovonly' ],
29 | fixWebpackSourcePaths: true
30 | },
31 | angularCli: {
32 | environment: 'dev'
33 | },
34 | reporters: config.angularCli && config.angularCli.codeCoverage
35 | ? ['progress', 'coverage-istanbul']
36 | : ['progress', 'kjhtml'],
37 | port: 9876,
38 | colors: true,
39 | logLevel: config.LOG_INFO,
40 | autoWatch: true,
41 | browsers: ['Chrome'],
42 | singleRun: false
43 | });
44 | };
45 |
--------------------------------------------------------------------------------
/Deploy/demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "demo",
3 | "version": "0.0.0",
4 | "license": "MIT",
5 | "scripts": {
6 | "ng": "ng",
7 | "start": "ng serve",
8 | "build": "ng build",
9 | "test": "ng test",
10 | "lint": "ng lint",
11 | "e2e": "ng e2e"
12 | },
13 | "private": true,
14 | "dependencies": {
15 | "@angular/common": "^4.0.0",
16 | "@angular/compiler": "^4.0.0",
17 | "@angular/core": "^4.0.0",
18 | "@angular/forms": "^4.0.0",
19 | "@angular/http": "^4.0.0",
20 | "@angular/platform-browser": "^4.0.0",
21 | "@angular/platform-browser-dynamic": "^4.0.0",
22 | "@angular/router": "^4.0.0",
23 | "classlist.js": "^1.1.20150312",
24 | "core-js": "^2.4.1",
25 | "intl": "^1.2.5",
26 | "rxjs": "^5.1.0",
27 | "web-animations-js": "^2.2.5",
28 | "zone.js": "^0.8.4"
29 | },
30 | "devDependencies": {
31 | "@angular/cli": "1.0.4",
32 | "@angular/compiler-cli": "^4.0.0",
33 | "@types/jasmine": "2.5.38",
34 | "@types/node": "~6.0.60",
35 | "codelyzer": "~2.0.0",
36 | "jasmine-core": "~2.5.2",
37 | "jasmine-spec-reporter": "~3.2.0",
38 | "karma": "~1.4.1",
39 | "karma-chrome-launcher": "~2.1.1",
40 | "karma-cli": "~1.0.1",
41 | "karma-jasmine": "~1.1.0",
42 | "karma-jasmine-html-reporter": "^0.2.2",
43 | "karma-coverage-istanbul-reporter": "^0.2.0",
44 | "protractor": "~5.1.0",
45 | "ts-node": "~2.0.0",
46 | "tslint": "~4.5.0",
47 | "typescript": "~2.2.0"
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Deploy/demo/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | const { SpecReporter } = require('jasmine-spec-reporter');
5 |
6 | exports.config = {
7 | allScriptsTimeout: 11000,
8 | specs: [
9 | './e2e/**/*.e2e-spec.ts'
10 | ],
11 | capabilities: {
12 | 'browserName': 'chrome'
13 | },
14 | directConnect: true,
15 | baseUrl: 'http://localhost:4200/',
16 | framework: 'jasmine',
17 | jasmineNodeOpts: {
18 | showColors: true,
19 | defaultTimeoutInterval: 30000,
20 | print: function() {}
21 | },
22 | onPrepare() {
23 | require('ts-node').register({
24 | project: 'e2e/tsconfig.e2e.json'
25 | });
26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/Deploy/demo/proxy-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "/api/*": {
3 | "target": "http://kipon-dev/kip",
4 | "secure": false,
5 | "changeOrigin": true,
6 | "logLevel": "debug",
7 | "auth": "auser:#aVerySecretPassword!"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Deploy/demo/src/app/app.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kip-dk/angular-xrm-webresource/0480f880b1e3db9d1fe0e19fd707c75772995d66/Deploy/demo/src/app/app.component.css
--------------------------------------------------------------------------------
/Deploy/demo/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 | {{title}} number of accounts {{accounts.length}}
3 |
4 |
--------------------------------------------------------------------------------
/Deploy/demo/src/app/app.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { TestBed, async } from '@angular/core/testing';
2 |
3 | import { AppComponent } from './app.component';
4 |
5 | describe('AppComponent', () => {
6 | beforeEach(async(() => {
7 | TestBed.configureTestingModule({
8 | declarations: [
9 | AppComponent
10 | ],
11 | }).compileComponents();
12 | }));
13 |
14 | it('should create the app', async(() => {
15 | const fixture = TestBed.createComponent(AppComponent);
16 | const app = fixture.debugElement.componentInstance;
17 | expect(app).toBeTruthy();
18 | }));
19 |
20 | it(`should have as title 'app works!'`, async(() => {
21 | const fixture = TestBed.createComponent(AppComponent);
22 | const app = fixture.debugElement.componentInstance;
23 | expect(app.title).toEqual('app works!');
24 | }));
25 |
26 | it('should render title in a h1 tag', async(() => {
27 | const fixture = TestBed.createComponent(AppComponent);
28 | fixture.detectChanges();
29 | const compiled = fixture.debugElement.nativeElement;
30 | expect(compiled.querySelector('h1').textContent).toContain('app works!');
31 | }));
32 | });
33 |
--------------------------------------------------------------------------------
/Deploy/demo/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { XrmService, Entity } from './shared/xrm.service'
3 |
4 |
5 | @Component({
6 | selector: 'app-root',
7 | templateUrl: './app.component.html',
8 | styleUrls: ['./app.component.css']
9 | })
10 | export class AppComponent {
11 | errorMessage: string = null;
12 | accounts: Entity[] = [];
13 |
14 | constructor(private xrmService: XrmService) {
15 |
16 | }
17 |
18 | ngOnInit() {
19 | this.xrmService.search("accounts", "name", null)
20 | .subscribe(entities => this.accounts = entities, error => this.errorMessage = error);
21 | }
22 |
23 |
24 | title = 'app works!';
25 | }
26 |
--------------------------------------------------------------------------------
/Deploy/demo/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { BrowserModule } from '@angular/platform-browser';
2 | import { NgModule } from '@angular/core';
3 | import { FormsModule } from '@angular/forms';
4 | import { HttpModule } from '@angular/http';
5 |
6 | import { XrmService } from './shared/xrm.service';
7 | import { AppComponent } from './app.component';
8 |
9 |
10 | @NgModule({
11 | declarations: [
12 | AppComponent
13 | ],
14 | imports: [
15 | BrowserModule,
16 | FormsModule,
17 | HttpModule
18 | ],
19 | providers: [XrmService],
20 | bootstrap: [AppComponent]
21 | })
22 | export class AppModule { }
23 |
--------------------------------------------------------------------------------
/Deploy/demo/src/app/shared/xrm.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { Http, Response, Headers, RequestOptions } from '@angular/http';
3 |
4 | import { Observable } from 'rxjs/Observable';
5 | import 'rxjs/add/operator/catch';
6 | import 'rxjs/add/operator/map';
7 |
8 |
9 | interface XrmContext {
10 | getClientUrl(): string;
11 | }
12 |
13 | interface SearchResult {
14 | value: Entity[]
15 | }
16 |
17 | export interface Entity {
18 |
19 | }
20 |
21 | @Injectable()
22 | export class XrmService {
23 |
24 | constructor(private http: Http) { }
25 |
26 | private apiUrl = '/api/data/v8.2/';
27 |
28 | getClientUrl() {
29 | if (window.parent != null && window.parent['Xrm'] != null) {
30 | var x = window.parent["Xrm"]["Page"]["context"] as XrmContext;
31 | if (x != null) {
32 | return x.getClientUrl();
33 | }
34 | }
35 | // fallback for development environment
36 | return "http://localhost:4200";
37 | }
38 |
39 | search(entityType: string, columns: string, filter: string): Observable {
40 |
41 | let headers = new Headers({ 'Accept': 'application/json' });
42 | headers.append("OData-MaxVersion", "4.0");
43 | headers.append("OData-Version", "4.0");
44 |
45 | let options = new RequestOptions({ headers: headers });
46 |
47 | return this.http.get(this.getClientUrl() + this.apiUrl + entityType + "?$select=" + columns, options)
48 | .map(this.extractSearchResult)
49 | .catch(this.handleError);
50 | }
51 |
52 | private extractSearchResult(res: Response) {
53 | let body = res.json() as SearchResult;
54 | return body.value;
55 | }
56 |
57 | private handleError(error: Response | any) {
58 | // In a real world app, you might use a remote logging infrastructure
59 | let errMsg: string;
60 | if (error instanceof Response) {
61 | const body = error.json() || '';
62 | const err = body.error || JSON.stringify(body);
63 | errMsg = `${error.status} - ${error.statusText || ''} ${err}`;
64 | } else {
65 | errMsg = error.message ? error.message : error.toString();
66 | }
67 | console.error(errMsg);
68 | return Observable.throw(errMsg);
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/Deploy/demo/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kip-dk/angular-xrm-webresource/0480f880b1e3db9d1fe0e19fd707c75772995d66/Deploy/demo/src/assets/.gitkeep
--------------------------------------------------------------------------------
/Deploy/demo/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/Deploy/demo/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/Deploy/demo/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kip-dk/angular-xrm-webresource/0480f880b1e3db9d1fe0e19fd707c75772995d66/Deploy/demo/src/favicon.ico
--------------------------------------------------------------------------------
/Deploy/demo/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Demo
6 |
7 |
8 |
9 |
10 |
11 | Loading...
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Deploy/demo/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule);
12 |
--------------------------------------------------------------------------------
/Deploy/demo/src/polyfills.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * This file includes polyfills needed by Angular and is loaded before the app.
3 | * You can add your own extra polyfills to this file.
4 | *
5 | * This file is divided into 2 sections:
6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8 | * file.
9 | *
10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13 | *
14 | * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
15 | */
16 |
17 | /***************************************************************************************************
18 | * BROWSER POLYFILLS
19 | */
20 |
21 | /** IE9, IE10 and IE11 requires all of the following polyfills. **/
22 | import 'core-js/es6/symbol';
23 | import 'core-js/es6/object';
24 | import 'core-js/es6/function';
25 | import 'core-js/es6/parse-int';
26 | import 'core-js/es6/parse-float';
27 | import 'core-js/es6/number';
28 | import 'core-js/es6/math';
29 | import 'core-js/es6/string';
30 | import 'core-js/es6/date';
31 | import 'core-js/es6/array';
32 | import 'core-js/es6/regexp';
33 | import 'core-js/es6/map';
34 | import 'core-js/es6/set';
35 |
36 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */
37 | import 'classlist.js'; // Run `npm install --save classlist.js`.
38 |
39 | /** IE10 and IE11 requires the following to support `@angular/animation`. */
40 | import 'web-animations-js'; // Run `npm install --save web-animations-js`.
41 |
42 |
43 | /** Evergreen browsers require these. **/
44 | import 'core-js/es6/reflect';
45 | import 'core-js/es7/reflect';
46 |
47 |
48 | /** ALL Firefox browsers require the following to support `@angular/animation`. **/
49 | import 'web-animations-js'; // Run `npm install --save web-animations-js`.
50 |
51 |
52 |
53 | /***************************************************************************************************
54 | * Zone JS is required by Angular itself.
55 | */
56 | import 'zone.js/dist/zone'; // Included with Angular CLI.
57 |
58 |
59 |
60 | /***************************************************************************************************
61 | * APPLICATION IMPORTS
62 | */
63 |
64 | /**
65 | * Date, currency, decimal and percent pipes.
66 | * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
67 | */
68 | import 'intl'; // Run `npm install --save intl`.
69 | /**
70 | * Need to import at least one locale-data with intl.
71 | */
72 | import 'intl/locale-data/jsonp/en';
73 |
--------------------------------------------------------------------------------
/Deploy/demo/src/styles.css:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 |
--------------------------------------------------------------------------------
/Deploy/demo/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/dist/long-stack-trace-zone';
4 | import 'zone.js/dist/proxy.js';
5 | import 'zone.js/dist/sync-test';
6 | import 'zone.js/dist/jasmine-patch';
7 | import 'zone.js/dist/async-test';
8 | import 'zone.js/dist/fake-async-test';
9 | import { getTestBed } from '@angular/core/testing';
10 | import {
11 | BrowserDynamicTestingModule,
12 | platformBrowserDynamicTesting
13 | } from '@angular/platform-browser-dynamic/testing';
14 |
15 | // Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
16 | declare var __karma__: any;
17 | declare var require: any;
18 |
19 | // Prevent Karma from running prematurely.
20 | __karma__.loaded = function () {};
21 |
22 | // First, initialize the Angular testing environment.
23 | getTestBed().initTestEnvironment(
24 | BrowserDynamicTestingModule,
25 | platformBrowserDynamicTesting()
26 | );
27 | // Then we find all the tests.
28 | const context = require.context('./', true, /\.spec\.ts$/);
29 | // And load the modules.
30 | context.keys().map(context);
31 | // Finally, start Karma to run the tests.
32 | __karma__.start();
33 |
--------------------------------------------------------------------------------
/Deploy/demo/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "es2015",
6 | "baseUrl": "",
7 | "types": []
8 | },
9 | "exclude": [
10 | "test.ts",
11 | "**/*.spec.ts"
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/Deploy/demo/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "baseUrl": "",
8 | "types": [
9 | "jasmine",
10 | "node"
11 | ]
12 | },
13 | "files": [
14 | "test.ts"
15 | ],
16 | "include": [
17 | "**/*.spec.ts",
18 | "**/*.d.ts"
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/Deploy/demo/src/typings.d.ts:
--------------------------------------------------------------------------------
1 | /* SystemJS module definition */
2 | declare var module: NodeModule;
3 | interface NodeModule {
4 | id: string;
5 | }
6 |
--------------------------------------------------------------------------------
/Deploy/demo/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "outDir": "./dist/out-tsc",
5 | "baseUrl": "src",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "moduleResolution": "node",
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "node_modules/@types"
14 | ],
15 | "lib": [
16 | "es2016",
17 | "dom"
18 | ]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Deploy/demo/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rulesDirectory": [
3 | "node_modules/codelyzer"
4 | ],
5 | "rules": {
6 | "callable-types": true,
7 | "class-name": true,
8 | "comment-format": [
9 | true,
10 | "check-space"
11 | ],
12 | "curly": true,
13 | "eofline": true,
14 | "forin": true,
15 | "import-blacklist": [
16 | true,
17 | "rxjs"
18 | ],
19 | "import-spacing": true,
20 | "indent": [
21 | true,
22 | "spaces"
23 | ],
24 | "interface-over-type-literal": true,
25 | "label-position": true,
26 | "max-line-length": [
27 | true,
28 | 140
29 | ],
30 | "member-access": false,
31 | "member-ordering": [
32 | true,
33 | "static-before-instance",
34 | "variables-before-functions"
35 | ],
36 | "no-arg": true,
37 | "no-bitwise": true,
38 | "no-console": [
39 | true,
40 | "debug",
41 | "info",
42 | "time",
43 | "timeEnd",
44 | "trace"
45 | ],
46 | "no-construct": true,
47 | "no-debugger": true,
48 | "no-empty": false,
49 | "no-empty-interface": true,
50 | "no-eval": true,
51 | "no-inferrable-types": [
52 | true,
53 | "ignore-params"
54 | ],
55 | "no-shadowed-variable": true,
56 | "no-string-literal": false,
57 | "no-string-throw": true,
58 | "no-switch-case-fall-through": true,
59 | "no-trailing-whitespace": true,
60 | "no-unused-expression": true,
61 | "no-use-before-declare": true,
62 | "no-var-keyword": true,
63 | "object-literal-sort-keys": false,
64 | "one-line": [
65 | true,
66 | "check-open-brace",
67 | "check-catch",
68 | "check-else",
69 | "check-whitespace"
70 | ],
71 | "prefer-const": true,
72 | "quotemark": [
73 | true,
74 | "single"
75 | ],
76 | "radix": true,
77 | "semicolon": [
78 | "always"
79 | ],
80 | "triple-equals": [
81 | true,
82 | "allow-null-check"
83 | ],
84 | "typedef-whitespace": [
85 | true,
86 | {
87 | "call-signature": "nospace",
88 | "index-signature": "nospace",
89 | "parameter": "nospace",
90 | "property-declaration": "nospace",
91 | "variable-declaration": "nospace"
92 | }
93 | ],
94 | "typeof-compare": true,
95 | "unified-signatures": true,
96 | "variable-name": false,
97 | "whitespace": [
98 | true,
99 | "check-branch",
100 | "check-decl",
101 | "check-operator",
102 | "check-separator",
103 | "check-type"
104 | ],
105 | "directive-selector": [
106 | true,
107 | "attribute",
108 | "app",
109 | "camelCase"
110 | ],
111 | "component-selector": [
112 | true,
113 | "element",
114 | "app",
115 | "kebab-case"
116 | ],
117 | "use-input-property-decorator": true,
118 | "use-output-property-decorator": true,
119 | "use-host-property-decorator": true,
120 | "no-input-rename": true,
121 | "no-output-rename": true,
122 | "use-life-cycle-interface": true,
123 | "use-pipe-transform-interface": true,
124 | "component-class-suffix": true,
125 | "directive-class-suffix": true,
126 | "no-access-missing-member": true,
127 | "templates-use-public": true,
128 | "invoke-injectable": true
129 | }
130 | }
131 |
--------------------------------------------------------------------------------
/Deploy/demo/xrm.deploy.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "solution": "Angular4Demo",
4 | "name": "demo",
5 | "dist": "dist",
6 | "url": "http://kipon-dev/kip/XRMServices/2011/Organization.svc",
7 | "user": "demo",
8 | "password": "aVerySecretPassword",
9 | "routes": [
10 | "",
11 | "some/route",
12 | "some/other/route"
13 | ]
14 | }
15 | ]
16 |
--------------------------------------------------------------------------------
/Deploy/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Documentation/angular-first-build.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kip-dk/angular-xrm-webresource/0480f880b1e3db9d1fe0e19fd707c75772995d66/Documentation/angular-first-build.png
--------------------------------------------------------------------------------
/Documentation/angular-running-in-dynamic-ie.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kip-dk/angular-xrm-webresource/0480f880b1e3db9d1fe0e19fd707c75772995d66/Documentation/angular-running-in-dynamic-ie.png
--------------------------------------------------------------------------------
/Documentation/angular-running-in-dynamic-with-count.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kip-dk/angular-xrm-webresource/0480f880b1e3db9d1fe0e19fd707c75772995d66/Documentation/angular-running-in-dynamic-with-count.png
--------------------------------------------------------------------------------
/Documentation/angular-running-in-dynamic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kip-dk/angular-xrm-webresource/0480f880b1e3db9d1fe0e19fd707c75772995d66/Documentation/angular-running-in-dynamic.png
--------------------------------------------------------------------------------
/Documentation/angular-serve-xrm-service.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kip-dk/angular-xrm-webresource/0480f880b1e3db9d1fe0e19fd707c75772995d66/Documentation/angular-serve-xrm-service.png
--------------------------------------------------------------------------------
/Documentation/enable-basic-authentication.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kip-dk/angular-xrm-webresource/0480f880b1e3db9d1fe0e19fd707c75772995d66/Documentation/enable-basic-authentication.png
--------------------------------------------------------------------------------
/Documentation/solution-add-angular-application.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kip-dk/angular-xrm-webresource/0480f880b1e3db9d1fe0e19fd707c75772995d66/Documentation/solution-add-angular-application.png
--------------------------------------------------------------------------------
/Documentation/xrm-deploy-result.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kip-dk/angular-xrm-webresource/0480f880b1e3db9d1fe0e19fd707c75772995d66/Documentation/xrm-deploy-result.png
--------------------------------------------------------------------------------
/Documentation/xrm-deploy-solution-result.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kip-dk/angular-xrm-webresource/0480f880b1e3db9d1fe0e19fd707c75772995d66/Documentation/xrm-deploy-solution-result.png
--------------------------------------------------------------------------------
/Documentation/xrm-sdk-assemblies.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kip-dk/angular-xrm-webresource/0480f880b1e3db9d1fe0e19fd707c75772995d66/Documentation/xrm-sdk-assemblies.png
--------------------------------------------------------------------------------
/Kipon.Angular.Xrm.WebResource.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26228.10
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Deploy", "Deploy\Deploy.csproj", "{102002FC-E3ED-40C4-9B05-DB2B8749F3A6}"
7 | EndProject
8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A6B0B2A7-69CE-49B1-8772-D18508D35F02}"
9 | ProjectSection(SolutionItems) = preProject
10 | CHANGELOG.md = CHANGELOG.md
11 | README.md = README.md
12 | EndProjectSection
13 | EndProject
14 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Documentation", "Documentation", "{9E7398AE-2E27-46D1-8C07-BD9F08BE06A5}"
15 | ProjectSection(SolutionItems) = preProject
16 | Documentation\angular-first-build.png = Documentation\angular-first-build.png
17 | Documentation\angular-running-in-dynamic-with-count.png = Documentation\angular-running-in-dynamic-with-count.png
18 | Documentation\angular-running-in-dynamic.png = Documentation\angular-running-in-dynamic.png
19 | Documentation\angular-serve-xrm-service.png = Documentation\angular-serve-xrm-service.png
20 | Documentation\enable-basic-authentication.png = Documentation\enable-basic-authentication.png
21 | Documentation\solution-add-angular-application.png = Documentation\solution-add-angular-application.png
22 | Documentation\xrm-deploy-result.png = Documentation\xrm-deploy-result.png
23 | Documentation\xrm-deploy-solution-result.png = Documentation\xrm-deploy-solution-result.png
24 | Documentation\xrm-sdk-assemblies.png = Documentation\xrm-sdk-assemblies.png
25 | EndProjectSection
26 | EndProject
27 | Global
28 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
29 | Debug|Any CPU = Debug|Any CPU
30 | Release|Any CPU = Release|Any CPU
31 | EndGlobalSection
32 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
33 | {102002FC-E3ED-40C4-9B05-DB2B8749F3A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34 | {102002FC-E3ED-40C4-9B05-DB2B8749F3A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
35 | {102002FC-E3ED-40C4-9B05-DB2B8749F3A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
36 | {102002FC-E3ED-40C4-9B05-DB2B8749F3A6}.Release|Any CPU.Build.0 = Release|Any CPU
37 | EndGlobalSection
38 | GlobalSection(SolutionProperties) = preSolution
39 | HideSolutionNode = FALSE
40 | EndGlobalSection
41 | EndGlobal
42 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Kipon ApS
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kip-dk/angular-xrm-webresource/0480f880b1e3db9d1fe0e19fd707c75772995d66/README.md
--------------------------------------------------------------------------------