/
gd-sprest.js
1661 lines (1252 loc) · 523 KB
/
gd-sprest.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ({
/***/ "./build/helper/app.js":
/*!*****************************!*\
!*** ./build/helper/app.js ***!
\*****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ../lib */ \"./build/lib/index.js\");\n/**\r\n * App Helper Methods\r\n * Helper methods designed to be run from the app web.\r\n */\nexports.App = {\n // Method to copy a file in this app web to the host web\n copyFileToHostWeb: function copyFileToHostWeb(fileUrl, dstFolder, overwriteFl, rootWebFl) {\n var srcFile = null;\n var origVal = lib_1.ContextInfo.window.$REST.DefaultRequestToHostFl;\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Ensure the current web is an app web\n if (!lib_1.ContextInfo.isAppWeb) {\n // Error\n console.error(\"[gd-sprest] The current web is not an app web.\");\n reject();\n return;\n }\n // Get the host web\n lib_1.ContextInfo.window.$REST.DefaultRequestToHostFl = true;\n var web = lib_1.Web(rootWebFl ? lib_1.ContextInfo.siteServerRelativeUrl : null);\n // See if the folder url was given\n if (typeof dstFolder === \"string\") {\n // Get the folder\n exports.App.getFolder(web, dstFolder, true).then(function (folder) {\n // Copy the file to the host web\n exports.App.copyFileToHostWeb(fileUrl, folder, overwriteFl)\n // Wait for the request to complete, and resolve the promise\n .then(function (_a) {\n var file = _a.file,\n folder = _a.folder;\n resolve({ file: file, folder: folder });\n });\n });\n } else {\n // Get the file name\n var fileName = fileUrl.split(\"/\");\n fileName = fileName[fileName.length - 1];\n // Set the file urls\n var dstFileUrl = lib_1.ContextInfo.window.SP.Utilities.UrlBuilder.urlCombine(dstFolder.ServerRelativeUrl, fileName);\n var srcFileUrl_1 = lib_1.ContextInfo.window.SP.Utilities.UrlBuilder.urlCombine(lib_1.ContextInfo.webServerRelativeUrl, fileUrl.substr(fileUrl[0] == \"/\" ? 1 : 0));\n // Get the destination file\n web.getFileByServerRelativeUrl(dstFileUrl)\n // Execute the request\n .execute(function (file) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // See if the file exists\n if (file.Exists) {\n // Check out the file, and resolve the promise\n file.checkout().execute(resolve);\n } else {\n // Resolve the promise\n resolve();\n }\n });\n });\n // Target the current web\n lib_1.ContextInfo.window.$REST.DefaultRequestToHostFl = false;\n // Get the current web\n lib_1.Web().getFileByServerRelativeUrl(srcFileUrl_1)\n // Get the content\n .content()\n // Execute the request\n .execute(function (content) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Get the file name\n var fileName = srcFileUrl_1.split(\"/\");\n fileName = fileName[fileName.length - 1];\n // Target the host web\n lib_1.ContextInfo.window.$REST.DefaultRequestToHostFl = true;\n // Add the file to the folder\n dstFolder.Files().add(true, fileName, content)\n // Execute the request\n .execute(function (file) {\n // Save a reference to this file\n srcFile = file;\n // Check in the file\n file.checkin(\"\", 1).execute();\n // Publish the file\n file.publish(\"\").execute(true);\n // Wait for the requests to complete\n file.done(function () {\n // Resolve the promise\n resolve();\n });\n });\n });\n }, true);\n // Wait for the requests to complete, and resolve the promise\n web.done(function () {\n resolve({ file: srcFile, folder: dstFolder });\n });\n }\n });\n },\n // Method to copy a file in this app web to the host web\n copyFilesToHostWeb: function copyFilesToHostWeb(fileUrls, folderUrls, overwriteFl, rootWebFl) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n var request = function request(files, folders, idx) {\n // Ensure the array is not empty\n if (fileUrls.length == idx || folderUrls.length == idx) {\n // Resolve the promise and return it\n resolve({ files: files, folders: folders });\n return;\n }\n // Copy the file\n exports.App.copyFileToHostWeb(fileUrls[idx], folderUrls[idx], overwriteFl, rootWebFl)\n // Wait for it to complete\n .then(function (_a) {\n var file = _a.file,\n folder = _a.folder;\n // Save a reference to the file and folder\n files.push(file);\n folders.push(folder);\n // Copy the files\n request(files, folders, ++idx);\n });\n };\n // Execute the request\n request([], [], 0);\n });\n },\n // Method to create sub-folders\n createSubFolders: function createSubFolders(folder, subFolderUrl) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n var request = function request(resolve) {\n // Get the sub-folder name\n var subFolderName = subFolderUrl.split(\"/\")[0];\n // Update the sub folder url\n subFolderUrl = subFolderUrl.substr(subFolderName.length + 1);\n // Get the sub-folder\n var subFolder = folder.Folders(subFolderName).execute(function (subFolder) {\n // Method to add additional sub folders\n var addSubFolders = function addSubFolders(subFolder) {\n // See if we are done\n if (subFolderUrl.length == 0) {\n // Resolve the promise\n resolve(subFolder);\n } else {\n // Create the sub folder\n request(resolve);\n }\n };\n // Ensure the sub-folder exists\n if (subFolder.Exists) {\n // Add the rest of the sub folders\n addSubFolders(subFolder);\n } else {\n // Create the sub folder\n folder.Folders().add(subFolderName).execute(addSubFolders);\n }\n });\n };\n // Execute the request\n request(resolve);\n });\n },\n // Method to get a folder\n getFolder: function getFolder(web, folderUrl, createFl) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n var dstFolder = null;\n // Ensure the web exists\n if (!web.existsFl) {\n // Get the web\n web.execute();\n }\n // Wait for the requests to complete\n web.done(function () {\n // Set the destination folder url\n var dstFolderUrl = lib_1.ContextInfo.window.SP.Utilities.UrlBuilder.urlCombine(web.ServerRelativeUrl, folderUrl.substr(folderUrl[0] == \"/\" ? 1 : 0));\n // Get the folder\n web.getFolderByServerRelativeUrl(folderUrl)\n // Execute the request\n .execute(function (folder) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Ensure the folder exists\n if (folder.Exists) {\n // Save a reference to the folder\n dstFolder = folder;\n // Resolve the promise\n resolve();\n } else {\n // Create the folder\n exports.App.createSubFolders(web.RootFolder(), folderUrl).then(function (folder) {\n // Save a reference to the folder\n dstFolder = folder;\n // Resolve the promise\n resolve();\n });\n }\n });\n }, true);\n // Wait for the request to complete\n web.done(function () {\n // Resolve the promise\n resolve(dstFolder);\n });\n });\n });\n },\n // Method to remove empty folders\n removeEmptyFolders: function removeEmptyFolders(web, folderUrls) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Ensure folder urls exist\n if (folderUrls.length == 0) {\n // Resolve the promise and return it\n resolve();\n } else {\n var prevFolderUrl = null;\n // Sort the urls alphabetically, then from longest to shortest\n folderUrls.sort().sort(function (a, b) {\n return a.length > b.length ? -1 : 1;\n });\n // Parse the folders\n for (var _i = 0, folderUrls_1 = folderUrls; _i < folderUrls_1.length; _i++) {\n var folderUrl = folderUrls_1[_i];\n var folder = null;\n // See if we already removed this folder\n if (folderUrl == prevFolderUrl) {\n continue;\n } else {\n prevFolderUrl = folderUrl;\n }\n // Parse the folder names\n var folderNames = folderUrl.split('/');\n for (var _a = 0, folderNames_1 = folderNames; _a < folderNames_1.length; _a++) {\n var folderName = folderNames_1[_a];\n // Get the sub-folder\n folder = folder ? folder.Folders(folderName) : web.Folders(folderName);\n }\n // Execute the request\n folder.execute(function (folder) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // See if the folder is empty\n if (folder.ItemCount == 0) {\n // Delete the folder, and resolve the promise\n folder.delete().execute(resolve);\n } else {\n // Resolve the promise\n resolve();\n }\n });\n }, true);\n }\n // Wait for the requests to complete, and resolve the promise\n web.done(function () {\n resolve();\n });\n }\n });\n },\n // Method to remove a file\n removeFile: function removeFile(web, fileUrl) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n var folder = null;\n var folders = fileUrl.split('/');\n // Parse the folders\n for (var i = 0; i < folders.length - 1; i++) {\n // Get the folder\n folder = folder ? folder.Folders(folders[i]) : web.Folders(folders[i]);\n }\n // Get the file\n folder.Files(folders[folders.length - 1]).execute(function (file) {\n // See if it exists\n if (file.Exists) {\n // Delete it and resolve the promise\n file.delete().execute(resolve);\n } else {\n // Resolve the promise\n resolve();\n }\n }, true);\n });\n },\n // Method to remove files\n removeFiles: function removeFiles(web, fileUrls, idx) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n var request = function request(idx, resolve) {\n // See if we have removed all files\n if (fileUrls.length == idx) {\n // Resolve the promise and return it\n resolve();\n } else {\n // Remove the file\n exports.App.removeFile(web, fileUrls[idx]).then(function () {\n // Remove the files\n request(++idx, resolve);\n });\n }\n };\n // Execute the request\n request(0, resolve);\n });\n }\n};\n\n//# sourceURL=webpack:///./build/helper/app.js?");
/***/ }),
/***/ "./build/helper/dependencies.js":
/*!**************************************!*\
!*** ./build/helper/dependencies.js ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ../lib */ \"./build/lib/index.js\");\n/**\r\n * Dependencies\r\n * This class will ensure the core SP scripts are loaded on the page.\r\n */\nvar _Dependencies = /** @class */function () {\n /**\r\n * Constructor\r\n * @param callback - The method to execute after the scripts have been loaded.\r\n */\n function _Dependencies(callback) {\n this._callback = null;\n // Default the properties\n this._callback = callback;\n this.MAX_WAIT = 5;\n this.SCRIPTS = [\"MicrosoftAjax.js\", \"init.js\", \"sp.runtime.js\", \"sp.js\", \"sp.core.js\", \"core.js\"];\n // Load the dependencies\n this.loadDependencies();\n }\n Object.defineProperty(_Dependencies.prototype, \"pageContextExistsFl\", {\n get: function get() {\n return lib_1.ContextInfo.webAbsoluteUrl != \"\";\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Method to ensure the SP classes are loaded\r\n */\n _Dependencies.prototype.loadDependencies = function () {\n // See if the page context exists\n if (this.pageContextExistsFl) {\n // Call the callback event\n this._callback ? this._callback() : null;\n } else {\n // Load the required scripts\n for (var fileName in this.SCRIPTS) {\n // Create the script element\n var elScript = lib_1.ContextInfo.document.createElement(\"script\");\n // Set the properties\n elScript.setAttribute(\"src\", \"/_layouts/15/\" + fileName);\n elScript.setAttribute(\"type\", \"text/javascript\");\n // Add the script element to the head\n lib_1.ContextInfo.document.head.appendChild(elScript);\n }\n // Wait for the page context to exist\n this.waitForPageContext();\n }\n };\n /**\r\n * Method to wait for the page context to be loaded\r\n */\n _Dependencies.prototype.waitForPageContext = function () {\n var counter = 0;\n // Check every 10ms\n var intervalId = lib_1.ContextInfo.window.setInterval(function () {\n // See if the page context exists, and ensure we haven't hit the max attempts\n if (this.pageContextExists || ++counter >= this.MAX_WAIT) {\n // Clear the interval\n lib_1.ContextInfo.window.clearInterval(intervalId);\n // Call the callback event\n this._callback ? this._callback() : null;\n }\n }, 10);\n };\n return _Dependencies;\n}();\nexports.Dependencies = _Dependencies;\n\n//# sourceURL=webpack:///./build/helper/dependencies.js?");
/***/ }),
/***/ "./build/helper/executor.js":
/*!**********************************!*\
!*** ./build/helper/executor.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\r\n * Executor\r\n * @param methodParams - An array of parameters to execute in order synchronously.\r\n * @param method - The method to execute for each method parameter provided.\r\n * @param onExecuted - An optional event executed after the method completes. If a promise is returned, the executor will wait until it's resolved.\r\n */\nfunction Executor(methodParams, method, onExecuted) {\n var _this = this;\n if (methodParams === void 0) {\n methodParams = [];\n }\n var _completedFl = false;\n var _resolve = null;\n // Method to execute the methods\n var executeMethods = function executeMethods(idx) {\n if (idx === void 0) {\n idx = 0;\n }\n // Execute the method and see if a promise is returned\n var returnVal = idx < methodParams.length ? method(methodParams[idx]) : null;\n if (returnVal && returnVal.then) {\n // Wait for the method to complete\n returnVal.then(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // See if the on executed event exists\n if (onExecuted) {\n // Execute the method and see if a promise is returned\n var returnVal_1 = onExecuted.apply(_this, args);\n if (returnVal_1 && returnVal_1.then) {\n // Wait for the method to complete\n returnVal_1.then(function () {\n // Execute the next method\n executeMethods(idx + 1);\n });\n } else {\n // Execute the next method\n executeMethods(idx + 1);\n }\n } else {\n // Execute the next method\n executeMethods(idx + 1);\n }\n });\n }\n // Else, see if additional methods need to be executed\n else if (idx < methodParams.length) {\n // Execute the next method\n executeMethods(idx + 1);\n }\n // Else, resolve the promise\n else {\n // Resolve the promise\n _resolve();\n }\n };\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Set the resolve reference\n _resolve = resolve;\n // Execute the methods\n executeMethods();\n });\n}\nexports.Executor = Executor;\n\n//# sourceURL=webpack:///./build/helper/executor.js?");
/***/ }),
/***/ "./build/helper/fieldSchemaXML.js":
/*!****************************************!*\
!*** ./build/helper/fieldSchemaXML.js ***!
\****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ../lib */ \"./build/lib/index.js\");\nvar __1 = __webpack_require__(/*! .. */ \"./build/index.js\");\nvar spCfg_1 = __webpack_require__(/*! ./spCfg */ \"./build/helper/spCfg.js\");\n/**\r\n * Field Schema XML\r\n * Helper class for generating the field schema xml\r\n */\nexports.FieldSchemaXML = function (fieldInfo) {\n var _resolve = null;\n // Returns the schema xml for a boolean field.\n var createBoolean = function createBoolean(fieldInfo, props) {\n var schemaXml = null;\n // Set the field type\n props[\"Type\"] = \"Boolean\";\n // Generate the schema\n schemaXml = \"<Field \" + toString(props) + \">\";\n if (fieldInfo.defaultValue) {\n schemaXml += \"<Default>\" + fieldInfo.defaultValue + \"</Default>\";\n }\n schemaXml += \"</Field>\";\n // Resolve the request\n _resolve(schemaXml);\n };\n // Returns the schema xml for a calculated field.\n var createCalculated = function createCalculated(fieldInfo, props) {\n var schemaXml = null;\n // Set the field type\n props[\"Type\"] = \"Calculated\";\n // Set the result type\n switch (fieldInfo.resultType) {\n case __1.SPTypes.FieldResultType.Boolean:\n props[\"ResultType\"] = \"Boolean\";\n break;\n case __1.SPTypes.FieldResultType.Currency:\n props[\"ResultType\"] = \"Currency\";\n break;\n case __1.SPTypes.FieldResultType.DateOnly:\n props[\"Format\"] = \"DateOnly\";\n props[\"ResultType\"] = \"DateTime\";\n break;\n case __1.SPTypes.FieldResultType.DateTime:\n props[\"Format\"] = \"DateTime\";\n props[\"ResultType\"] = \"DateTime\";\n break;\n case __1.SPTypes.FieldResultType.Number:\n props[\"ResultType\"] = \"Number\";\n break;\n default:\n props[\"ResultType\"] = \"Text\";\n break;\n }\n // Generate the schema\n schemaXml = \"<Field \" + toString(props) + \">\";\n if (fieldInfo.formula) {\n schemaXml += \"<Formula>\" + fieldInfo.formula + \"</Formula>\";\n }\n if (fieldInfo.fieldRefs) {\n schemaXml += \"<FieldRefs>\";\n for (var i = 0; i < fieldInfo.fieldRefs.length; i++) {\n schemaXml += \"<FieldRef Name=\\\"\" + fieldInfo.fieldRefs[i] + \"\\\" />\";\n }\n schemaXml += \"</FieldRefs>\";\n }\n schemaXml += \"</Field>\";\n // Resolve the request\n _resolve(schemaXml);\n };\n // Returns the schema xml for a choice field.\n var createChoice = function createChoice(fieldInfo, props) {\n var schemaXml = null;\n // Set the field type\n props[\"Type\"] = fieldInfo.multi ? \"MultiChoice\" : \"Choice\";\n // Generate the schema\n schemaXml = \"<Field \" + toString(props) + \">\";\n if (fieldInfo.defaultValue) {\n schemaXml += \"<Default>\" + fieldInfo.defaultValue + \"</Default>\";\n }\n if (fieldInfo.choices) {\n schemaXml += \"<CHOICES>\";\n for (var i = 0; i < fieldInfo.choices.length; i++) {\n schemaXml += \"<CHOICE>\" + fieldInfo.choices[i] + \"</CHOICE>\";\n }\n schemaXml += \"</CHOICES>\";\n }\n schemaXml += \"</Field>\";\n // Resolve the request\n _resolve(schemaXml);\n };\n // Returns the schema xml for a currency field.\n var createCurrency = function createCurrency(fieldInfo, props) {\n var schemaXml = null;\n // Set the field type\n props[\"Type\"] = \"Currency\";\n // Set the number properties\n if (fieldInfo.decimals >= 0) {\n props[\"Decimals\"] = fieldInfo.decimals;\n }\n if (fieldInfo.lcid > 0) {\n props[\"LCID\"] = fieldInfo.lcid;\n }\n if (fieldInfo.max != null) {\n props[\"Max\"] = fieldInfo.max;\n }\n if (fieldInfo.min != null) {\n props[\"Min\"] = fieldInfo.min;\n }\n // Generate the schema\n schemaXml = \"<Field \" + toString(props) + \" />\";\n // Resolve the request\n _resolve(schemaXml);\n };\n // Returns the schema xml for a date field.\n var createDate = function createDate(fieldInfo, props) {\n var schemaXml = null;\n // Set the field type\n props[\"Type\"] = \"DateTime\";\n // Set the date/time properties\n props[\"Format\"] = fieldInfo.format == __1.SPTypes.DateFormat.DateTime ? \"DateTime\" : \"DateOnly\";\n // Generate the schema\n schemaXml = \"<Field \" + toString(props) + \" />\";\n // Resolve the request\n _resolve(schemaXml);\n };\n // Returns the schema xml for a geolocation field.\n var createGeolocation = function createGeolocation(fieldInfo, props) {\n var schemaXml = null;\n // Set the field type\n props[\"Type\"] = \"Geolocation\";\n // Generate the schema\n schemaXml = \"<Field \" + toString(props) + \" />\";\n // Resolve the request\n _resolve(schemaXml);\n };\n // Returns the schema xml for a lookup field.\n var createLookup = function createLookup(fieldInfo, props) {\n var schemaXml = null;\n // Set the field type\n props[\"Type\"] = fieldInfo.multi ? \"LookupMulti\" : \"Lookup\";\n // Set the lookup properties\n if (fieldInfo.fieldRef) {\n props[\"FieldRef\"] = fieldInfo.fieldRef;\n }\n if (fieldInfo.multi) {\n props[\"Mult\"] = \"TRUE\";\n }\n if (fieldInfo.showField) {\n props[\"ShowField\"] = fieldInfo.showField;\n }\n // See if the lookup name exists\n if (fieldInfo.listName) {\n // Get the web containing the list\n lib_1.Web(fieldInfo.webUrl)\n // Get the list\n .Lists(fieldInfo.listName)\n // Set the query\n .query({\n Expand: [\"ParentWeb\"]\n })\n // Execute the request\n .execute(function (list) {\n // Set the list and web ids\n props[\"List\"] = \"{\" + list.Id + \"}\";\n if (fieldInfo.webUrl) {\n props[\"WebId\"] = list.ParentWeb.Id;\n }\n // Resolve the request\n _resolve(\"<Field \" + toString(props) + \" />\");\n });\n } else {\n // Set the list id\n props[\"List\"] = \"{\" + fieldInfo.listId.replace(/[\\{\\}]/g, \"\") + \"}\";\n // Resolve the request\n _resolve(\"<Field \" + toString(props) + \" />\");\n }\n };\n // Returns the schema xml for a managed metadata field.\n var createMMS = function createMMS(fieldInfo, props) {\n // Create the value field\n var valueProps = {\n ID: \"{\" + lib_1.ContextInfo.generateGUID() + \"}\",\n Name: fieldInfo.name + \"_0\",\n StaticName: fieldInfo.name + \"_0\",\n DisplayName: fieldInfo.title + \" Value\",\n Type: \"Note\",\n Hidden: \"TRUE\",\n Required: \"FALSE\",\n ShowInViewForms: \"FALSE\",\n CanToggleHidden: \"TRUE\"\n };\n // Generate the value field schema xml\n var schemaXmlValue = \"<Field \" + toString(valueProps) + \" />\";\n // Set the mms properties\n props[\"Type\"] = \"TaxonomyFieldType\";\n props[\"ShowField\"] = \"Term\" + (fieldInfo.locale ? fieldInfo.locale.toString() : \"1033\");\n // Generate the mms field schema xml\n var schemaXml = [\"<Field \" + toString(props) + \">\", \"<Customization>\", \"<ArrayOfProperty>\", \"<Property>\", \"<Name>TextField</Name>\", \"<Value xmlns:q6=\\\"http://www.w3.org/2001/XMLSchema\\\" p4:type=\\\"q6:string\\\" xmlns:p4=\\\"http://www.w3.org/2001/XMLSchema-instance\\\">\" + valueProps.ID + \"</Value>\", \"</Property>\", \"</ArrayOfProperty>\", \"</Customization>\", \"</Field>\"].join(\"\");\n // Resolve the request\n _resolve([schemaXmlValue, schemaXml]);\n };\n // Returns the schema xml for a note field.\n var createNote = function createNote(fieldInfo, props) {\n var schemaXml = null;\n // Set the field type\n props[\"Type\"] = \"Note\";\n // Set the note properties\n if (fieldInfo.appendFl) {\n props[\"AppendOnly\"] = \"TRUE\";\n }\n if (fieldInfo.noteType == __1.SPTypes.FieldNoteType.EnhancedRichText || fieldInfo.noteType == __1.SPTypes.FieldNoteType.RichText) {\n props[\"RichText\"] = \"TRUE\";\n }\n if (fieldInfo.noteType == __1.SPTypes.FieldNoteType.EnhancedRichText) {\n props[\"RichTextMode\"] = \"FullHtml\";\n }\n if (fieldInfo.numberOfLines > 0) {\n props[\"NumLines\"] = fieldInfo.numberOfLines;\n }\n // Generate the schema\n schemaXml = \"<Field \" + toString(props) + \" />\";\n // Resolve the request\n _resolve(schemaXml);\n };\n // Returns the schema xml for a number field.\n var createNumber = function createNumber(fieldInfo, props) {\n var schemaXml = null;\n // Set the field type\n props[\"Type\"] = \"Number\";\n // Set the number properties\n if (fieldInfo.decimals >= 0) {\n props[\"Decimals\"] = fieldInfo.decimals;\n }\n if (fieldInfo.max != null) {\n props[\"Max\"] = fieldInfo.max;\n }\n if (fieldInfo.min != null) {\n props[\"Min\"] = fieldInfo.min;\n }\n if (fieldInfo.numberType == __1.SPTypes.FieldNumberType.Integer) {\n props[\"Decimals\"] = 0;\n }\n if (fieldInfo.numberType == __1.SPTypes.FieldNumberType.Percentage) {\n props[\"ShowPercentage\"] = \"TRUE\";\n }\n // Generate the schema\n schemaXml = \"<Field \" + toString(props) + \" />\";\n // Resolve the request\n _resolve(schemaXml);\n };\n // Returns the schema xml for a text field.\n var createText = function createText(fieldInfo, props) {\n var schemaXml = null;\n // Set the field type\n props[\"Type\"] = \"Text\";\n // Generate the schema\n schemaXml = \"<Field \" + toString(props) + \" />\";\n // Resolve the request\n _resolve(schemaXml);\n };\n // Returns the schema xml for a url field.\n var createUrl = function createUrl(fieldInfo, props) {\n var schemaXml = null;\n // Set the field type\n props[\"Type\"] = \"URL\";\n // Generate the schema\n schemaXml = \"<Field \" + toString(props) + \" />\";\n // Resolve the request\n _resolve(schemaXml);\n };\n // Returns the schema xml for a user field.\n var createUser = function createUser(fieldInfo, props) {\n var schemaXml = null;\n // Set the field type\n props[\"Type\"] = \"User\";\n // Set the user properties\n if (fieldInfo.multi) {\n props[\"Mult\"] = \"TRUE\";\n }\n if (fieldInfo.selectionMode != null) {\n props[\"UserSelectionMode\"] = fieldInfo.selectionMode;\n }\n if (fieldInfo.selectionScope != null) {\n props[\"UserSelectionScope\"] = fieldInfo.selectionScope;\n }\n // Generate the schema\n schemaXml = \"<Field \" + toString(props) + \" />\";\n // Resolve the request\n _resolve(schemaXml);\n };\n // Method to convert the properties to a string\n var toString = function toString(props) {\n var properties = \"\";\n // Parse the properties\n for (var key in props) {\n var value = props[key];\n // Add the property\n properties += (properties ? \" \" : \"\") + key + \"=\\\"\" + props[key] + \"\\\"\";\n }\n // Return the string value\n return properties;\n };\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Set the resolve method\n _resolve = resolve;\n // See if the schema xml has been defined\n if (fieldInfo.schemaXml) {\n // Resolve the promise\n resolve(fieldInfo.schemaXml);\n } else {\n // Set the base properties\n var props = {};\n props[\"ID\"] = \"{\" + lib_1.ContextInfo.generateGUID() + \"}\";\n props[\"Name\"] = fieldInfo.name;\n props[\"StaticName\"] = fieldInfo.name;\n props[\"DisplayName\"] = fieldInfo.title || fieldInfo.name;\n // Set the optional properties\n if (typeof fieldInfo.group !== \"undefined\") {\n props[\"Group\"] = fieldInfo.group;\n }\n if (typeof fieldInfo.jslink !== \"undefined\") {\n props[\"JSLink\"] = fieldInfo.jslink;\n }\n if (typeof fieldInfo.hidden !== \"undefined\") {\n props[\"Hidden\"] = fieldInfo.hidden ? \"TRUE\" : \"FALSE\";\n }\n if (typeof fieldInfo.readOnly !== \"undefined\") {\n props[\"ReadOnly\"] = fieldInfo.readOnly ? \"TRUE\" : \"FALSE\";\n }\n if (typeof fieldInfo.required !== \"undefined\") {\n props[\"Required\"] = fieldInfo.required ? \"TRUE\" : \"FALSE\";\n }\n if (typeof fieldInfo.showInDisplayForm !== \"undefined\") {\n props[\"ShowInDisplayForm\"] = fieldInfo.showInDisplayForm ? \"TRUE\" : \"FALSE\";\n }\n if (typeof fieldInfo.showInEditForm !== \"undefined\") {\n props[\"ShowInEditForm\"] = fieldInfo.showInEditForm ? \"TRUE\" : \"FALSE\";\n }\n if (typeof fieldInfo.showInListSettings !== \"undefined\") {\n props[\"ShowInListSettings\"] = fieldInfo.showInListSettings ? \"TRUE\" : \"FALSE\";\n }\n if (typeof fieldInfo.showInNewForm !== \"undefined\") {\n props[\"ShowInNewForm\"] = fieldInfo.showInNewForm ? \"TRUE\" : \"FALSE\";\n }\n if (typeof fieldInfo.showInViewForms !== \"undefined\") {\n props[\"ShowInViewForms\"] = fieldInfo.showInViewForms ? \"TRUE\" : \"FALSE\";\n }\n // Set the type\n switch (fieldInfo.type) {\n // Boolean\n case spCfg_1.SPCfgFieldType.Boolean:\n createBoolean(fieldInfo, props);\n break;\n // Calculated\n case spCfg_1.SPCfgFieldType.Calculated:\n createCalculated(fieldInfo, props);\n break;\n // Choice\n case spCfg_1.SPCfgFieldType.Choice:\n createChoice(fieldInfo, props);\n break;\n // Currency\n case spCfg_1.SPCfgFieldType.Currency:\n createCurrency(fieldInfo, props);\n break;\n // Date/Time\n case spCfg_1.SPCfgFieldType.Date:\n createDate(fieldInfo, props);\n break;\n // Geolocation\n case spCfg_1.SPCfgFieldType.Geolocation:\n createGeolocation(fieldInfo, props);\n break;\n // Lookup\n case spCfg_1.SPCfgFieldType.Lookup:\n createLookup(fieldInfo, props);\n break;\n // MMS\n case spCfg_1.SPCfgFieldType.MMS:\n createMMS(fieldInfo, props);\n break;\n // Note\n case spCfg_1.SPCfgFieldType.Note:\n createNote(fieldInfo, props);\n break;\n // Number\n case spCfg_1.SPCfgFieldType.Number:\n createNumber(fieldInfo, props);\n break;\n // Text\n case spCfg_1.SPCfgFieldType.Text:\n createText(fieldInfo, props);\n break;\n // URL\n case spCfg_1.SPCfgFieldType.Url:\n createUrl(fieldInfo, props);\n break;\n // User\n case spCfg_1.SPCfgFieldType.User:\n createUser(fieldInfo, props);\n break;\n // Field type not supported\n default:\n // Create a text field by default\n createText(fieldInfo, props);\n break;\n }\n }\n });\n};\n\n//# sourceURL=webpack:///./build/helper/fieldSchemaXML.js?");
/***/ }),
/***/ "./build/helper/index.js":
/*!*******************************!*\
!*** ./build/helper/index.js ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nfunction __export(m) {\n for (var p in m) {\n if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(__webpack_require__(/*! ./app */ \"./build/helper/app.js\"));\n__export(__webpack_require__(/*! ./dependencies */ \"./build/helper/dependencies.js\"));\n__export(__webpack_require__(/*! ./executor */ \"./build/helper/executor.js\"));\n__export(__webpack_require__(/*! ./fieldSchemaXML */ \"./build/helper/fieldSchemaXML.js\"));\n__export(__webpack_require__(/*! ./jslink */ \"./build/helper/jslink.js\"));\n__export(__webpack_require__(/*! ./listForm */ \"./build/helper/listForm.js\"));\n__export(__webpack_require__(/*! ./listFormField */ \"./build/helper/listFormField.js\"));\n__export(__webpack_require__(/*! ./loader */ \"./build/helper/loader.js\"));\n__export(__webpack_require__(/*! ./methods */ \"./build/helper/methods.js\"));\n__export(__webpack_require__(/*! ./ribbonLink */ \"./build/helper/ribbonLink.js\"));\n__export(__webpack_require__(/*! ./sbLink */ \"./build/helper/sbLink.js\"));\n__export(__webpack_require__(/*! ./spCfg */ \"./build/helper/spCfg.js\"));\n__export(__webpack_require__(/*! ./taxonomy */ \"./build/helper/taxonomy.js\"));\n__export(__webpack_require__(/*! ./webpart */ \"./build/helper/webpart.js\"));\nvar SP = __webpack_require__(/*! ./sp */ \"./build/helper/sp.js\");\nexports.SP = SP;\nvar Types = __webpack_require__(/*! ./types */ \"./build/helper/types/index.js\");\nexports.Types = Types;\n\n//# sourceURL=webpack:///./build/helper/index.js?");
/***/ }),
/***/ "./build/helper/jslink.js":
/*!********************************!*\
!*** ./build/helper/jslink.js ***!
\********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ../lib */ \"./build/lib/index.js\");\nvar mapper_1 = __webpack_require__(/*! ../mapper */ \"./build/mapper/index.js\");\n/**\r\n * JSLink Helper Methods\r\n */\nexports.JSLink = {\n // Hide event flag\n _hideEventFl: false,\n /**\r\n * Field to Method Mapper\r\n * 1 - Display Form\r\n * 2 - Edit Form\r\n * 3 - New Form\r\n * 4 - View\r\n */\n _fieldToMethodMapper: {\n 'Attachments': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPFieldAttachments_Default\"],\n 2: lib_1.ContextInfo.window[\"SPFieldAttachments_Default\"],\n 3: lib_1.ContextInfo.window[\"SPFieldAttachments_Default\"]\n },\n 'Boolean': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPField_FormDisplay_DefaultNoEncode\"],\n 2: lib_1.ContextInfo.window[\"SPFieldBoolean_Edit\"],\n 3: lib_1.ContextInfo.window[\"SPFieldBoolean_Edit\"]\n },\n 'Currency': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPField_FormDisplay_Default\"],\n 2: lib_1.ContextInfo.window[\"SPFieldNumber_Edit\"],\n 3: lib_1.ContextInfo.window[\"SPFieldNumber_Edit\"]\n },\n 'Calculated': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPField_FormDisplay_Default\"],\n 2: lib_1.ContextInfo.window[\"SPField_FormDisplay_Empty\"],\n 3: lib_1.ContextInfo.window[\"SPField_FormDisplay_Empty\"]\n },\n 'Choice': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPField_FormDisplay_Default\"],\n 2: lib_1.ContextInfo.window[\"SPFieldChoice_Edit\"],\n 3: lib_1.ContextInfo.window[\"SPFieldChoice_Edit\"]\n },\n 'Computed': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPField_FormDisplay_Default\"],\n 2: lib_1.ContextInfo.window[\"SPField_FormDisplay_Default\"],\n 3: lib_1.ContextInfo.window[\"SPField_FormDisplay_Default\"]\n },\n 'DateTime': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPFieldDateTime_Display\"],\n 2: lib_1.ContextInfo.window[\"SPFieldDateTime_Edit\"],\n 3: lib_1.ContextInfo.window[\"SPFieldDateTime_Edit\"]\n },\n 'File': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPFieldFile_Display\"],\n 2: lib_1.ContextInfo.window[\"SPFieldFile_Edit\"],\n 3: lib_1.ContextInfo.window[\"SPFieldFile_Edit\"]\n },\n 'Integer': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPField_FormDisplay_Default\"],\n 2: lib_1.ContextInfo.window[\"SPFieldNumber_Edit\"],\n 3: lib_1.ContextInfo.window[\"SPFieldNumber_Edit\"]\n },\n 'Lookup': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPFieldLookup_Display\"],\n 2: lib_1.ContextInfo.window[\"SPFieldLookup_Edit\"],\n 3: lib_1.ContextInfo.window[\"SPFieldLookup_Edit\"]\n },\n 'LookupMulti': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPFieldLookup_Display\"],\n 2: lib_1.ContextInfo.window[\"SPFieldLookup_Edit\"],\n 3: lib_1.ContextInfo.window[\"SPFieldLookup_Edit\"]\n },\n 'MultiChoice': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPField_FormDisplay_Default\"],\n 2: lib_1.ContextInfo.window[\"SPFieldMultiChoice_Edit\"],\n 3: lib_1.ContextInfo.window[\"SPFieldMultiChoice_Edit\"]\n },\n 'Note': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPFieldNote_Display\"],\n 2: lib_1.ContextInfo.window[\"SPFieldNote_Edit\"],\n 3: lib_1.ContextInfo.window[\"SPFieldNote_Edit\"]\n },\n 'Number': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPField_FormDisplay_Default\"],\n 2: lib_1.ContextInfo.window[\"SPFieldNumber_Edit\"],\n 3: lib_1.ContextInfo.window[\"SPFieldNumber_Edit\"]\n },\n 'Text': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPField_FormDisplay_Default\"],\n 2: lib_1.ContextInfo.window[\"SPFieldText_Edit\"],\n 3: lib_1.ContextInfo.window[\"SPFieldText_Edit\"]\n },\n 'URL': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPFieldUrl_Display\"],\n 2: lib_1.ContextInfo.window[\"SPFieldUrl_Edit\"],\n 3: lib_1.ContextInfo.window[\"SPFieldUrl_Edit\"]\n },\n 'User': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPFieldUser_Display\"],\n 2: lib_1.ContextInfo.window[\"SPClientPeoplePickerCSRTemplate\"],\n 3: lib_1.ContextInfo.window[\"SPClientPeoplePickerCSRTemplate\"]\n },\n 'UserMulti': {\n 4: lib_1.ContextInfo.window[\"RenderFieldValueDefault\"],\n 1: lib_1.ContextInfo.window[\"SPFieldUserMulti_Display\"],\n 2: lib_1.ContextInfo.window[\"SPClientPeoplePickerCSRTemplate\"],\n 3: lib_1.ContextInfo.window[\"SPClientPeoplePickerCSRTemplate\"]\n }\n },\n /**\r\n * Methods\r\n */\n /**\r\n * Disables edit for the specified field.\r\n * @param ctx - The client context.\r\n * @param field - The field to disable edit.\r\n * @param requireValueFl - Flag to only disable the field, if a value exists.\r\n */\n disableEdit: function disableEdit(ctx, field, requireValueFl) {\n var fieldValue = ctx.CurrentFieldValue;\n // Ensure a value exists\n if (fieldValue) {\n // Update the context, based on the field type\n switch (ctx.CurrentFieldSchema.Type) {\n case \"MultiChoice\":\n var regExp = new RegExp(mapper_1.SPTypes.ClientTemplatesUtility.UserLookupDelimitString, \"g\");\n // Update the field value\n fieldValue = ctx.CurrentFieldValue\n // Replace the delimiter\n .replace(regExp, \"; \")\n // Trim the delimiter from the beginning\n .replace(/^; /g, \"\")\n // Trim the delimiter from the end\n .replace(/; $/g, \"\");\n break;\n case \"Note\":\n // Replace the return characters\n fieldValue = \"<div>\" + ctx.CurrentFieldValue.replace(/\\n/g, \"<br />\") + \"</div>\";\n break;\n case \"User\":\n case \"UserMulti\":\n for (var i = 0; i < ctx.CurrentFieldValue.length; i++) {\n var userValue = ctx.CurrentFieldValue[i];\n // Add the user value\n fieldValue +=\n // User Lookup ID\n userValue.EntityData.SPUserID +\n // Delimiter\n mapper_1.SPTypes.ClientTemplatesUtility.UserLookupDelimitString +\n // User Lookup Value\n userValue.DisplayText + (\n // Optional Delimiter\n i == ctx.CurrentFieldValue.length - 1 ? \"\" : mapper_1.SPTypes.ClientTemplatesUtility.UserLookupDelimitString);\n }\n break;\n }\n ;\n // Update the current field value\n ctx.CurrentFieldValue = fieldValue;\n }\n // Determine the control mode\n var controlMode = mapper_1.SPTypes.ControlMode.Display;\n if (requireValueFl && (fieldValue == null || fieldValue == \"\")) {\n // Inherit the control mode\n controlMode = ctx.ControlMode;\n }\n // Return the display value of the field\n return exports.JSLink.renderField(ctx, field, controlMode);\n },\n /**\r\n * Disable quick edit for the specified field.\r\n * @param ctx - The client context.\r\n * @param field - The field to disable edit.\r\n */\n disableQuickEdit: function disableQuickEdit(ctx, field) {\n // Ensure we are in grid edit mode\n if (ctx.inGridMode) {\n // Disable editing for this field\n field.AllowGridEditing = false;\n return \"\";\n }\n // Return the default field value html\n return exports.JSLink.renderField(ctx, field);\n },\n /**\r\n * Returns the list view.\r\n * @param ctx - The client context.\r\n */\n getListView: function getListView(ctx) {\n // Get the webpart\n var wp = exports.JSLink.getWebPart(ctx);\n if (wp) {\n // Find the list form table\n wp = wp.querySelector(\".ms-formtable\");\n }\n // Return the list view\n return wp;\n },\n /**\r\n * Returns the list view items.\r\n * @param ctx - The client context.\r\n */\n getListViewItems: function getListViewItems(ctx) {\n // Return the list view items\n return ctx.ListData ? ctx.ListData.Row : [];\n },\n /**\r\n * Returns the selected list view items\r\n */\n getListViewSelectedItems: function getListViewSelectedItems() {\n // Return the selected items\n return lib_1.ContextInfo.window[\"SP\"].ListOperation.Selection.getSelectedItems();\n },\n /**\r\n * Returns the webpart containing the JSLink field/form/view.\r\n * @param ctx - The client context.\r\n */\n getWebPart: function getWebPart(ctx) {\n // Return the webpart\n return lib_1.ContextInfo.document.querySelector(\"#WebPart\" + (ctx.FormUniqueId || ctx.wpq));\n },\n /**\r\n * Hides the specified field.\r\n * @param ctx - The client context.\r\n * @param field - The field to hide.\r\n */\n hideField: function hideField(ctx, field) {\n // Ensure the hide event has been created\n if (!exports.JSLink._hideEventFl) {\n // Set the flag\n exports.JSLink._hideEventFl = true;\n // Create the event\n lib_1.ContextInfo.window.addEventListener(\"load\", function () {\n // Query for the elements to hide\n var fieldElements = lib_1.ContextInfo.document.querySelectorAll(\".hide-field\");\n for (var _i = 0, fieldElements_1 = fieldElements; _i < fieldElements_1.length; _i++) {\n var fieldElement = fieldElements_1[_i];\n // Get the parent row\n var parentRow = fieldElement.parentNode && fieldElement.parentNode.parentNode ? fieldElement.parentNode.parentNode : null;\n if (parentRow) {\n // Ensure the parent row exists\n if (fieldElement.parentNode.getAttribute(\"data-field-name\") != parentRow.getAttribute(\"data-field-name\")) {\n // Find the parent row\n while (parentRow && parentRow.nodeName.toLowerCase() != \"tr\") {\n // Update the parent node\n parentRow = parentRow.parentNode;\n }\n }\n // Hide the parent row\n if (parentRow) {\n parentRow.style.display = \"none\";\n }\n }\n }\n });\n }\n },\n /**\r\n * Registers the JSLink configuration\r\n * @param cfg - The JSLink configuration.\r\n */\n register: function register(cfg) {\n // Ensure a configuration exists\n if (cfg) {\n // Get the template manager\n var templateManager = lib_1.ContextInfo.window.SPClientTemplates;\n templateManager = templateManager ? templateManager.TemplateManager : null;\n // Ensure it exists\n if (templateManager) {\n // Apply the customization\n templateManager.RegisterTemplateOverrides(cfg);\n }\n }\n },\n /**\r\n * Removes the field and html from the page.\r\n * @param ctx - The client context.\r\n * @param field - The field to remove.\r\n */\n removeField: function removeField(ctx, field) {\n // Hide the field\n exports.JSLink.hideField(ctx, field);\n // Return an empty element\n return \"<div class='hide-field'></div>\";\n },\n /**\r\n * Method to render the default html for a field.\r\n * @param ctx - The client context.\r\n * @param field - The form field.\r\n * @param formType - The form type. (Display, Edit, New or View)\r\n */\n renderField: function renderField(ctx, field, formType) {\n // Determine the field type\n var fieldType = field ? field.Type : ctx.CurrentFieldSchema ? ctx.CurrentFieldSchema.Type : null;\n // Ensure the form type is set\n formType = formType ? formType : ctx.ControlMode;\n // Ensure a field to method mapper exists\n if (exports.JSLink._fieldToMethodMapper[fieldType] && exports.JSLink._fieldToMethodMapper[fieldType][formType]) {\n // Return the default html for this field\n var defaultHtml = exports.JSLink._fieldToMethodMapper[fieldType][formType](ctx);\n if (defaultHtml) {\n return defaultHtml;\n }\n }\n // Set the field renderer based on the field type\n var field = ctx.CurrentFieldSchema;\n var fieldRenderer = null;\n switch (field.Type) {\n case \"AllDayEvent\":\n fieldRenderer = new lib_1.ContextInfo.window[\"AllDayEventFieldRenderer\"](field.Name);\n break;\n case \"Attachments\":\n fieldRenderer = new lib_1.ContextInfo.window[\"AttachmentFieldRenderer\"](field.Name);\n break;\n case \"BusinessData\":\n fieldRenderer = new lib_1.ContextInfo.window[\"BusinessDataFieldRenderer\"](field.Name);\n break;\n case \"Computed\":\n fieldRenderer = new lib_1.ContextInfo.window[\"ComputedFieldRenderer\"](field.Name);\n break;\n case \"CrossProjectLink\":\n fieldRenderer = new lib_1.ContextInfo.window[\"ProjectLinkFieldRenderer\"](field.Name);\n break;\n case \"Currency\":\n fieldRenderer = new lib_1.ContextInfo.window[\"NumberFieldRenderer\"](field.Name);\n break;\n case \"DateTime\":\n fieldRenderer = new lib_1.ContextInfo.window[\"DateTimeFieldRenderer\"](field.Name);\n break;\n case \"Lookup\":\n fieldRenderer = new lib_1.ContextInfo.window[\"LookupFieldRenderer\"](field.Name);\n break;\n case \"LookupMulti\":\n fieldRenderer = new lib_1.ContextInfo.window[\"LookupFieldRenderer\"](field.Name);\n break;\n case \"Note\":\n fieldRenderer = new lib_1.ContextInfo.window[\"NoteFieldRenderer\"](field.Name);\n break;\n case \"Number\":\n fieldRenderer = new lib_1.ContextInfo.window[\"NumberFieldRenderer\"](field.Name);\n break;\n case \"Recurrence\":\n fieldRenderer = new lib_1.ContextInfo.window[\"RecurrenceFieldRenderer\"](field.Name);\n break;\n case \"Text\":\n fieldRenderer = new lib_1.ContextInfo.window[\"TextFieldRenderer\"](field.Name);\n break;\n case \"URL\":\n fieldRenderer = new lib_1.ContextInfo.window[\"UrlFieldRenderer\"](field.Name);\n break;\n case \"User\":\n fieldRenderer = new lib_1.ContextInfo.window[\"UserFieldRenderer\"](field.Name);\n break;\n case \"UserMulti\":\n fieldRenderer = new lib_1.ContextInfo.window[\"UserFieldRenderer\"](field.Name);\n break;\n case \"WorkflowStatus\":\n fieldRenderer = new lib_1.ContextInfo.window[\"RawFieldRenderer\"](field.Name);\n break;\n }\n ;\n // Get the current item\n var currentItem = ctx.CurrentItem || ctx.ListData.Items[0];\n // Return the item's field value html\n return fieldRenderer ? fieldRenderer.RenderField(ctx, field, currentItem, ctx.ListSchema) : currentItem[field.Name];\n }\n};\n\n//# sourceURL=webpack:///./build/helper/jslink.js?");
/***/ }),
/***/ "./build/helper/listForm.js":
/*!**********************************!*\
!*** ./build/helper/listForm.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar __1 = __webpack_require__(/*! .. */ \"./build/index.js\");\n/**\r\n * List Form\r\n */\nexports.ListForm = {\n // Method to create an instance of the list form\n create: function create(props) {\n var _cacheData = null;\n var _info = null;\n var _props = null;\n var _reject = null;\n var _resolve = null;\n // Save the properties\n _props = props || {};\n _props.fields = _props.fields;\n // Method to load the list data\n var load = function load() {\n // Clear the information\n _info = {\n item: _props.item,\n query: _props.query || {}\n };\n // Load the data from cache\n loadFromCache();\n // Load the list data\n loadListData().then(\n // Success\n function () {\n // See if the fields have been defined\n if (_props.fields) {\n // Process the fields\n processFields();\n // Load the item data\n loadItem();\n } else {\n // Load the content type\n loadDefaultContentType();\n }\n },\n // Reject\n _reject);\n };\n // Method to load the default content type\n var loadDefaultContentType = function loadDefaultContentType() {\n // See if the content type info exists\n if (_cacheData && _cacheData.ct) {\n // Try to parse the data\n try {\n // Parse the content type\n var ct = __1.Helper.parse(_cacheData.ct);\n // Load the default fields\n loadDefaultFields(ct.results[0]);\n return;\n } catch (_a) {\n // Clear the cache data\n sessionStorage.removeItem(_props.cacheKey);\n }\n }\n // Load the content types\n _info.list.ContentTypes()\n // Query for the default content type and expand the field links\n .query({\n Expand: [\"FieldLinks\"],\n Top: 1\n })\n // Execute the request, but wait for the previous one to be completed\n .execute(function (ct) {\n // See if we are storing data in cache\n if (_props.cacheKey) {\n // Update the cache data\n _cacheData = _cacheData || {};\n _cacheData.ct = ct.stringify();\n // Update the cache\n sessionStorage.setItem(_props.cacheKey, JSON.stringify(_cacheData));\n }\n // Resolve the promise\n loadDefaultFields(ct.results[0]);\n }, _reject);\n };\n // Method to load the default fields\n var loadDefaultFields = function loadDefaultFields(ct) {\n var fields = ct ? ct.FieldLinks.results : [];\n var formFields = {};\n // Parse the field links\n for (var i = 0; i < fields.length; i++) {\n var fieldLink = fields[i];\n // Get the field\n var field = _info.fields[fieldLink.Name];\n if (field) {\n // Skip the content type field\n if (field.InternalName == \"ContentType\") {\n continue;\n }\n // Skip hidden fields\n if (field.Hidden || fieldLink.Hidden) {\n continue;\n }\n // Save the form field\n formFields[field.InternalName] = field;\n }\n }\n // Update the fields\n _info.fields = formFields;\n // Load the item data\n loadItem();\n };\n // Method to load the field data\n var loadFieldData = function loadFieldData(fields) {\n // Clear the fields\n _info.fields = {};\n // Parse the fields\n for (var i = 0; i < fields.results.length; i++) {\n var field = fields.results[i];\n // See if the exclude fields is defined\n if (_props.excludeFields) {\n var excludeField = false;\n // Parse the fields to exclude\n for (var j = 0; j < _props.excludeFields.length; j++) {\n // See if we are excluding this field\n if (_props.excludeFields[j] == field.InternalName) {\n // Set the flag\n excludeField = true;\n break;\n }\n }\n // See if we are excluding the field\n if (excludeField) {\n continue;\n }\n }\n // Save the field\n _info.fields[field.InternalName] = field;\n }\n };\n // Method to load the data from cache\n var loadFromCache = function loadFromCache() {\n // See if we are loading from cache\n if (_props.cacheKey) {\n // Get the data\n var data = sessionStorage.getItem(_props.cacheKey);\n if (data) {\n // Try to parse the data\n try {\n // Set the cache data\n _cacheData = JSON.parse(data);\n // Update the list information\n _info = _info || {};\n _info.list = __1.Helper.parse(_cacheData.list);\n // Load the field data\n loadFieldData(__1.Helper.parse(_cacheData.fields));\n } catch (_a) {\n // Clear the cache data\n sessionStorage.removeItem(_props.cacheKey);\n }\n }\n }\n };\n // Method to load the item\n var loadItem = function loadItem() {\n var reloadItem = false;\n // See if the item already exist\n if (_info.item) {\n // Parse the fields\n for (var fieldName in _info.fields) {\n var field = _info.fields[fieldName];\n // See what type of field this is\n switch (field.FieldTypeKind) {\n // Lookup or User Field\n case __1.SPTypes.FieldType.Lookup:\n case __1.SPTypes.FieldType.User:\n var fieldValue = _info.item[fieldName + \"Id\"];\n // Ensure the value exists\n if (fieldValue) {\n // See if a value exists\n if (fieldValue.results ? fieldValue.results.length > 0 : fieldValue > 0) {\n // Ensure the field data has been loaded\n if (_info.item[fieldName] == null) {\n // Set the flag\n reloadItem = true;\n }\n }\n }\n break;\n // Default\n default:\n // See if this is an taxonomy field\n if (field.TypeAsString.startsWith(\"TaxonomyFieldType\")) {\n var fieldValue_1 = _info.item[fieldName + \"Id\"];\n // Ensure the value exists\n if (fieldValue_1) {\n // See if a field value exists\n if (fieldValue_1.results ? fieldValue_1.results.length > 0 : fieldValue_1 != null) {\n // Parse the fields\n for (var fieldName_1 in _info.fields) {\n var valueField = _info.fields[fieldName_1];\n // See if this is the value field\n if (valueField.InternalName == field.InternalName + \"_0\" || valueField.Title == field.InternalName + \"_0\") {\n // Ensure the value field is loaded\n if (_info.item[valueField.InternalName] == null) {\n // Set the flag\n reloadItem = true;\n }\n break;\n }\n }\n }\n }\n }\n break;\n }\n // See if we are reloading the item\n if (reloadItem) {\n break;\n }\n }\n }\n // See if the item exists\n if (_info.item && !reloadItem) {\n // See if we are loading attachments\n if (_props.loadAttachments && _info.attachments == null) {\n // Load the attachments\n exports.ListForm.loadAttachments(_props).then(function (attachments) {\n // Set the attachments\n _info.attachments = attachments;\n // Resolve the promise\n _resolve(_info);\n }, _reject);\n } else {\n // Resolve the promise\n _resolve(_info);\n }\n }\n // Else, see if we are loading the list item\n else if (reloadItem || _props.itemId > 0) {\n // Update the item query\n _info.query = exports.ListForm.generateODataQuery(_info, _props.loadAttachments);\n // Get the list item\n _info.list.Items(reloadItem ? _props.item.Id : _props.itemId)\n // Set the query\n .query(_info.query)\n // Execute the request\n .execute(function (item) {\n // Save the attachments\n _info.attachments = item.AttachmentFiles.results;\n // Save the item\n _info.item = item;\n // Resolve the promise\n _resolve(_info);\n }, _reject);\n } else {\n // Resolve the promise\n _resolve(_info);\n }\n };\n // Method to load the list data\n var loadListData = function loadListData() {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // See if the list & fields already exist\n if (_info.list && _info.fields) {\n // Resolve the promise\n resolve();\n return;\n }\n // Get the web\n __1.Web(_props.webUrl)\n // Get the list\n .Lists(_props.listName)\n // Execute the request\n .execute(function (list) {\n // Save the list and web url\n _info.list = list;\n _info.webUrl = _props.webUrl;\n }, reject)\n // Load the fields\n .Fields()\n // Execute the request\n .execute(function (fields) {\n // See if we are caching the data\n if (_props.cacheKey) {\n // Update the cache\n _cacheData = _cacheData || {};\n _cacheData.fields = fields.stringify();\n _cacheData.list = _info.list.stringify();\n // Cache the data\n sessionStorage.setItem(_props.cacheKey, JSON.stringify(_cacheData));\n }\n // Load the field data\n loadFieldData(fields);\n // Resolve the promise\n resolve();\n }, reject, true);\n });\n };\n // Method to process the fields\n var processFields = function processFields() {\n var formFields = {};\n // Parse the fields provided\n for (var i = 0; i < _props.fields.length; i++) {\n var field = _info.fields[_props.fields[i]];\n // Ensure the field exists\n if (field) {\n // Save the field\n formFields[field.InternalName] = field;\n // See if this is a taxonomy field\n if (field.TypeAsString.startsWith(\"TaxonomyFieldType\")) {\n // Parse the list fields\n for (var fieldName in _info.fields) {\n var valueField = _info.fields[fieldName];\n // See if this is a value field\n if (valueField.InternalName == field.InternalName + \"_0\" || valueField.Title == field.InternalName + \"_0\") {\n // Include this field\n formFields[valueField.InternalName] = valueField;\n break;\n }\n }\n }\n }\n }\n // Update the fields\n _info.fields = formFields;\n };\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Save the methods\n _reject = reject;\n _resolve = resolve;\n // Load the list data\n load();\n });\n },\n // Method to generate the odata query\n generateODataQuery: function generateODataQuery(info, loadAttachments) {\n if (loadAttachments === void 0) {\n loadAttachments = false;\n }\n var query = info.query || {};\n // Default the select query to get all the fields by default\n query.Select = query.Select || [\"*\"];\n query.Expand = query.Expand || [];\n // See if we are loading the attachments\n if (loadAttachments) {\n // Expand the attachment files collection\n query.Expand.push(\"AttachmentFiles\");\n // Select the attachment files\n query.Select.push(\"Attachments\");\n query.Select.push(\"AttachmentFiles\");\n }\n // Parse the fields\n for (var fieldName in info.fields) {\n var field = info.fields[fieldName];\n // Update the query, based on the type\n switch (field.FieldTypeKind) {\n // Lookup Field\n case __1.SPTypes.FieldType.Lookup:\n // Expand the field\n query.Expand.push(field.InternalName);\n // Select the fields\n query.Select.push(field.InternalName + \"/Id\");\n query.Select.push(field.InternalName + \"/\" + field.LookupField);\n break;\n // User Field\n case __1.SPTypes.FieldType.User:\n // Expand the field\n query.Expand.push(field.InternalName);\n // Select the fields\n query.Select.push(field.InternalName + \"/Id\");\n query.Select.push(field.InternalName + \"/Title\");\n break;\n // Default\n default:\n // See if this is an taxonomy field\n if (field.TypeAsString.startsWith(\"TaxonomyFieldType\")) {\n // Parse the fields\n for (var fieldName_2 in info.fields) {\n var valueField = info.fields[fieldName_2];\n // See if this is the value field\n if (valueField.InternalName == field.InternalName + \"_0\" || valueField.Title == field.InternalName + \"_0\") {\n // Include the value field\n query.Select.push(valueField.InternalName);\n break;\n }\n }\n }\n break;\n }\n }\n // Return the query\n return query;\n },\n // Method to load the item attachments\n loadAttachments: function loadAttachments(info) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Ensure the item id exists\n var itemId = info.item ? info.item.Id : info.itemId;\n if (itemId > 0) {\n // Get the web\n __1.Web(info.webUrl)\n // Get the list\n .Lists(info.listName)\n // Get the item\n .Items(itemId)\n // Get the attachment files\n .AttachmentFiles()\n // Execute the request\n .execute(function (attachments) {\n // Ensure the attachments exist\n if (!attachments.existsFl) {\n // Reject the promise\n reject(attachments.response);\n return;\n }\n // Resolve the promise\n resolve(attachments.results || []);\n }, reject);\n } else {\n // Resolve the promise\n resolve([]);\n }\n });\n },\n // Method to refresh an item\n refreshItem: function refreshItem(info) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Update the query\n info.query = exports.ListForm.generateODataQuery(info, true);\n // Get the item\n info.list.Items(info.item.Id).query(info.query).execute(function (item) {\n // Update the item\n info.item = item;\n // Resolve the promise\n resolve(info);\n }, reject);\n });\n },\n // Method to remove attachments from an item\n removeAttachment: function removeAttachment(info, fileName) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Ensure attachments exist\n if (info.attachments) {\n // Parse the attachments\n for (var i = 0; i < info.attachments.length; i++) {\n // See if this is the target attachment\n var attachment = info.attachments[i];\n if (attachment.FileName == fileName) {\n // Get the web\n __1.Web(info.webUrl)\n // Get the file\n .getFileByServerRelativeUrl(attachment.ServerRelativeUrl)\n // Delete the file\n .delete()\n // Execute the request\n .execute(function () {\n // Resolve the promise\n resolve(info);\n }, reject);\n // Attachment found\n return;\n }\n // Attachment not found\n reject(\"Attachment '\" + fileName + \"' was not found.\");\n }\n } else {\n // Attachments not loaded\n reject(\"Attachment '\" + fileName + \"' was not found.\");\n }\n });\n },\n // Method to save attachments to an existing item\n saveAttachments: function saveAttachments(info, attachmentInfo) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n var itemId = info.item ? info.item.Id : info.itemId;\n if (itemId > 0) {\n // Get the web\n var attachments = __1.Web(info.webUrl)\n // Get the lists\n .Lists(info.listName)\n // Get the item\n .Items(itemId)\n // Get the attachment files\n .AttachmentFiles();\n // Parse the attachment information\n for (var i = 0; i < attachmentInfo.length; i++) {\n var attachment = attachmentInfo[i];\n // Add the attachment\n attachments.add(attachment.name, attachment.data).execute(true);\n }\n // Wait for the requests to complete\n attachments.done(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // Resolve the promise\n resolve.apply(args);\n });\n } else {\n // Resolve the promise\n resolve();\n }\n });\n },\n // Method to save a new or existing item\n saveItem: function saveItem(info, formValues) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // See if this is an existing item\n if (info.item && info.item.update) {\n // Update the item\n info.item.update(formValues).execute(function (response) {\n // Refresh the item\n exports.ListForm.refreshItem(info).then(function (info) {\n // Resolve the promise\n resolve(info);\n }, reject);\n });\n } else {\n // Set the metadata type\n formValues[\"__metadata\"] = { type: info.list.ListItemEntityTypeFullName };\n // Add the item\n info.list.Items().add(formValues)\n // Execute the request\n .execute(function (item) {\n // Update the info\n info.item = item;\n // Refresh the item\n exports.ListForm.refreshItem(info).then(function (info) {\n // Resolve the promise\n resolve(info);\n });\n }, reject);\n }\n });\n },\n // Method to show a file dialog\n showFileDialog: function showFileDialog(info, onSave) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Method to add an attachment\n var addAttachment = function addAttachment(ev) {\n // Get the source file\n var srcFile = ev.target[\"files\"][0];\n if (srcFile) {\n var reader = new FileReader();\n // Call the save event\n onSave ? onSave() : null;\n // Set the file loaded event\n reader.onloadend = function (ev) {\n var attachment = null;\n var ext = srcFile.name.split(\".\");\n ext = ext[ext.length - 1].toLowerCase();\n // Get the list\n info.list\n // Get the item\n .Items(info.item.Id)\n // Get the attachments\n .AttachmentFiles()\n // Add the file\n .add(srcFile.name, ev.target.result)\n // Execute the request\n .execute(function () {\n // Refresh the item\n exports.ListForm.refreshItem(info).then(function (info) {\n // Remove the element\n document.body.removeChild(el);\n // Resolve the promise\n resolve(info);\n });\n }, reject);\n };\n // Set the error\n reader.onerror = function (ev) {\n // Reject the promise\n reject(ev.target.error);\n };\n // Read the file\n reader.readAsArrayBuffer(srcFile);\n }\n };\n // Create the file element\n var el = document.body.querySelector(\"#listform-attachment\");\n if (el == null) {\n el = document.createElement(\"input\");\n // Set the properties\n el.id = \"listform-attachment\";\n el.type = \"file\";\n el.hidden = true;\n el.onchange = addAttachment;\n // Add the element to the body\n document.body.appendChild(el);\n }\n // Show the dialog\n el.click();\n });\n }\n};\n\n//# sourceURL=webpack:///./build/helper/listForm.js?");
/***/ }),
/***/ "./build/helper/listFormField.js":
/*!***************************************!*\
!*** ./build/helper/listFormField.js ***!
\***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar __1 = __webpack_require__(/*! .. */ \"./build/index.js\");\n/**\r\n * List Form Field\r\n */\nexports.ListFormField = {\n // Method to create an instance of the list form field\n create: function create(props) {\n var _fieldInfo = props || {};\n var _reject = null;\n var _resolve = null;\n // Load the field\n var load = function load() {\n // See if the field exists\n if (_fieldInfo.field) {\n // Process the field\n processField();\n }\n // Else, load the field from the information provided\n else {\n // Get the web\n __1.Web(_fieldInfo.webUrl)\n // Get the list\n .Lists(_fieldInfo.listName)\n // Get the fields\n .Fields()\n // Get the field by its internal name\n .getByInternalNameOrTitle(_fieldInfo.name)\n // Execute the request\n .execute(function (field) {\n // Save the field\n _fieldInfo.field = field;\n // Process the field\n processField();\n }, _reject);\n }\n };\n // Method to proces the field and save its information\n var processField = function processField() {\n // Update the field information\n _fieldInfo.defaultValue = _fieldInfo.field.DefaultValue;\n _fieldInfo.readOnly = _fieldInfo.field.ReadOnlyField;\n _fieldInfo.required = _fieldInfo.field.Required ? true : false;\n _fieldInfo.title = _fieldInfo.field.Title;\n _fieldInfo.type = _fieldInfo.field.FieldTypeKind;\n _fieldInfo.typeAsString = _fieldInfo.field.TypeAsString;\n // Update the field info, based on the type\n switch (_fieldInfo.type) {\n // Choice\n case __1.SPTypes.FieldType.Choice:\n case __1.SPTypes.FieldType.MultiChoice:\n var choices = _fieldInfo.field.Choices;\n _fieldInfo.choices = (choices ? choices.results : null) || [];\n _fieldInfo.multi = _fieldInfo.type == __1.SPTypes.FieldType.MultiChoice;\n break;\n // Date/Time\n case __1.SPTypes.FieldType.DateTime:\n var fldDate = _fieldInfo.field;\n _fieldInfo.showTime = fldDate.DisplayFormat == __1.SPTypes.DateFormat.DateTime;\n break;\n // Lookup\n case __1.SPTypes.FieldType.Lookup:\n var fldLookup = _fieldInfo.field;\n _fieldInfo.lookupField = fldLookup.LookupField;\n _fieldInfo.lookupListId = fldLookup.LookupList;\n _fieldInfo.lookupWebId = fldLookup.LookupWebId;\n _fieldInfo.multi = fldLookup.AllowMultipleValues;\n break;\n // Number\n case __1.SPTypes.FieldType.Number:\n var fldNumber = _fieldInfo.field;\n var startIdx = fldNumber.SchemaXml.indexOf('Decimals=\"') + 10;\n _fieldInfo.decimals = startIdx > 10 ? parseInt(fldNumber.SchemaXml.substr(startIdx, fldNumber.SchemaXml.substr(startIdx).indexOf('\"'))) : 0;\n _fieldInfo.maxValue = fldNumber.MaximumValue;\n _fieldInfo.minValue = fldNumber.MinimumValue;\n _fieldInfo.showAsPercentage = fldNumber.SchemaXml.indexOf('Percentage=\"TRUE\"') > 0;\n break;\n // Note\n case __1.SPTypes.FieldType.Note:\n var fldNote = _fieldInfo.field;\n _fieldInfo.multiline = true;\n _fieldInfo.richText = fldNote.RichText;\n _fieldInfo.rows = fldNote.NumberOfLines;\n break;\n // Text\n case __1.SPTypes.FieldType.Text:\n _fieldInfo.multiline = false;\n _fieldInfo.richText = false;\n _fieldInfo.rows = 1;\n break;\n // User\n case __1.SPTypes.FieldType.User:\n var fldUser = _fieldInfo.field;\n _fieldInfo.allowGroups = fldUser.SelectionMode == __1.SPTypes.FieldUserSelectionType.PeopleAndGroups;\n _fieldInfo.multi = fldUser.AllowMultipleValues;\n break;\n // Default\n default:\n // See if this is an MMS field\n if (_fieldInfo.typeAsString.startsWith(\"TaxonomyFieldType\")) {\n var fldMMS = _fieldInfo.field;\n _fieldInfo.multi = fldMMS.AllowMultipleValues;\n _fieldInfo.termId = fldMMS.IsAnchorValid ? fldMMS.AnchorId : fldMMS.TermSetId;\n _fieldInfo.termSetId = fldMMS.TermSetId;\n _fieldInfo.termStoreId = fldMMS.SspId;\n }\n break;\n }\n // Resolve the promise\n _resolve(_fieldInfo);\n };\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Save the methods\n _resolve = resolve;\n _reject = reject;\n // See if the field exists\n if (_fieldInfo.field) {\n // Process the field\n processField();\n } else {\n // Load the field\n load();\n }\n });\n },\n // Method to load the lookup data\n loadLookupData: function loadLookupData(info, queryTop) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Get the current site collection\n __1.Site()\n // Get the web containing the lookup list\n .openWebById(info.lookupWebId)\n // Execute the request\n .execute(function (web) {\n // Get the list\n web.Lists()\n // Get the list by id\n .getById(info.lookupListId)\n // Get the items\n .Items()\n // Set the query\n .query({\n GetAllItems: true,\n Select: [\"ID\", info.lookupField],\n Top: queryTop > 0 && queryTop <= 5000 ? queryTop : 500\n })\n // Execute the request\n .execute(function (items) {\n // Resolve the promise\n resolve(items.results);\n }, reject);\n }, reject);\n });\n },\n // Method to load the mms data\n loadMMSData: function loadMMSData(info) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Load the term set\n __1.Helper.Taxonomy.getTermSetById(info.termStoreId, info.termSetId).then(function (termSet) {\n // Get the target root term\n var root = __1.Helper.Taxonomy.findById(termSet, info.termId);\n // See if the root node doesn't exist\n if (root == null) {\n // Set the root to the term set\n root = __1.Helper.Taxonomy.findById(termSet, info.termSetId);\n }\n // Resolve the request\n resolve(__1.Helper.Taxonomy.toArray(root));\n }, reject);\n });\n },\n // Method to load the mms value field\n loadMMSValueField: function loadMMSValueField(info) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Get the web\n __1.Web(info.webUrl)\n // Get the list\n .Lists(info.listName)\n // Get the fields\n .Fields()\n // Get the hidden field\n .getByInternalNameOrTitle(info.name + \"_0\")\n // Execute the request\n .execute(\n // Success\n function (field) {\n // Resolve the promise\n resolve(field);\n },\n // Error\n function () {\n // Reject w/ a message\n reject(\"Unable to find the hidden value field for '\" + info.name + \"'.\");\n });\n });\n }\n};\n\n//# sourceURL=webpack:///./build/helper/listFormField.js?");
/***/ }),
/***/ "./build/helper/loader.js":
/*!********************************!*\
!*** ./build/helper/loader.js ***!
\********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _this = undefined;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ../lib */ \"./build/lib/index.js\");\n/**\r\n * Loader\r\n */\nexports.Loader = {\n // Flag to determine if the SharePoint core libraries have been loaded\n loaded: false,\n // Method to wait for the SharePoint core libraries to be loaded\n waitForSPLibs: function waitForSPLibs(callback, timeout, loadLibraries) {\n if (timeout === void 0) {\n timeout = 2500;\n }\n if (loadLibraries === void 0) {\n loadLibraries = true;\n }\n var counter = 0;\n // Determine the number of iterations\n var maxLoops = timeout / 25;\n // See if the flag has already been set\n if (_this.loaded) {\n // Execute the callback\n callback ? callback() : null;\n return;\n }\n // See if we are loading the libraries\n if (loadLibraries) {\n // Parse the files to load\n [\"MicrosoftAjax.js\", \"init.js\", \"sp.runtime.js\", \"sp.js\", \"sp.core.js\", \"core.js\"].every(function (fileName) {\n // Create the script element\n var el = lib_1.ContextInfo.document.createElement(\"script\");\n // Set the properties\n el.setAttribute(\"src\", \"/_layouts/15/\" + fileName);\n el.setAttribute(\"type\", \"text/javascript\");\n // Add the element to the head\n lib_1.ContextInfo.document.head.appendChild(el);\n // Continue the loop\n return true;\n });\n }\n // Loop until the libraries are loaded\n var intervalId = setInterval(function () {\n var maxLoopFl = ++counter > maxLoops;\n // See if the page context exists or if we have hit the max attempts\n if (lib_1.ContextInfo.existsFl || maxLoopFl) {\n // Stop the loop\n clearInterval(intervalId);\n // Execute the callback\n callback ? callback() : null;\n }\n }, 25);\n }\n};\n\n//# sourceURL=webpack:///./build/helper/loader.js?");
/***/ }),
/***/ "./build/helper/methods.js":
/*!*********************************!*\
!*** ./build/helper/methods.js ***!
\*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ../lib */ \"./build/lib/index.js\");\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Creates a document set item.\r\n * @param name - The name of the document set folder to create.\r\n * @param listName - The name of the document set library.\r\n * @param webUrl - The url of the web containing the document set library.\r\n */\nexports.createDocSet = function (name, listName, webUrl) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Get the document set's root folder\n lib_1.Web(webUrl).Lists(listName).query({ Expand: [\"ContentTypes\", \"ParentWeb\", \"RootFolder\"] }).execute(function (list) {\n // Parse the content types\n var ctId = \"0x0120D520\";\n for (var i = 0; i < list.ContentTypes.results.length; i++) {\n // See if this is the document set content type\n if (list.ContentTypes.results[i].StringId.startsWith(ctId)) {\n // Set the content type id\n ctId = list.ContentTypes.results[i].StringId;\n break;\n }\n }\n // Create the document set item\n exports.request({\n method: \"POST\",\n url: list.ParentWebUrl + \"/_vti_bin/listdata.svc/\" + list.Title.replace(/ /g, \"\"),\n headers: {\n Accept: \"application/json;odata=verbose\",\n \"Content-Type\": \"application/json;odata=verbose\",\n Slug: list.RootFolder.ServerRelativeUrl + \"/\" + name + \"|\" + ctId,\n \"X-Requested-With\": \"XMLHttpRequest\"\n },\n data: {\n Title: name,\n Path: list.RootFolder.ServerRelativeUrl\n }\n }).then(function (response) {\n // See if the request was successful\n if (response.d && response.d.Id > 0) {\n // Get the document set item and resolve the promise\n lib_1.Web(webUrl).Lists(listName).Items(response.d.Id).execute(resolve);\n } else {\n // Reject the promise\n reject(response[\"response\"]);\n }\n });\n }, reject);\n });\n};\n/**\r\n * Convert a JSON string to a base object\r\n */\nexports.parse = function (jsonString) {\n // Try to parse the string\n try {\n var obj = JSON.parse(jsonString);\n // Create a base object\n var base = new utils_1.Base(obj.props);\n // Set the properties\n base.response = obj.response;\n base.status = obj.status;\n base.targetInfo = obj.targetInfo;\n // Update the object\n base.updateDataObject(false);\n // Return the base object\n return base;\n } catch (_a) {}\n return null;\n};\n/**\r\n * XML HTTP Request\r\n */\nexports.request = function (props) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Execute the request and resolve the promise\n new utils_1.Base({\n method: props.method || \"GET\",\n url: props.url,\n requestHeader: props.headers,\n data: props.data\n }).execute(resolve, reject);\n });\n};\n\n//# sourceURL=webpack:///./build/helper/methods.js?");
/***/ }),
/***/ "./build/helper/ribbonLink.js":
/*!************************************!*\
!*** ./build/helper/ribbonLink.js ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\r\n * Ribbon Link\r\n */\nexports.RibbonLink = function (props) {\n var link = null;\n // Default the append flag\n var appendFl = typeof props.appendFl === \"boolean\" ? props.appendFl : false;\n // Get the ribbon top bar\n var topBar = document.querySelector(\"#RibbonContainer-TabRowRight\");\n if (topBar) {\n // Get the link\n link = topBar.querySelector(\"#\" + props.id);\n if (link == null) {\n // Create the link\n link = document.createElement(\"a\");\n link.className = \"ms-promotedActionButton \" + (props.className || \"\");\n link.href = props.href ? props.href : \"javascript:void()\";\n link.innerHTML = \"<span class='ms-promotedActionButton-text'>\" + props.title + \"</span>\";\n link.id = props.id;\n link.onclick = props.onClick;\n // Add the link\n appendFl ? topBar.appendChild(link) : topBar.insertBefore(link, topBar.firstChild);\n }\n }\n // Return the link\n return link;\n};\n\n//# sourceURL=webpack:///./build/helper/ribbonLink.js?");
/***/ }),
/***/ "./build/helper/sbLink.js":
/*!********************************!*\
!*** ./build/helper/sbLink.js ***!
\********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ../lib */ \"./build/lib/index.js\");\nvar ribbonLink_1 = __webpack_require__(/*! ./ribbonLink */ \"./build/helper/ribbonLink.js\");\n/**\r\n * Suite Bar Link\r\n */\nexports.SuiteBarLink = function (props) {\n var link = null;\n // Default the append flag\n var appendFl = typeof props.appendFl === \"boolean\" ? props.appendFl : true;\n // Get the suite bar top links\n var topLinks = document.querySelector(\"#suiteLinksBox > ul\");\n if (topLinks) {\n // Query for the link, and ensure it exists\n link = topLinks.querySelector(\"#\" + props.id);\n if (link == null) {\n // Create a list link\n link = document.createElement(\"a\");\n link.className = \"ms-core-suiteLink-a \" + (props.className || \"\");\n link.href = props.href ? props.href : \"javascript:void()\";\n link.id = props.id;\n link.innerHTML = props.title;\n link.onclick = props.onClick;\n // Create the suite bar link\n var sbLink = document.createElement(\"li\");\n sbLink.className = \"ms-core-suiteLink\";\n sbLink.appendChild(link);\n // Append the item to the list\n appendFl ? topLinks.appendChild(sbLink) : topLinks.insertBefore(sbLink, topLinks.firstChild);\n }\n }\n // Else, see if this is SPO\n else if (lib_1.ContextInfo.isSPO) {\n // Create this as a ribbon link\n link = ribbonLink_1.RibbonLink(props);\n }\n // Return the link\n return link;\n};\n\n//# sourceURL=webpack:///./build/helper/sbLink.js?");
/***/ }),
/***/ "./build/helper/sp.js":
/*!****************************!*\
!*** ./build/helper/sp.js ***!
\****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\r\n * Modal Dialog\r\n */\nexports.ModalDialog = {\n // Closes the dialog\n close: function close(dialogResult) {\n // Load the library and call the method\n exports.ModalDialog.load().then(function () {\n SP.UI.ModalDialog.close(dialogResult);\n });\n },\n // Close the dialog\n commonModalDialogClose: function commonModalDialogClose(dialogResult, returnVal) {\n // Load the library and call the method\n exports.ModalDialog.load().then(function () {\n SP.UI.ModalDialog.commonModalDialogClose(dialogResult, returnVal);\n });\n },\n // Open a dialog\n commonModalDialogOpen: function commonModalDialogOpen(url, options, callback, args) {\n // Load the library and call the method\n exports.ModalDialog.load().then(function () {\n SP.UI.ModalDialog.commonModalDialogOpen(url, options, callback, args);\n });\n },\n // Method to ensure the core library is loaded\n load: function load() {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // See if the class exists\n if (SP && SP.UI && SP.UI.ModalDialog) {\n resolve();\n } else {\n // Wait for the core script to be loaded\n SP.SOD.executeFunc(\"sp.js\", \"SP.UI.ModalDialog\", function () {\n // Resolve the promise\n resolve();\n });\n }\n });\n },\n // Opens a pop-up page\n OpenPopUpPage: function OpenPopUpPage(url, callback, width, height) {\n // Load the library and call the method\n exports.ModalDialog.load().then(function () {\n SP.UI.ModalDialog.OpenPopUpPage(url, callback, width, height);\n });\n },\n // Refreshes the page\n RefreshPage: function RefreshPage(dialogResult) {\n // Load the library and call the method\n exports.ModalDialog.load().then(function () {\n SP.UI.ModalDialog.RefreshPage(dialogResult);\n });\n },\n // Shows a modal dialog\n showModalDialog: function showModalDialog(options) {\n // Load the library and call the method\n exports.ModalDialog.load().then(function () {\n SP.UI.ModalDialog.showModalDialog(options);\n });\n },\n // Shows a pop-up dialog\n ShowPopupDialog: function ShowPopupDialog(url) {\n // Load the library and call the method\n exports.ModalDialog.load().then(function () {\n SP.UI.ModalDialog.ShowPopupDialog(url);\n });\n },\n // Shows a wait screen\n showWaitScreenSize: function showWaitScreenSize(title, message, callback, height, width) {\n // Load the library and call the method\n exports.ModalDialog.load().then(function () {\n SP.UI.ModalDialog.showWaitScreenSize(title, message, callback, height, width);\n });\n },\n // Shows a wait screen w/ no close button\n showWaitScreenWithNoClose: function showWaitScreenWithNoClose(title, message, height, width) {\n // Load the library and call the method\n exports.ModalDialog.load().then(function () {\n SP.UI.ModalDialog.showWaitScreenWithNoClose(title, message, height, width);\n });\n }\n};\n/**\r\n * Notification\r\n */\nexports.Notify = {\n // Adds a notification\n addNotification: function addNotification(html, sticky) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Load the library and call the method\n exports.Notify.load().then(function () {\n resolve(SP.UI.Notify.addNotification(html, sticky));\n });\n });\n },\n // Method to ensure the core library is loaded\n load: function load() {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // See if the class exists\n if (SP && SP.UI && SP.UI.Notify) {\n resolve();\n } else {\n // Wait for the core script to be loaded\n SP.SOD.executeFunc(\"sp.js\", \"SP.UI.Notify\", function () {\n // Resolve the promise\n resolve();\n });\n }\n });\n },\n // Removes a notification\n removeNotification: function removeNotification(id) {\n // Load the library and call the method\n exports.Notify.load().then(function () {\n SP.UI.Notify.removeNotification(id);\n });\n }\n};\n/**\r\n * Status\r\n */\nexports.Status = {\n // Adds a status\n addStatus: function addStatus(title, html, prepend) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Load the library\n exports.Status.load().then(function () {\n // Add the status and resolve the promise\n resolve(SP.UI.Status.addStatus(title, html, prepend));\n });\n });\n },\n // Appends a status\n appendStatus: function appendStatus(id, title, html) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Load the library\n exports.Status.load().then(function () {\n // Add the status and resolve the promise\n resolve(SP.UI.Status.appendStatus(id, title, html));\n });\n });\n },\n // Method to ensure the core library is loaded\n load: function load() {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // See if the class exists\n if (SP && SP.UI && SP.UI.Status) {\n resolve();\n } else {\n // Wait for the core script to be loaded\n SP.SOD.executeFunc(\"sp.js\", \"SP.UI.Status\", function () {\n // Resolve the promise\n resolve();\n });\n }\n });\n },\n // Removes all status messages\n removeAllStatus: function removeAllStatus(hide) {\n // Load the library and call the method\n exports.Status.load().then(function () {\n SP.UI.Status.removeAllStatus(hide);\n });\n },\n // Removes a status\n removeStatus: function removeStatus(id) {\n // Load the library and call the method\n exports.Status.load().then(function () {\n SP.UI.Status.removeStatus(id);\n });\n },\n // Sets the status color\n setStatusPriColor: function setStatusPriColor(id, color) {\n // Load the library and call the method\n exports.Status.load().then(function () {\n SP.UI.Status.setStatusPriColor(id, color);\n });\n },\n // Updates the status\n updateStatus: function updateStatus(id, html) {\n // Load the library and call the method\n exports.Status.load().then(function () {\n SP.UI.Status.updateStatus(id, html);\n });\n }\n};\n\n//# sourceURL=webpack:///./build/helper/sp.js?");
/***/ }),
/***/ "./build/helper/spCfg.js":
/*!*******************************!*\
!*** ./build/helper/spCfg.js ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nfunction __export(m) {\n for (var p in m) {\n if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(__webpack_require__(/*! ./spCfgTypes */ \"./build/helper/spCfgTypes.js\"));\nvar lib_1 = __webpack_require__(/*! ../lib */ \"./build/lib/index.js\");\nvar __1 = __webpack_require__(/*! .. */ \"./build/index.js\");\nvar _1 = __webpack_require__(/*! . */ \"./build/helper/index.js\");\n/**\r\n * SharePoint Configuration\r\n */\nexports.SPConfig = function (cfg, webUrl) {\n // The selected configuration type to install\n var _cfgType;\n // The target name to install/uninstall\n var _targetName;\n /**\r\n * Methods\r\n */\n // Method to create the content types\n var createContentTypes = function createContentTypes(contentTypes, cfgContentTypes) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Ensure fields exist\n if (cfgContentTypes == null || cfgContentTypes.length == 0) {\n // Resolve the promise\n resolve();\n return;\n }\n var _loop_1 = function _loop_1(i) {\n var cfgContentType = cfgContentTypes[i];\n // See if this content type already exists\n var ct = isInCollection(\"Name\", cfgContentType.Name, contentTypes.results);\n if (ct) {\n // Log\n console.log(\"[gd-sprest][Content Type] The content type '\" + cfgContentType.Name + \"' already exists.\");\n // Update the configuration\n cfgContentType.ContentType = ct;\n } else {\n // Log\n console.log(\"[gd-sprest][Content Type] Creating the '\" + cfgContentType.Name + \"' content type.\");\n // See if the parent name exists\n if (cfgContentType.ParentName) {\n // Get the web containing the parent content type\n lib_1.Web(cfgContentType.ParentWebUrl || webUrl)\n // Get the content types\n .ContentTypes()\n // Filter for the parent name\n .query({\n Filter: \"Name eq '\" + cfgContentType.ParentName + \"'\"\n }).execute(function (parent) {\n // See if the parent exists\n if (parent.results[0]) {\n // Add the available content type\n contentTypes.addAvailableContentType(parent.results[0].Id.StringValue).execute(function (ct) {\n // See if it was successful\n if (ct.existsFl) {\n // Update the name\n (function () {\n return new Promise(function (resolve, reject) {\n // Ensure the name doesn't need to be updated\n if (ct.Name != cfgContentType.Name) {\n ct.update({ Name: cfgContentType.Name }).execute(function () {\n // Resolve the promise\n resolve();\n });\n } else {\n // Resolve the promise\n resolve();\n }\n });\n })().then(function () {\n // Log\n console.log(\"[gd-sprest][Content Type] The content type '\" + cfgContentType.Name + \"' was created successfully.\");\n // Update the configuration\n cfgContentType.ContentType = ct;\n // Trigger the event\n cfgContentType.onCreated ? cfgContentType.onCreated(ct) : null;\n });\n } else {\n // Log\n console.log(\"[gd-sprest][Content Type] The content type '\" + cfgContentType.Name + \"' failed to be created.\");\n console.error(\"[gd-sprest][Field] Error: \" + ct.response);\n }\n }, true);\n } else {\n // Log\n console.log(\"[gd-sprest][Content Type] The parent content type '\" + cfgContentType.Name + \"' was not found.\");\n }\n }, reject);\n } else {\n // Create the content type\n contentTypes.add({\n Description: cfgContentType.Description,\n Group: cfgContentType.Group,\n Id: {\n __metadata: { type: \"SP.ContentTypeId\" },\n StringValue: cfgContentType.Id ? cfgContentType.Id.StringValue : \"0x0100\" + lib_1.ContextInfo.generateGUID().replace(\"{\", \"\").replace(\"-\", \"\").replace(\"}\", \"\")\n },\n Name: cfgContentType.Name\n }).execute(function (ct) {\n // See if it was successful\n if (ct.existsFl) {\n // Log\n console.log(\"[gd-sprest][Content Type] The content type '\" + cfgContentType.Name + \"' was created successfully.\");\n // Update the configuration\n cfgContentType.ContentType = ct;\n // Trigger the event\n cfgContentType.onCreated ? cfgContentType.onCreated(ct) : null;\n } else {\n // Log\n console.log(\"[gd-sprest][Content Type] The content type '\" + cfgContentType.Name + \"' failed to be created.\");\n console.error(\"[gd-sprest][Field] Error: \" + ct.response);\n }\n }, reject, true);\n }\n }\n };\n // Parse the configuration\n for (var i = 0; i < cfgContentTypes.length; i++) {\n _loop_1(i);\n }\n // Wait for the requests to complete\n contentTypes.done(function () {\n var _loop_2 = function _loop_2(i) {\n var cfgContentType = cfgContentTypes[i];\n var cfgUpdate = {};\n var updateFl = false;\n // Ensure the content type exists\n if (cfgContentType.ContentType == null) {\n return \"continue\";\n }\n /**\r\n * See if we need to update the properties\r\n */\n // Description\n if (cfgContentType.ContentType.Description != cfgContentType.Description) {\n // Update the configuration\n cfgUpdate.Description = cfgContentType.Description;\n // Log\n console.log(\"[gd-sprest][Content Type][\" + cfgContentType.ContentType.Name + \"] Description requires update.\");\n // Set the flag\n updateFl = true;\n }\n // Group\n if (cfgContentType.ContentType.Group != cfgContentType.Group) {\n // Update the configuration\n cfgUpdate.Group = cfgContentType.Group;\n // Log\n console.log(\"[gd-sprest][Content Type][\" + cfgContentType.ContentType.Name + \"] Group requires update.\");\n // Set the flag\n updateFl = true;\n }\n // JSLink\n if (cfgContentType.ContentType.JSlink != cfgContentType.JSLink) {\n // Update the configuration\n cfgUpdate.JSLink = cfgContentType.JSLink;\n // Log\n console.log(\"[gd-sprest][Content Type][\" + cfgContentType.ContentType.Name + \"] JSLink requires update.\");\n // Set the flag\n updateFl = true;\n }\n // Name\n if (cfgContentType.ContentType.Name != cfgContentType.Name) {\n // Update the configuration\n cfgUpdate.Name = cfgContentType.Name;\n // Log\n console.log(\"[gd-sprest][Content Type][\" + cfgContentType.ContentType.Name + \"] Name requires update.\");\n // Set the flag\n updateFl = true;\n }\n // See if an update is needed\n if (updateFl) {\n // Log\n console.log(\"[gd-sprest][Content Type][\" + cfgContentType.ContentType.Name + \"] Updating the webpart.\");\n // Update the content type\n cfgContentType.ContentType.update({ JSLink: cfgContentType.JSLink }).execute(function () {\n // Log\n console.log(\"[gd-sprest][Content Type][\" + cfgContentType.ContentType.Name + \"] Update request completed.\");\n // Trigger the event\n cfgContentType.onUpdated ? cfgContentType.onUpdated(cfgContentType.ContentType) : null;\n });\n } else {\n // Trigger the event\n cfgContentType.onUpdated ? cfgContentType.onUpdated(cfgContentType.ContentType) : null;\n }\n };\n // Parse the configuration\n for (var i = 0; i < cfgContentTypes.length; i++) {\n _loop_2(i);\n }\n // Wait for the requests to complete\n contentTypes.done(function () {\n // Resolve the promise\n resolve();\n });\n });\n });\n };\n // Method to create the fields\n var createFields = function createFields(fields, cfgFields) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Ensure fields exist\n if (cfgFields == null || cfgFields.length == 0) {\n // Resolve the promise\n resolve();\n return;\n }\n var _loop_3 = function _loop_3(i) {\n var cfgField = cfgFields[i];\n // See if this field already exists\n var field = isInCollection(\"InternalName\", cfgField.name, fields.results);\n if (field) {\n // Log\n console.log(\"[gd-sprest][Field] The field '\" + cfgField.name + \"' already exists.\");\n // Trigger the event\n cfgField.onUpdated ? cfgField.onUpdated(field) : null;\n } else {\n // Log\n console.log(\"[gd-sprest][Field] Creating the '\" + cfgField.name + \"' field.\");\n // The field created event\n var onFieldCreated_1 = function onFieldCreated_1(field) {\n // See if it was successful\n if (field.existsFl) {\n // Log\n console.log(\"[gd-sprest][Field] The field '\" + field.InternalName + \"' was created successfully.\");\n // Trigger the event\n cfgField.onCreated ? cfgField.onCreated(field) : null;\n } else {\n // Log\n console.log(\"[gd-sprest][Field] The field '\" + cfgField.name + \"' failed to be created.\");\n console.error(\"[gd-sprest][Field] Error: \" + field.response);\n }\n };\n // Compute the schema xml\n _1.FieldSchemaXML(cfgField).then(function (response) {\n var schemas = typeof response === \"string\" ? [response] : response;\n // Parse the fields to add\n for (var i_1 = 0; i_1 < schemas.length; i_1++) {\n // Add the field\n fields.createFieldAsXml(schemas[i_1]).execute(onFieldCreated_1, true);\n }\n });\n }\n };\n // Parse the fields\n for (var i = 0; i < cfgFields.length; i++) {\n _loop_3(i);\n }\n // Wait for the requests to complete\n fields.done(function () {\n // Resolve the promise\n resolve();\n });\n });\n };\n // Method to create the lists\n var createLists = function createLists(lists, cfgLists) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n var _loop_4 = function _loop_4(i) {\n var cfgList = cfgLists[i];\n // See if the target name exists\n if (_cfgType && _targetName) {\n // Ensure it's for this list\n if (cfgList.ListInformation.Title.toLowerCase() != _targetName) {\n return \"continue\";\n }\n }\n // See if this content type already exists\n var list = isInCollection(\"Title\", cfgList.ListInformation.Title, lists.results);\n if (list) {\n // Log\n console.log(\"[gd-sprest][List] The list '\" + cfgList.ListInformation.Title + \"' already exists.\");\n } else {\n // Log\n console.log(\"[gd-sprest][List] Creating the '\" + cfgList.ListInformation.Title + \"' list.\");\n // Update the list name and remove spaces\n var listInfo_1 = cfgList.ListInformation;\n var listName_1 = listInfo_1.Title;\n listInfo_1.Title = listName_1.replace(/ /g, \"\");\n // Add the list\n lists.add(listInfo_1)\n // Execute the request\n .execute(function (list) {\n // Restore the list name in the configuration\n listInfo_1.Title = listName_1;\n // See if the request was successful\n if (list.existsFl) {\n // See if we need to update the list\n if (list.existsFl && list.Title != listName_1) {\n // Update the list\n list.update({ Title: listName_1 }).execute(function () {\n // Log\n console.log(\"[gd-sprest][List] The list '\" + list.Title + \"' was created successfully.\");\n });\n } else {\n // Log\n console.log(\"[gd-sprest][List] The list '\" + list.Title + \"' was created successfully.\");\n }\n // Trigger the event\n cfgList.onCreated ? cfgList.onCreated(list) : null;\n } else {\n // Log\n console.log(\"[gd-sprest][List] The list '\" + listInfo_1.Title + \"' failed to be created.\");\n console.log(\"[gd-sprest][List] Error: '\" + list.response);\n }\n }, reject);\n }\n };\n // Parse the content types\n for (var i = 0; i < cfgLists.length; i++) {\n _loop_4(i);\n }\n // Wait for the requests to complete\n lists.done(function () {\n // Update the lists\n updateLists(cfgLists).then(function () {\n // Resolve the promise\n resolve();\n });\n });\n });\n };\n // Method to create the user custom actions\n var createUserCustomActions = function createUserCustomActions(customActions, cfgCustomActions) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // See if the configuration type exists\n if (_cfgType) {\n // Ensure it's for this type\n if (_cfgType != _1.SPCfgType.SiteUserCustomActions || _cfgType != _1.SPCfgType.WebUserCustomActions) {\n // Resolve the promise\n resolve();\n return;\n }\n }\n // Ensure the lists exist\n if (cfgCustomActions == null || cfgCustomActions.length == 0) {\n // Resolve the promise and return it\n resolve();\n return;\n }\n // Parse the custom actions\n for (var i = 0; i < cfgCustomActions.length; i++) {\n var cfgCustomAction = cfgCustomActions[i];\n // See if the target name exists\n if (_cfgType && _targetName) {\n // Ensure it's for this custom action\n if (cfgCustomAction.Name.toLowerCase() != _targetName || cfgCustomAction.Title.toLowerCase() != _targetName) {\n // Skip this custom action\n continue;\n }\n }\n // See if this custom action already exists\n if (isInCollection(\"Name\", cfgCustomAction.Name, customActions.results)) {\n // Log\n console.log(\"[gd-sprest][Custom Action] The custom action '\" + cfgCustomAction.Name + \"' already exists.\");\n } else {\n // See if rights exist\n if (cfgCustomAction.Rights) {\n // Update the value\n cfgCustomAction.Rights = updateBasePermissions(cfgCustomAction.Rights);\n }\n // Add the custom action\n customActions.add(cfgCustomAction).execute(function (ca) {\n // Ensure it exists\n if (ca.existsFl) {\n // Log\n console.log(\"[gd-sprest][Custom Action] The custom action '\" + ca.Name + \"' was created successfully.\");\n } else {\n // Log\n console.log(\"[gd-sprest][Custom Action] The custom action '\" + ca.Name + \"' failed to be created.\");\n console.log(\"[gd-sprest][Custom Action] Error: \" + ca.response);\n }\n }, reject, true);\n }\n }\n // Wait for the requests to complete\n customActions.done(function () {\n // Resolve the promise\n resolve();\n });\n });\n };\n // Method to create the list views\n var createViews = function createViews(views, cfgViews) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Ensure the list views exist\n if (cfgViews == null || cfgViews.length == 0) {\n // Resolve the promise and return it\n resolve();\n return;\n }\n var _loop_5 = function _loop_5(i) {\n var cfgView = cfgViews[i];\n // See if this view exists\n var view = isInCollection(\"Title\", cfgView.ViewName, views.results);\n if (view) {\n // Log\n console.log(\"[gd-sprest][View] The view '\" + cfgView.ViewName + \"' already exists.\");\n } else {\n // Add the view\n views.add({\n Title: cfgView.ViewName,\n ViewQuery: cfgView.ViewQuery\n }).execute(function (view) {\n // Ensure it exists\n if (view.existsFl) {\n // Log\n console.log(\"[gd-sprest][View] The view '\" + cfgView.ViewName + \"' was created successfully.\");\n // Trigger the event\n cfgView.onCreated ? cfgView.onCreated(view) : null;\n } else {\n // Log\n console.log(\"[gd-sprest][View] The view '\" + cfgView.ViewName + \"' failed to be created.\");\n console.log(\"[gd-sprest][View] Error: \" + view.response);\n }\n }, reject, true);\n }\n };\n // Parse the views\n for (var i = 0; i < cfgViews.length; i++) {\n _loop_5(i);\n }\n // Wait for the requests to complete\n views.done(function () {\n // Update the views\n updateViews(views, cfgViews).then(function () {\n // Resolve the promise\n resolve();\n });\n });\n });\n };\n // Method to create the web parts\n var createWebParts = function createWebParts() {\n // Return a promise\n return new Promise(function (resolve, reject) {\n var cfgWebParts = cfg.WebPartCfg;\n // Log\n console.log(\"[gd-sprest][WebPart] Creating the web parts.\");\n // Get the root web\n lib_1.Web(lib_1.ContextInfo.siteServerRelativeUrl)\n // Get the web part catalog\n .getCatalog(__1.SPTypes.ListTemplateType.WebPartCatalog)\n // Get the root folder\n .RootFolder()\n // Expand the files and items\n .query({\n Expand: [\"Files\"]\n })\n // Execute the request\n .execute(function (folder) {\n var ctr = 0;\n var _loop_6 = function _loop_6(i) {\n var cfgWebPart = cfgWebParts[i];\n // See if the target name exists\n if (_cfgType && _targetName) {\n // Ensure it's for this list\n if (cfgWebPart.FileName.toLowerCase() != _targetName) {\n return \"continue\";\n }\n }\n // The post execute method\n var postExecute = function postExecute() {\n // Increment the counter\n if (++ctr >= cfgWebParts.length) {\n // Resolve the promise\n resolve();\n }\n };\n // See if this webpart exists\n var file = isInCollection(\"Name\", cfgWebPart.FileName, folder.Files.results);\n if (file.existsFl) {\n // Log\n console.log(\"[gd-sprest][WebPart] The webpart '\" + cfgWebPart.FileName + \"' already exists.\");\n // Trigger the event\n cfgWebPart.onUpdated ? cfgWebPart.onUpdated(file) : null;\n // Execute the post event\n postExecute();\n } else {\n // Trim the xml\n var xml = cfgWebPart.XML.trim();\n // Convert the string to an array buffer\n var buffer = new ArrayBuffer(xml.length * 2);\n var bufferView = new Uint16Array(buffer);\n for (var j = 0; j < xml.length; j++) {\n bufferView[j] = xml.charCodeAt(j);\n }\n // Create the webpart, but execute the requests one at a time\n folder.Files.add(true, cfgWebPart.FileName, buffer).execute(function (file) {\n // See if group exists\n if (cfgWebPart.Group) {\n // Set the target to the root web\n lib_1.Web(lib_1.ContextInfo.siteServerRelativeUrl)\n // Get the web part catalog\n .getCatalog(__1.SPTypes.ListTemplateType.WebPartCatalog)\n // Get the Items\n .Items()\n // Query for this webpart\n .query({\n Filter: \"FileLeafRef eq '\" + cfgWebPart.FileName + \"'\"\n })\n // Execute the request\n .execute(function (items) {\n // Update the item\n items.results[0].update({\n Group: cfgWebPart.Group\n }).execute(postExecute);\n });\n }\n // Log\n console.log(\"[gd-sprest][WebPart] The '\" + file.Name + \"' webpart file was uploaded successfully.\");\n // Trigger the event\n cfgWebPart.onCreated ? cfgWebPart.onCreated(file) : null;\n });\n }\n };\n // Parse the configuration\n for (var i = 0; i < cfgWebParts.length; i++) {\n _loop_6(i);\n }\n }, reject);\n });\n };\n // Method to see if an object exists in a collection\n var isInCollection = function isInCollection(key, value, collection) {\n var valueLower = value.toLowerCase();\n // Parse the collection\n for (var i = 0; i < collection.length; i++) {\n var keyValue = collection[i][key];\n keyValue = keyValue ? keyValue.toLowerCase() : \"\";\n // See if the item exists\n if (valueLower == keyValue) {\n // Return true\n return collection[i];\n }\n }\n // Not in the collection\n return false;\n };\n // Method to remove the content type\n var removeContentTypes = function removeContentTypes(contentTypes, cfgContentTypes) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Ensure the content types exist\n if (cfgContentTypes == null || cfgContentTypes.length == 0) {\n // Resolve the promise and return it\n resolve();\n return;\n }\n var _loop_7 = function _loop_7(i) {\n var cfgContentType = cfgContentTypes[i];\n // Get the field\n var ct = isInCollection(\"Name\", cfgContentType.Name, contentTypes.results);\n if (ct) {\n // Remove the field\n ct.delete().execute(function () {\n // Log\n console.log(\"[gd-sprest][Field] The content type '\" + ct.Name + \"' was removed.\");\n }, reject, true);\n }\n };\n // Parse the configuration\n for (var i = 0; i < cfgContentTypes.length; i++) {\n _loop_7(i);\n }\n // Wait for the requests to complete\n contentTypes.done(function () {\n // Resolve the promise\n resolve();\n });\n });\n };\n // Method to remove the fields\n var removeFields = function removeFields(fields, cfgFields) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Ensure the fields exist\n if (cfgFields == null || cfgFields.length == 0) {\n // Resolve the promise and return it\n resolve();\n return;\n }\n var _loop_8 = function _loop_8(i) {\n var cfgField = cfgFields[i];\n // Get the field\n var field = isInCollection(\"InternalName\", cfgField.name, fields.results);\n if (field) {\n // Remove the field\n field.delete().execute(function () {\n // Log\n console.log(\"[gd-sprest][Field] The field '\" + field.InternalName + \"' was removed.\");\n }, reject, true);\n }\n };\n // Parse the configuration\n for (var i = 0; i < cfgFields.length; i++) {\n _loop_8(i);\n }\n // Wait for the requests to complete\n fields.done(function () {\n // Resolve the promise\n resolve();\n });\n });\n };\n // Method to remove the lists\n var removeLists = function removeLists(lists, cfgLists) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // See if the configuration type exists\n if (_cfgType) {\n // Ensure it's for this type\n if (_cfgType != _1.SPCfgType.Lists) {\n // Resolve the promise\n resolve();\n return;\n }\n }\n // Ensure the lists exist\n if (cfgLists == null || cfgLists.length == 0) {\n // Resolve the promise and return it\n resolve();\n return;\n }\n var _loop_9 = function _loop_9(i) {\n var cfgList = cfgLists[i];\n // See if the target name exists\n if (_cfgType && _targetName) {\n // Ensure it's for this list\n if (cfgList.ListInformation.Title.toLowerCase() != _targetName) {\n return \"continue\";\n }\n }\n // Get the list\n var list = isInCollection(\"Title\", cfgList.ListInformation.Title, lists.results);\n if (list) {\n // Remove the list\n list.delete().execute(function () {\n // Log\n console.log(\"[gd-sprest][List] The list '\" + list.Title + \"' was removed.\");\n }, reject, true);\n }\n };\n // Parse the configuration\n for (var i = 0; i < cfgLists.length; i++) {\n _loop_9(i);\n }\n // Wait for the requests to complete\n lists.done(function () {\n // Resolve the promise\n resolve();\n });\n });\n };\n // Method to remove the user custom actions\n var removeUserCustomActions = function removeUserCustomActions(customActions, cfgCustomActions) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // See if the configuration type exists\n if (_cfgType) {\n // Ensure it's for this type\n if (_cfgType != _1.SPCfgType.SiteUserCustomActions || _cfgType != _1.SPCfgType.WebUserCustomActions) {\n // Resolve the promise\n resolve();\n return;\n }\n }\n // Ensure the custom actions exist\n if (cfgCustomActions == null || cfgCustomActions.length == 0) {\n // Resolve the promise and return it\n resolve();\n return;\n }\n var _loop_10 = function _loop_10(i) {\n var cfgCustomAction = cfgCustomActions[i];\n // See if the target name exists\n if (_cfgType && _targetName) {\n // Ensure it's for this custom action\n if (cfgCustomAction.Name.toLowerCase() != _targetName || cfgCustomAction.Title.toLowerCase() != _targetName) {\n return \"continue\";\n }\n }\n // Get the custom action\n var ca = isInCollection(\"Name\", cfgCustomAction.Name, customActions.results);\n if (ca) {\n // Remove the custom action\n ca.delete().execute(function () {\n // Log\n console.log(\"[gd-sprest][Custom Action] The custom action '\" + ca.Name + \"' was removed.\");\n }, reject, true);\n }\n };\n // Parse the configuration\n for (var i = 0; i < cfgCustomActions.length; i++) {\n _loop_10(i);\n }\n // Wait for the requests to complete\n customActions.done(function () {\n // Resolve the promise\n resolve();\n });\n });\n };\n // Method to remove the web parts\n var removeWebParts = function removeWebParts() {\n var cfgWebParts = cfg.WebPartCfg;\n // Return a promise\n return new Promise(function (resolve, reject) {\n // See if the configuration type exists\n if (_cfgType) {\n // Ensure it's for this type\n if (_cfgType != _1.SPCfgType.WebParts) {\n // Resolve the promise\n resolve();\n return;\n }\n }\n // Ensure the configuration exists\n if (cfgWebParts == null || cfgWebParts.length == 0) {\n // Resolve the promise and return it\n resolve();\n return;\n }\n // Log\n console.log(\"[gd-sprest][WebPart] Removing the web parts.\");\n // Get the root web\n lib_1.Web(lib_1.ContextInfo.siteServerRelativeUrl)\n // Get the webpart gallery\n .getCatalog(__1.SPTypes.ListTemplateType.WebPartCatalog)\n // Get the root folder\n .RootFolder()\n // Expand the files\n .Files()\n // Execute the request\n .execute(function (files) {\n var _loop_11 = function _loop_11(i) {\n var cfgWebPart = cfgWebParts[i];\n // See if the target name exists\n if (_cfgType && _targetName) {\n // Ensure it's for this webpart\n if (cfgWebPart.FileName.toLowerCase() != _targetName) {\n return \"continue\";\n }\n }\n // Get the file\n var file = isInCollection(\"Name\", cfgWebPart.FileName, files.results);\n if (file) {\n // Remove the file\n file.delete().execute(function () {\n // Log\n console.log(\"[gd-sprest][WebPart] The webpart '\" + file.Name + \"' file was removed.\");\n }, true);\n }\n };\n // Parse the configuration\n for (var i = 0; i < cfgWebParts.length; i++) {\n _loop_11(i);\n }\n // Resolve the promise\n resolve();\n }, reject);\n });\n };\n // Method to update the base permissions\n var updateBasePermissions = function updateBasePermissions(values) {\n var high = 0;\n var low = 0;\n // Parse the values\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n // See if this is the full mask\n if (value == 65) {\n // Set the values\n low = 65535;\n high = 32767;\n // Break from the loop\n break;\n }\n // Else, see if it's empty\n else if (value == 0) {\n // Clear the values\n low = 0;\n high = 0;\n }\n // Else, update the base permission\n else {\n var bit = value - 1;\n var bitValue = 1;\n // Validate the bit\n if (bit < 0) {\n continue;\n }\n // See if it's a low permission\n if (bit < 32) {\n // Compute the value\n bitValue = bitValue << bit;\n // Set the low value\n low |= bitValue;\n }\n // Else, it's a high permission\n else {\n // Compute the value\n bitValue = bitValue << bit - 32;\n // Set the high value\n high |= bitValue;\n }\n }\n }\n // Return the base permission\n return {\n Low: low.toString(),\n High: high.toString()\n };\n };\n // Method to update the lists\n var updateLists = function updateLists(cfgLists) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n var request = function request(idx, resolve) {\n // Get the list configuration\n var cfgList = cfgLists[idx];\n // See if the target name exists\n if (_targetName) {\n // Ensure it's for this list\n if (cfgList.ListInformation.Title.toLowerCase() != _targetName) {\n // Update the next list\n request(idx + 1, resolve);\n return;\n }\n }\n // Ensure the configuration exists\n if (cfgList) {\n // Get the web\n lib_1.Web(webUrl)\n // Get the list\n .Lists(cfgList.ListInformation.Title)\n // Expand the content types, fields and views\n .query({\n Expand: [\"ContentTypes\", \"Fields\", \"UserCustomActions\", \"Views\"]\n })\n // Execute the request\n .execute(function (list) {\n // See if the title field is being updated\n if (cfgList.TitleFieldDisplayName) {\n // Parse the fields\n for (var i = 0; i < list.Fields.results.length; i++) {\n var field = list.Fields.results[i];\n // See if this is the title field\n if (field.InternalName == \"Title\") {\n // See if an update is required\n if (field.Title != cfgList.TitleFieldDisplayName) {\n // Update the field name\n field.update({ Title: cfgList.TitleFieldDisplayName }).execute(function () {\n // Log\n console.log(\"[gd-sprest][List] The 'Title' field's display name was updated to '\" + cfgList.TitleFieldDisplayName + \"'.\");\n });\n }\n }\n }\n }\n // Create the fields\n createFields(list.Fields, cfgList.CustomFields).then(function () {\n // Create the content types\n createContentTypes(list.ContentTypes, cfgList.ContentTypes).then(function () {\n // Update the views\n createViews(list.Views, cfgList.ViewInformation).then(function () {\n // Update the views\n createUserCustomActions(list.UserCustomActions, cfgList.UserCustomActions).then(function () {\n // Trigger the event\n cfgList.onUpdated ? cfgList.onUpdated(list) : null;\n // Update the next list\n request(idx + 1, resolve);\n }, reject);\n }, reject);\n }, reject);\n }, reject);\n }, reject);\n } else {\n // Resolve the promise\n resolve();\n }\n };\n // Execute the request\n request(0, resolve);\n });\n };\n // Method to update the views\n var updateViews = function updateViews(views, cfgViews) {\n var counter = 0;\n // Return a promise\n return new Promise(function (resolve, reject) {\n var _loop_12 = function _loop_12(i) {\n var cfgView = cfgViews[i];\n // Get the view\n var view = views.getByTitle(cfgView.ViewName);\n // See if the view fields are defined\n if (cfgView.ViewFields && cfgView.ViewFields.length > 0) {\n // Log\n console.log(\"[gd-sprest][View] Updating the view fields for the '\" + cfgView.ViewName + \"' view.\");\n // Clear the view fields\n view.ViewFields().removeAllViewFields().execute(true);\n // Parse the view fields\n for (var i_2 = 0; i_2 < cfgView.ViewFields.length; i_2++) {\n // Add the view field\n view.ViewFields().addViewField(cfgView.ViewFields[i_2]).execute(true);\n }\n }\n // See if we are updating the view properties\n if (cfgView.JSLink || cfgView.ViewQuery) {\n var props = {};\n // Log\n console.log(\"[gd-sprest][View] Updating the view properties for the '\" + cfgView.ViewName + \"' view.\");\n // Set the properties\n cfgView.JSLink ? props[\"JSLink\"] = cfgView.JSLink : null;\n cfgView.ViewQuery ? props[\"ViewQuery\"] = cfgView.ViewQuery : null;\n // Update the view\n view.update(props).execute(true);\n }\n // Wait for the requests to complete\n view.done(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // Log\n console.log(\"[gd-sprest][View] The updates for the '\" + cfgView.ViewName + \"' view has completed.\");\n // Trigger the event\n cfgView.onUpdated ? cfgView.onUpdated(view) : null;\n // See if we are done\n if (++counter >= cfgViews.length) {\n // Resolve the promise\n resolve();\n }\n });\n };\n // Parse the views\n for (var i = 0; i < cfgViews.length; i++) {\n _loop_12(i);\n }\n });\n };\n // Method to uninstall the site components\n var uninstallSite = function uninstallSite() {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Log\n console.log(\"[gd-sprest][uninstall] Loading the site information...\");\n // Ensure site actions exist\n if (cfg.CustomActionCfg == null || cfg.CustomActionCfg.Site == null) {\n // Resolve the promise\n resolve();\n return;\n }\n // Get the site\n lib_1.Site(webUrl)\n // Expand the user custom actions\n .query({\n Expand: [\"UserCustomActions\"]\n })\n // Execute the request\n .execute(function (site) {\n // Remove the user custom actions\n removeUserCustomActions(site.UserCustomActions, cfg.CustomActionCfg ? cfg.CustomActionCfg.Site : []).then(function () {\n // Resolve the promise\n resolve(site);\n });\n }, reject);\n });\n };\n // Method to uninstall the web components\n var uninstallWeb = function uninstallWeb() {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Log\n console.log(\"[gd-sprest][uninstall] Loading the web information...\");\n // Get the web\n lib_1.Web(webUrl)\n // Expand the content types, fields, lists and user custom actions\n .query({\n Expand: [\"ContentTypes\", \"Fields\", \"Lists\", \"UserCustomActions\"]\n })\n // Execute the request\n .execute(function (web) {\n // Remove the fields\n removeFields(web.Fields, cfg.Fields).then(function () {\n // Remove the content types\n removeContentTypes(web.ContentTypes, cfg.ContentTypes).then(function () {\n // Remove the lists\n removeLists(web.Lists, cfg.ListCfg).then(function () {\n // Remove the web custom actions\n removeUserCustomActions(web.UserCustomActions, cfg.CustomActionCfg ? cfg.CustomActionCfg.Web : null).then(function () {\n // Resolve the promise\n resolve();\n }, reject);\n }, reject);\n }, reject);\n }, reject);\n }, reject);\n });\n };\n /**\r\n * Public Interface\r\n */\n return {\n // The configuration\n _configuration: cfg,\n // Method to install the configuration\n install: function install() {\n // Return a promise\n return new Promise(function (resolve, reject) {\n var ctr = 0;\n var ctrExecutions = 0;\n // Log\n console.log(\"[gd-sprest] Loading the web information...\");\n // Get the web\n var web = lib_1.Web(webUrl);\n // The post execution method\n var postExecute = function postExecute() {\n // See if we have completed the executions\n if (++ctr >= ctrExecutions) {\n // Resolve the promise\n resolve();\n }\n };\n // See if we are creating fields\n if (cfg.Fields && cfg.Fields.length > 0) {\n // Increment the counter\n ctrExecutions++;\n // Log\n console.log(\"[gd-sprest][Fields] Starting the requests.\");\n // Get the fields\n web.Fields().execute(function (fields) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Create the fields\n createFields(_1.parse(fields.stringify()), cfg.Fields).then(function () {\n // Log\n console.log(\"[gd-sprest][Fields] Completed the requests.\");\n // Execute the post execute method\n postExecute();\n // Resolve the promise\n resolve();\n }, reject);\n });\n }, reject);\n }\n // See if we are creating the content types\n if (cfg.ContentTypes && cfg.ContentTypes.length > 0) {\n // Increment the counter\n ctrExecutions++;\n // Log\n console.log(\"[gd-sprest][Content Types] Starting the requests.\");\n // Get the content types\n web.ContentTypes().execute(function (contentTypes) {\n // Create the content types\n createContentTypes(_1.parse(contentTypes.stringify()), cfg.ContentTypes).then(function () {\n // Log\n console.log(\"[gd-sprest][Content Types] Completed the requests.\");\n // Execute the post execute method\n postExecute();\n });\n }, reject, true);\n }\n // See if we are creating the lists\n if (cfg.ListCfg && cfg.ListCfg.length) {\n // Increment the counter\n ctrExecutions++;\n // Log\n console.log(\"[gd-sprest][Lists] Starting the requests.\");\n // Get the lists\n web.Lists().execute(function (lists) {\n // Create the lists\n createLists(_1.parse(lists.stringify()), cfg.ListCfg).then(function () {\n // Log\n console.log(\"[gd-sprest][Lists] Completed the requests.\");\n // Execute the post execute method\n postExecute();\n });\n }, reject, true);\n }\n // See if we are creating the webparts\n if (cfg.WebPartCfg && cfg.WebPartCfg.length > 0) {\n // Increment the counter\n ctrExecutions++;\n // Log\n console.log(\"[gd-sprest][WebParts] Starting the requests.\");\n // Create the webparts\n createWebParts().then(function () {\n // Log\n console.log(\"[gd-sprest][WebParts] Completed the requests.\");\n // Execute the post execute method\n postExecute();\n });\n }\n // See if we are creating custom actions\n if (cfg.CustomActionCfg) {\n // See if we are targeting the site collection\n if (cfg.CustomActionCfg.Site) {\n // Increment the counter\n ctrExecutions++;\n // Log\n console.log(\"[gd-sprest][Site Custom Actions] Starting the requests.\");\n // Get the site\n lib_1.Site(webUrl)\n // Get the user custom actions\n .UserCustomActions().execute(function (customActions) {\n // Create the user custom actions\n createUserCustomActions(_1.parse(customActions.stringify()), cfg.CustomActionCfg.Site).then(function () {\n // Log\n console.log(\"[gd-sprest][Site Custom Actions] Completed the requests.\");\n // Execute the post execute method\n postExecute();\n });\n });\n }\n // See if we are targeting the web\n if (cfg.CustomActionCfg.Web) {\n // Increment the counter\n ctrExecutions++;\n // Log\n console.log(\"[gd-sprest][Web Custom Actions] Starting the requests.\");\n // Get the user custom actions\n web.UserCustomActions().execute(function (customActions) {\n // Create the user custom actions\n createUserCustomActions(_1.parse(customActions.stringify()), cfg.CustomActionCfg.Web).then(function () {\n // Log\n console.log(\"[gd-sprest][Web Custom Actions] Completed the requests.\");\n // Execute the post execute method\n postExecute();\n });\n }, reject);\n }\n }\n });\n },\n // Method to uninstall the configuration\n uninstall: function uninstall() {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Uninstall the web components\n uninstallWeb().then(function () {\n // Uninstall the site components\n uninstallSite().then(function () {\n // Remove the webparts\n removeWebParts().then(function () {\n // Log\n console.log(\"[gd-sprest] The configuration script completed, but some requests may still be running.\");\n // Resolve the promise\n resolve();\n }, reject);\n }, reject);\n }, reject);\n });\n }\n };\n};\n\n//# sourceURL=webpack:///./build/helper/spCfg.js?");
/***/ }),
/***/ "./build/helper/spCfgTypes.js":
/*!************************************!*\
!*** ./build/helper/spCfgTypes.js ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\r\n * SharePoint Configuration Field Types\r\n */\nexports.SPCfgFieldType = {\n Boolean: 0,\n Calculated: 1,\n Choice: 2,\n Currency: 3,\n Date: 4,\n Geolocation: 5,\n Lookup: 6,\n MMS: 7,\n Note: 8,\n Number: 9,\n Text: 10,\n Url: 11,\n User: 12\n};\n/**\r\n * SharePoint Configuration Types\r\n * The value determines the order to install the object type.\r\n */\nexports.SPCfgType = {\n Fields: 0,\n ContentTypes: 1,\n Lists: 2,\n SiteUserCustomActions: 3,\n WebParts: 5,\n WebUserCustomActions: 4\n};\n\n//# sourceURL=webpack:///./build/helper/spCfgTypes.js?");
/***/ }),
/***/ "./build/helper/taxonomy.js":
/*!**********************************!*\
!*** ./build/helper/taxonomy.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\r\n * Taxonomy Helper Class\r\n */\nexports.Taxonomy = {\n /**\r\n * Method to find a term by id\r\n */\n findById: function findById(term, termId) {\n // See if this is the root node\n if (term.info && term.info.id == termId) {\n // Return the root node\n return term;\n }\n // Parse the child nodes\n for (var prop in term) {\n // Skip the info and parent\n if (prop == \"info\" || prop == \"parent\") {\n continue;\n }\n // Find the term by id\n var childTerm = exports.Taxonomy.findById(term[prop], termId);\n if (childTerm) {\n return childTerm;\n }\n }\n },\n /**\r\n * Method to find a term by name\r\n */\n findByName: function findByName(term, termName) {\n // See if this is the root node\n if (term.info && term.info.name == termName) {\n // Return the root node\n return term;\n }\n // Parse the child nodes\n for (var prop in term) {\n // Skip the info and parent\n if (prop == \"info\" || prop == \"parent\") {\n continue;\n }\n // Find the term by id\n var childTerm = exports.Taxonomy.findByName(term[prop], termName);\n if (childTerm) {\n return childTerm;\n }\n }\n },\n /**\r\n * Method to get the terms\r\n */\n getTerms: function getTerms(termSet, termSetTerms) {\n var terms = [];\n // Add the root term\n terms.push({\n description: termSet.get_description(),\n id: termSet.get_id().toString(),\n name: termSet.get_name(),\n path: [],\n pathAsString: \"\",\n props: termSet.get_customProperties()\n });\n // Parse the term sets terms\n var enumerator = termSetTerms.getEnumerator();\n while (enumerator.moveNext()) {\n var term = enumerator.get_current();\n // Create the terms\n terms.push({\n description: term.get_description(),\n id: term.get_id().toString(),\n name: term.get_name(),\n path: term.get_pathOfTerm().split(\";\"),\n pathAsString: term.get_pathOfTerm(),\n props: term.get_customProperties()\n });\n }\n // Sort the terms\n terms = terms.sort(function (a, b) {\n if (a.pathAsString < b.pathAsString) {\n return -1;\n }\n if (a.pathAsString > b.pathAsString) {\n return 1;\n }\n return 0;\n });\n // Return the terms\n return terms;\n },\n /**\r\n * Method to get the term group\r\n */\n getTermGroup: function getTermGroup(groupName) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Load the scripts\n exports.Taxonomy.loadScripts().then(function () {\n // Get the taxonomy session\n var context = SP.ClientContext.get_current();\n var session = SP.Taxonomy.TaxonomySession.getTaxonomySession(context);\n // See if we are getting a specific group name\n if (groupName) {\n // Resolve the promise\n var termStores_1 = session.get_termStores();\n context.load(termStores_1, \"Include(Groups)\");\n context.executeQueryAsync(function () {\n // Get the default store\n var enumerator = termStores_1.getEnumerator();\n var termStore = enumerator.moveNext() ? enumerator.get_current() : null;\n if (termStore) {\n // Get the term group\n var termGroup = termStore.get_groups().getByName(groupName);\n context.load(termGroup);\n // Resolve the promise\n resolve({ context: context, termGroup: termGroup });\n } else {\n // Reject the promise\n reject(\"Unable to find the taxonomy store.\");\n }\n }, function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // Reject the promise\n reject(args[1].get_message());\n });\n } else {\n // Get the default site collection group\n var termStore = session.getDefaultSiteCollectionTermStore();\n var termGroup = termStore.getSiteCollectionGroup(context.get_site());\n context.load(termGroup);\n // Resolve the promise\n resolve({ context: context, termGroup: termGroup });\n }\n });\n });\n },\n /**\r\n * Method to get the term groups\r\n */\n getTermGroups: function getTermGroups() {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Load the scripts\n exports.Taxonomy.loadScripts().then(function () {\n // Get the taxonomy session\n var context = SP.ClientContext.get_current();\n var session = SP.Taxonomy.TaxonomySession.getTaxonomySession(context);\n // Resolve the promise\n var termStores = session.get_termStores();\n context.load(termStores, \"Include(Groups)\");\n context.executeQueryAsync(function () {\n // Get the default store\n var enumerator = termStores.getEnumerator();\n var termStore = enumerator.moveNext() ? enumerator.get_current() : null;\n if (termStore) {\n // Get the term groups\n var termGroups_1 = termStore.get_groups();\n context.load(termGroups_1, \"Include(Description, Id, Name)\");\n // Execute the request\n context.executeQueryAsync(\n // Success\n function () {\n var groups = [];\n // Parse the groups\n var enumerator = termGroups_1.getEnumerator();\n while (enumerator.moveNext()) {\n var group = enumerator.get_current();\n // Add the group information\n groups.push({\n description: group.get_description(),\n id: group.get_id().toString(),\n name: group.get_name()\n });\n }\n // Resolve the promise\n resolve(groups);\n }, function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // Reject the promise\n reject(args[1].get_message());\n });\n } else {\n // Reject the promise\n reject(\"Unable to find the taxonomy store.\");\n }\n }, function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // Reject the promise\n reject(args[1].get_message());\n });\n });\n });\n },\n /**\r\n * Method to get the term sets for a group\r\n */\n getTermSets: function getTermSets(groupName) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Get the term gruop\n exports.Taxonomy.getTermGroup(groupName).then(\n // Success\n function (_a) {\n var context = _a.context,\n termGroup = _a.termGroup;\n // Get the term group information\n var termGroupInfo = termGroup.get_termSets();\n context.load(termGroupInfo, \"Include(CustomProperties, Description, Id, Name)\");\n // Execute the request\n context.executeQueryAsync(function () {\n var termSets = [];\n // Parse the term group information\n var enumerator = termGroupInfo.getEnumerator();\n while (enumerator.moveNext()) {\n var termSet = enumerator.get_current();\n // Add the group information\n termSets.push({\n description: termSet.get_description(),\n id: termSet.get_id().toString(),\n name: termSet.get_name(),\n props: termSet.get_customProperties()\n });\n }\n // Resolve the promise\n resolve(termSets);\n }, function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // Reject the promise\n reject(args[1].get_message());\n });\n },\n // Error\n function (reason) {\n // Reject the promise\n reject(reason);\n });\n });\n },\n /**\r\n * Method to get the term sets from the default site collection.\r\n */\n getTermSetsFromDefaultSC: function getTermSetsFromDefaultSC() {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Load the scripts\n exports.Taxonomy.loadScripts().then(function () {\n // Get the taxonomy session\n var context = SP.ClientContext.get_current();\n var session = SP.Taxonomy.TaxonomySession.getTaxonomySession(context);\n // Get the terms sets from the default site collection\n var termStore = session.getDefaultSiteCollectionTermStore();\n var termGroup = termStore.getSiteCollectionGroup(context.get_site());\n var termGroupInfo = termGroup.get_termSets();\n context.load(termGroupInfo, \"Include(CustomProperties, Description, Id, Name)\");\n // Execute the request\n context.executeQueryAsync(\n // Success\n function () {\n var termSets = [];\n // Parse the term group information\n var enumerator = termGroupInfo.getEnumerator();\n while (enumerator.moveNext()) {\n var termSet = enumerator.get_current();\n // Add the group information\n termSets.push({\n description: termSet.get_description(),\n id: termSet.get_id().toString(),\n name: termSet.get_name(),\n props: termSet.get_customProperties()\n });\n }\n // Resolve the promise\n resolve(termSets);\n }, function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // Reject the promise\n reject(args[1].get_message());\n });\n });\n });\n },\n /**\r\n * Method to get the terms by id\r\n */\n getTermsById: function getTermsById(termStoreId, termSetId) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Load the scripts\n exports.Taxonomy.loadScripts().then(function () {\n // Get the taxonomy session\n var context = SP.ClientContext.get_current();\n var session = SP.Taxonomy.TaxonomySession.getTaxonomySession(context);\n // Get the term set terms\n var termStore = session.get_termStores().getById(termStoreId);\n var termSet = termStore.getTermSet(termSetId);\n var terms = termSet.getAllTerms();\n context.load(termSet);\n context.load(terms, \"Include(CustomProperties, Description, Id, Name, PathOfTerm)\");\n // Execute the request\n context.executeQueryAsync(function () {\n // Resolve the promise\n resolve(exports.Taxonomy.getTerms(termSet, terms));\n }, function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // Reject the promise\n reject(args[1].get_message());\n });\n });\n });\n },\n /**\r\n * Method to get the term set by id\r\n */\n getTermSetById: function getTermSetById(termStoreId, termSetId) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Get the terms\n exports.Taxonomy.getTermsById(termStoreId, termSetId).then(\n // Success\n function (terms) {\n // Resolve the promise\n resolve(exports.Taxonomy.toObject(terms));\n },\n // Error\n function (reason) {\n // Reject the promise\n reject(reason);\n });\n });\n },\n /**\r\n * Method to get the terms from the default site collection\r\n */\n getTermsFromDefaultSC: function getTermsFromDefaultSC(termSetName) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Get the term group\n exports.Taxonomy.getTermGroup().then(\n // Success\n function (_a) {\n var context = _a.context,\n termGroup = _a.termGroup;\n // Get the term set terms\n var termSet = termGroup.get_termSets().getByName(termSetName);\n var terms = termSet.getAllTerms();\n context.load(termSet);\n context.load(terms, \"Include(CustomProperties, Description, Id, Name, PathOfTerm)\");\n // Execute the request\n context.executeQueryAsync(function () {\n // Resolve the promise\n resolve(exports.Taxonomy.getTerms(termSet, terms));\n }, function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // Reject the promise\n reject(args[1].get_message());\n });\n },\n // Error\n function (reason) {\n // Reject the promise\n reject(reason);\n });\n });\n },\n /**\r\n * Method to get the term set from the default site collection\r\n */\n getTermSetFromDefaultSC: function getTermSetFromDefaultSC(termSetName) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Get the terms\n exports.Taxonomy.getTermsFromDefaultSC(termSetName).then(\n // Success\n function (terms) {\n // Resolve the object\n resolve(exports.Taxonomy.toObject(terms));\n },\n // Error\n function (reason) {\n // Reject the promise\n reject(reason);\n });\n });\n },\n /**\r\n * Method to get a terms from a specified group\r\n */\n getTermsByGroupName: function getTermsByGroupName(termSetName, groupName) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Get the term group\n exports.Taxonomy.getTermGroup(groupName).then(function (_a) {\n var context = _a.context,\n termGroup = _a.termGroup;\n // Get the term set terms\n var termSet = termGroup.get_termSets().getByName(termSetName);\n var terms = termSet.getAllTerms();\n context.load(termSet);\n context.load(terms, \"Include(CustomProperties, Description, Id, Name, PathOfTerm)\");\n // Execute the request\n context.executeQueryAsync(function () {\n // Resolve the promise\n resolve(exports.Taxonomy.getTerms(termSet, terms));\n }, function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // Reject the promise\n reject(args[1].get_message());\n });\n });\n });\n },\n /**\r\n * Method to get the term set from the default site collection\r\n */\n getTermSetByGroupName: function getTermSetByGroupName(termSetName, groupName) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Get the terms\n exports.Taxonomy.getTermsByGroupName(termSetName, groupName).then(\n // Success\n function (terms) {\n // Resolve the object\n resolve(exports.Taxonomy.toObject(terms));\n },\n // Error\n function (reason) {\n // Reject the promise\n reject(reason);\n });\n });\n },\n /**\r\n * Method to ensure the taxonomy script references are loaded.\r\n */\n loadScripts: function loadScripts() {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Ensure the core script is loaded\n SP.SOD.executeFunc(\"sp.js\", \"SP.Utilities.Utility\", function () {\n // Ensure the taxonomy script is loaded\n SP.SOD.registerSod(\"sp.taxonomy.js\", SP.Utilities.Utility.getLayoutsPageUrl(\"sp.taxonomy.js\"));\n SP.SOD.executeFunc(\"sp.taxonomy.js\", \"SP.Taxonomy.TaxonomySession\", function () {\n // Resolve the promise\n resolve();\n });\n }, \"sp.js\");\n });\n },\n /**\r\n * Method to convert a term to an array of term information\r\n */\n toArray: function toArray(term) {\n var terms = [];\n // Recursive method to extract the child terms\n var getChildTerms = function getChildTerms(term, terms) {\n // Parse the properties\n for (var prop in term) {\n // Skip the info and parent properties\n if (prop == \"info\" || prop == \"parent\") {\n continue;\n }\n // Add the child term\n var childTerm = term[prop];\n terms.push(childTerm.info);\n // Add the child terms\n getChildTerms(childTerm, terms);\n }\n };\n // Ensure the term exists\n if (term) {\n // See if the root node contains term information\n if (term.info) {\n // Add the root term\n terms.push(term.info);\n }\n // Get the child terms\n getChildTerms(term, terms);\n }\n // Return the child terms\n return terms;\n },\n /**\r\n * Method to convert a term to a field value\r\n */\n toFieldValue: function toFieldValue(term) {\n var termInfo = term ? term[\"info\"] || term : null;\n // Ensure the term exists\n if (termInfo) {\n return {\n __metadata: { \"type\": \"SP.Taxonomy.TaxonomyFieldValue\" },\n Label: termInfo.name,\n TermGuid: termInfo.id,\n WssId: -1\n };\n }\n // Return nothing\n return null;\n },\n /**\r\n * Method to convert a collection of terms to a field value\r\n */\n toFieldMultiValue: function toFieldMultiValue(terms) {\n var results = [];\n // Ensure terms exist\n if (terms && terms.length > 0) {\n // Parse the terms\n for (var i = 0; i < terms.length; i++) {\n var termInfo = terms[i][\"info\"] || terms[i];\n // Add the term\n results.push(\";#\" + termInfo.name + \"|\" + termInfo.id);\n }\n }\n // Return a blank array\n return {\n __metadata: { type: \"Collection(SP.Taxonomy.TaxonomyFieldValue)\" },\n results: results\n };\n },\n /**\r\n * Method to convert the terms to an object\r\n */\n toObject: function toObject(terms) {\n var root = {};\n // Recursive method to add terms\n var addTerm = function addTerm(node, info, path) {\n var term = node;\n var termName = \"\";\n // Loop for each term\n while (path.length > 0) {\n // Ensure the term exists\n termName = path[0];\n if (term[termName] == null) {\n // Create the term\n term[termName] = {};\n }\n // Set the term\n var parent_1 = term;\n term = term[termName];\n // Set the parent\n term.parent = parent_1;\n // Remove the term from the path\n path.splice(0, 1);\n }\n // Set the info\n term.info = info;\n };\n // Ensure the terms exist\n if (terms && terms.length > 0) {\n // Parse the terms\n for (var i = 0; i < terms.length; i++) {\n var term = terms[i];\n // See if this is the root term\n if (term.pathAsString == \"\") {\n // Set the root information\n root.info = term;\n } else {\n // Add the term\n addTerm(root, term, term.pathAsString.split(\";\"));\n }\n }\n // Return the root term\n return exports.Taxonomy.findById(root, terms[0].id);\n }\n // Return nothing\n return null;\n }\n};\n\n//# sourceURL=webpack:///./build/helper/taxonomy.js?");
/***/ }),
/***/ "./build/helper/types/index.js":
/*!*************************************!*\
!*** ./build/helper/types/index.js ***!
\*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n\n//# sourceURL=webpack:///./build/helper/types/index.js?");
/***/ }),
/***/ "./build/helper/webpart.js":
/*!*********************************!*\
!*** ./build/helper/webpart.js ***!
\*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ../lib */ \"./build/lib/index.js\");\n/**\r\n * Web Part\r\n */\nvar _WebPart = /** @class */function () {\n /**\r\n * Constructor\r\n * @param props - The webpart properties.\r\n */\n function _WebPart(props) {\n var _this = this;\n this._props = null;\n this._wp = null;\n /**\r\n * Method to add the help link to a script part editor.\r\n * @wpId - The webpart id.\r\n */\n this.addHelpLink = function () {\n // Ensure the help properties exist\n if (_this._props.helpProps) {\n // Get the webpart's \"Snippet\"\n var link = document.querySelector(\"div[webpartid='\" + _this._wp.wpId + \"'] a[title='Edit Snippet']\");\n if (link) {\n // Create the help link\n var helpLink = document.createElement(\"a\");\n helpLink.href = _this._props.helpProps.url || \"#\";\n helpLink.style.paddingLeft = \"10px\";\n helpLink.setAttribute(\"role\", \"button\");\n helpLink.title = _this._props.helpProps.title || \"Help\";\n helpLink.innerHTML = \"<span class='ms-metadata'>\" + helpLink.title + \"</span>\";\n helpLink.target = \"_blank\";\n // Append the link\n link.parentElement.appendChild(helpLink);\n }\n }\n };\n /**\r\n * Method to get the webpart\r\n */\n this.getWebPart = function (wpId) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Get the current context\n var context = SP.ClientContext.get_current();\n // Get the webpart from the current page\n var page = context.get_web().getFileByServerRelativeUrl(lib_1.ContextInfo.serverRequestPath);\n var wpMgr = page.getLimitedWebPartManager(SP.WebParts.PersonalizationScope.shared);\n var wpDef = wpMgr.get_webParts().getById(wpId);\n var wp = wpDef.get_webPart();\n context.load(wp, \"Properties\");\n // Execute the request\n context.executeQueryAsync(\n // Success\n function () {\n // Resolve the promise\n resolve({\n Context: context,\n Properties: wp.get_properties(),\n WebPart: wp,\n WebPartDefinition: wpDef,\n WebPartId: wp.get_id()\n });\n },\n // Error\n function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // Reject the promise\n reject(args[1] ? args[1].get_message() : \"\");\n });\n });\n };\n /**\r\n * Method to get the webpart id for a specified element\r\n * @param el - The target element.\r\n */\n this.getWebPartId = function (el) {\n // Loop until we find the webpart id\n while (el) {\n // See if this element contains the webpart id\n var wpId = el.getAttribute(\"webpartid\");\n if (wpId) {\n // Return the webpart id\n return wpId;\n }\n // Check the parent\n el = el.parentElement;\n }\n // Unable to detect\n return \"\";\n };\n /**\r\n * Method to get the webpart information\r\n */\n this.getWebPartInfo = function () {\n var targetInfo = {\n cfg: null,\n el: null,\n wpId: null\n };\n // Ensure the element id exists\n if (_this._props.elementId) {\n // Get the webpart elements\n var elements = document.querySelectorAll(\"#\" + _this._props.elementId);\n for (var i = 0; i < elements.length; i++) {\n var elWebPart = elements[i];\n // See if we have already configured this element\n if (elWebPart.getAttribute(\"data-isConfigured\")) {\n continue;\n }\n // Get the webpart id\n var wpId = _this.getWebPartId(elWebPart);\n if (wpId) {\n // See if the configuration element exists\n var elCfg = _this._props.cfgElementId ? elWebPart.parentElement.querySelector(\"#\" + _this._props.cfgElementId) : null;\n if (elCfg) {\n try {\n // Parse the configuration\n var cfg = JSON.parse(elCfg.innerText.trim());\n // See if the webaprt id exists\n if (cfg.WebPartId) {\n // See if it's for this webpart\n if (cfg.WebPartId == wpId) {\n // Set the target information\n targetInfo = {\n cfg: cfg,\n el: elWebPart,\n wpId: wpId\n };\n break;\n }\n } else {\n // Set the target information\n targetInfo = {\n cfg: {\n WebPartId: wpId\n },\n el: elWebPart,\n wpId: wpId\n };\n break;\n }\n } catch (ex) {\n // Set the target information\n targetInfo = {\n cfg: {\n WebPartId: wpId\n },\n el: elWebPart,\n wpId: wpId\n };\n // Log\n console.log(\"[sp-webpart] Error parsing the configuration for element '\" + _this._props.cfgElementId + \"'.\");\n }\n // Break from the loop\n break;\n } else {\n // Set the target information\n targetInfo = {\n cfg: {\n WebPartId: wpId\n },\n el: elWebPart,\n wpId: wpId\n };\n break;\n }\n }\n }\n // Ensure elements were found\n if (elements.length == 0) {\n // Log\n console.log(\"[sp-webpart] Error - Unable to find elements with id '\" + _this._props.elementId + \"'.\");\n }\n } else {\n // Log\n console.log(\"[sp-webpart] The target element id is not defined.\");\n }\n // Ensure the target element exists\n if (targetInfo.el) {\n // Set the configuration flag\n targetInfo.el.setAttribute(\"data-isConfigured\", \"true\");\n }\n // Return the target information\n return targetInfo;\n };\n /**\r\n * Method to render the webpart\r\n */\n this.render = function () {\n var element = null;\n // Get the webpart information\n _this._wp = _this.getWebPartInfo();\n if (_this._wp == null || _this._wp.el == null) {\n // Log\n console.log(\"[sp-webpart] The target webpart element '\" + _this._props.elementId + \"' was not found.\");\n return;\n }\n // See if the page is being edited\n var returnVal = null;\n if (exports.WebPart.isEditMode()) {\n // Add the help link\n _this.addHelpLink();\n // Call the render event\n if (_this._props.onRenderEdit) {\n // Execute the render edit event\n returnVal = _this._props.onRenderEdit(_this._wp);\n }\n } else {\n // See if the configuration is defined, but has no value\n if (_this._wp.cfg || (_this._props.cfgElementId || \"\").length == 0) {\n // Execute the render edit event\n returnVal = _this._props.onRenderDisplay(_this._wp);\n } else {\n // Render a message\n _this._wp.el.innerHTML = '<h3>Please edit the page and configure the webpart.</h3>';\n }\n }\n // See if a promise was returned\n if (returnVal && returnVal.then) {\n // Wait for the request to complete\n returnVal.then(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // Execute the post render event\n _this._props.onPostRender ? _this._props.onPostRender(_this._wp) : null;\n });\n } else {\n // Execute the post render event\n _this._props.onPostRender ? _this._props.onPostRender(_this._wp) : null;\n }\n };\n // Set the properties\n this._props = props || {};\n // Add a load event\n window.addEventListener(\"load\", function () {\n // Render the component\n _this.render();\n });\n }\n // Method to add a script editor webpart to the page\n _WebPart.addWebPartToPage = function (url, wpProps) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Get the current context\n var context = SP.ClientContext.get_current();\n // Get the webpart manager for the page\n var page = context.get_web().getFileByServerRelativeUrl(url);\n var wpMgr = page.getLimitedWebPartManager(SP.WebParts.PersonalizationScope.shared);\n // Create the webpart\n var wp = wpMgr.importWebPart(\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n<webParts>\\n <webPart xmlns=\\\"http://schemas.microsoft.com/WebPart/v3\\\">\\n <metaData>\\n <type name=\\\"Microsoft.SharePoint.WebPartPages.ScriptEditorWebPart, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c\\\" />\\n <importErrorMessage>$Resources:core,ImportantErrorMessage;</importErrorMessage>\\n </metaData>\\n <data>\\n <properties>\\n <property name=\\\"Title\\\" type=\\\"string\\\">[[Title]]</property>\\n <property name=\\\"Description\\\" type=\\\"string\\\">[[Description]]</property>\\n <property name=\\\"ChromeType\\\" type=\\\"chrometype\\\">TitleOnly</property>\\n <property name=\\\"Content\\\" type=\\\"string\\\">[[Content]]</property>\\n </properties>\\n </data>\\n </webPart>\\n</webParts>\".replace(/\\r?\\n/g, '').replace(/\\[\\[Content\\]\\]/g, wpProps.content.replace(/\\</g, '<').replace(/\\>/g, '>')).replace(/\\[\\[Description\\]\\]/g, wpProps.description || \"\").replace(/\\[\\[Title\\]\\]/g, wpProps.title || \"\")).get_webPart();\n // Add the webpart to the page\n wpMgr.addWebPart(wp, wpProps.zone || \"\", wpProps.index || 0);\n // Save the page\n context.load(wp);\n context.executeQueryAsync(\n // Success\n function () {\n // Resolve the promise\n resolve();\n },\n // Error\n function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // Reject the promise\n reject(args[1] ? args[1].get_message() : \"\");\n });\n });\n };\n // Method to create an instance of the webpart\n _WebPart.create = function (props) {\n // Return an instance of the webpart\n return new _WebPart(props);\n };\n /**\r\n * Method to detect if a page is being edited\r\n */\n _WebPart.isEditMode = function () {\n var formName = MSOWebPartPageFormName ? MSOWebPartPageFormName : \"\";\n // Get the form\n var form = document.forms[MSOWebPartPageFormName];\n if (form) {\n // Get the wiki page mode\n var wikiPageMode = form._wikiPageMode ? form._wikiPageMode.value : null;\n // Get the webpart page mode\n var wpPageMode = form.MSOLayout_InDesignMode ? form.MSOLayout_InDesignMode.value : null;\n // Determine if the page is being edited\n return wikiPageMode == \"Edit\" || wpPageMode == \"1\";\n }\n // Unable to determine\n return false;\n };\n return _WebPart;\n}();\nexports.WebPart = _WebPart;\n\n//# sourceURL=webpack:///./build/helper/webpart.js?");
/***/ }),
/***/ "./build/index.js":
/*!************************!*\
!*** ./build/index.js ***!
\************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nfunction __export(m) {\n for (var p in m) {\n if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// Type definitions for gd-sprest\n// Project: https://gunjandatta.github.io/sprest\n// Definitions by: Gunjan Datta <https://github.com/gunjandatta>\n/***************************************************************************************************\r\nMIT License\r\n\r\nCopyright (c) 2016 Dattabase, LLC.\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.\r\n***************************************************************************************************/\nvar Helper = __webpack_require__(/*! ./helper */ \"./build/helper/index.js\");\nexports.Helper = Helper;\nvar mapper_1 = __webpack_require__(/*! ./mapper */ \"./build/mapper/index.js\");\nexports.SPTypes = mapper_1.SPTypes;\nvar Types = __webpack_require__(/*! ./types */ \"./build/types.js\");\nexports.Types = Types;\n__export(__webpack_require__(/*! ./lib */ \"./build/lib/index.js\"));\n__export(__webpack_require__(/*! ./rest */ \"./build/rest.js\"));\n\n//# sourceURL=webpack:///./build/index.js?");
/***/ }),
/***/ "./build/lib/contextInfo.js":
/*!**********************************!*\
!*** ./build/lib/contextInfo.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Context Information\r\n */\nvar _ContextInfo = /** @class */function () {\n function _ContextInfo() {}\n Object.defineProperty(_ContextInfo, \"_contextInfo\", {\n // The current context information\n get: function get() {\n // Return the page context or a default object\n return this.window[\"_spPageContextInfo\"] || this._spfxPageContext && this._spfxPageContext.legacyPageContext || {\n existsFl: false,\n isAppWeb: false,\n isHubSite: false,\n isSPO: false,\n siteAbsoluteUrl: \"\",\n siteServerRelativeUrl: \"\",\n userId: 0,\n webAbsoluteUrl: \"\",\n webServerRelativeUrl: \"\"\n };\n },\n enumerable: true,\n configurable: true\n });\n ;\n Object.defineProperty(_ContextInfo, \"aadInstanceUrl\", {\n /**\r\n * Properties\r\n */\n get: function get() {\n return this._contextInfo.aadInstanceUrl;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"aadTenantId\", {\n get: function get() {\n return this._contextInfo.aadTenantId;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"alertsEnabled\", {\n get: function get() {\n return this._contextInfo.alertsEnabled;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"allowSilverlightPrompt\", {\n get: function get() {\n return this._contextInfo.allowSilverlightPrompt == \"True\" ? true : false;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"canUserCreateMicrosoftForm\", {\n get: function get() {\n return this._contextInfo.canUserCreateMicrosoftForm;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"canUserCreateVisioDrawing\", {\n get: function get() {\n return this._contextInfo.canUserCreateVisioDrawing;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"cdnPrefix\", {\n get: function get() {\n return this._contextInfo.cdnPrefix;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"clientServerTimeDelta\", {\n get: function get() {\n return this._contextInfo.clientServerTimeDelta;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"CorrelationId\", {\n get: function get() {\n return this._contextInfo.CorrelationId;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"crossDomainPhotosEnabled\", {\n get: function get() {\n return this._contextInfo.crossDomainPhotosEnabled;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"currentCultureName\", {\n get: function get() {\n return this._contextInfo.currentCultureName;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"currentLanguage\", {\n get: function get() {\n return this._contextInfo.currentLanguage;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"currentUICultureName\", {\n get: function get() {\n return this._contextInfo.currentUICultureName;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"departmentId\", {\n get: function get() {\n return this._contextInfo.departmentId;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"DesignPackageId\", {\n get: function get() {\n return this._contextInfo.DesignPackageId;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"disableAppViews\", {\n get: function get() {\n return this._contextInfo.disableAppViews;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"disableFlows\", {\n get: function get() {\n return this._contextInfo.disableFlows;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"document\", {\n get: function get() {\n return this.window ? this.window.document : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"env\", {\n get: function get() {\n return this._contextInfo.env;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"existsFl\", {\n get: function get() {\n return this._contextInfo.existsFl == null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"farmLabel\", {\n get: function get() {\n return this._contextInfo.farmLabel;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"fid\", {\n get: function get() {\n return this._contextInfo.fid;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"formDigestTimeoutSeconds\", {\n get: function get() {\n return this._contextInfo.formDigestTimeoutSeconds;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"formDigestValue\", {\n get: function get() {\n return this._contextInfo.formDigestValue;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"groupColor\", {\n get: function get() {\n return this._contextInfo.groupColor;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"groupHasHomepage\", {\n get: function get() {\n return this._contextInfo.groupHasHomepage;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"groupId\", {\n get: function get() {\n return this._contextInfo.groupId;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"groupType\", {\n get: function get() {\n return this._contextInfo.groupType;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"guestsEnabled\", {\n get: function get() {\n return this._contextInfo.guestsEnabled;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"hasManageWebPermissions\", {\n get: function get() {\n return this._contextInfo.hasManageWebPermissions;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"hasPendingWebTemplateExtension\", {\n get: function get() {\n return this._contextInfo.hasPendingWebTemplateExtension;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"hideSyncButtonOnODB\", {\n get: function get() {\n return this._contextInfo.hideSyncButtonOnODB;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"hubSiteId\", {\n get: function get() {\n return this._contextInfo.hubSiteId;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"idleSessionSignOutEnabled\", {\n get: function get() {\n return this._contextInfo.idleSessionSignOutEnabled;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"isAnonymousGuestUser\", {\n get: function get() {\n return this._contextInfo.isAnonymousGuestUser;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"isAppWeb\", {\n get: function get() {\n return this._contextInfo.isAppWeb;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"isEmailAuthenticatinoGuesUser\", {\n get: function get() {\n return this._contextInfo.isEmailAuthenticatinoGuesUser;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"isExternalGuestUser\", {\n get: function get() {\n return this._contextInfo.isExternalGuestUser;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"isHubSite\", {\n get: function get() {\n return this._contextInfo.isHubSite;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"isMultiGeoTenant\", {\n get: function get() {\n return this._contextInfo.isMultiGeoTenant;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"isNoScriptEnabled\", {\n get: function get() {\n return this._contextInfo.isNoScriptEnabled;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"isSiteAdmin\", {\n get: function get() {\n return this._contextInfo.isSiteAdmin;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"isSPO\", {\n get: function get() {\n return this._contextInfo.isSPO;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"isTenantDevSite\", {\n get: function get() {\n return this._contextInfo.isTenantDevSite;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"isWebWelcomePage\", {\n get: function get() {\n return this._contextInfo.isWebWelcomePage;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"layoutsUrl\", {\n get: function get() {\n return this._contextInfo.layoutsUrl;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"listBaseTemplate\", {\n get: function get() {\n return this._contextInfo.listBaseTemplate;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"listId\", {\n get: function get() {\n return this._contextInfo.listId;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"listTitle\", {\n get: function get() {\n return this._contextInfo.listTitle;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"listPermMask\", {\n get: function get() {\n return this._contextInfo.listPermMask;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"listUrl\", {\n get: function get() {\n return this._contextInfo.listUrl;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"maximumFileSize\", {\n get: function get() {\n return this._contextInfo.maximumFileSize;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"nid\", {\n get: function get() {\n return this._contextInfo.nid;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"openInClient\", {\n get: function get() {\n return this._contextInfo.openInClient;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"pageItemId\", {\n get: function get() {\n return this._contextInfo.pageItemId;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"pageListId\", {\n get: function get() {\n return this._contextInfo.pageListId;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"pagePermMask\", {\n get: function get() {\n return this._contextInfo.pagePermMask;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"pagePersonalizationScope\", {\n get: function get() {\n return this._contextInfo.pagePersonalizationScope;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"preferUserTimeZone\", {\n get: function get() {\n return this._contextInfo.preferUserTimeZone;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"PreviewFeaturesEnabled\", {\n get: function get() {\n return this._contextInfo.PreviewFeaturesEnabled;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"profileUrl\", {\n get: function get() {\n return this._contextInfo.profileUrl;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"PublishingFeatureOn\", {\n get: function get() {\n return this._contextInfo.PublishingFeatureOn;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"RecycleBinItemCount\", {\n get: function get() {\n return this._contextInfo.RecycleBinItemCount;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"serverRedirectedUrl\", {\n get: function get() {\n return this._contextInfo.serverRedirectedUrl;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"serverRequestPath\", {\n get: function get() {\n return this._contextInfo.serverRequestPath;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"serverTime\", {\n get: function get() {\n return this._contextInfo.serverTime;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"showNGSCDialogForSyncOnODB\", {\n get: function get() {\n return this._contextInfo.showNGSCDialogForSyncOnODB;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"showNGSCDialogForSyncOnTS\", {\n get: function get() {\n return this._contextInfo.showNGSCDialogForSyncOnTS;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"siteAbsoluteUrl\", {\n get: function get() {\n return this._contextInfo.siteAbsoluteUrl;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"siteClassification\", {\n get: function get() {\n return this._contextInfo.siteClassification;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"siteClientTag\", {\n get: function get() {\n return this._contextInfo.siteClientTag;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"siteColor\", {\n get: function get() {\n return this._contextInfo.siteColor;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"siteId\", {\n get: function get() {\n return this._contextInfo.siteId;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"sitePagesEnabled\", {\n get: function get() {\n return this._contextInfo.sitePagesEnabled;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"siteServerRelativeUrl\", {\n get: function get() {\n return this._contextInfo.siteServerRelativeUrl;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"siteSubscriptionId\", {\n get: function get() {\n return this._contextInfo.siteSubscriptionId;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"supportPercentStorePage\", {\n get: function get() {\n return this._contextInfo.supportPercentStorePage;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"supportPoundStorePath\", {\n get: function get() {\n return this._contextInfo.supportPoundStorePath;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"systemUserKey\", {\n get: function get() {\n return this._contextInfo.systemUserKey;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"tenantAppVersion\", {\n get: function get() {\n return this._contextInfo.tenantAppVersion;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"themeCacheToken\", {\n get: function get() {\n return this._contextInfo.themeCacheToken;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"themeCssFolderUrl\", {\n get: function get() {\n return this._contextInfo.themeCssFolderUrl;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"themeImageFileNames\", {\n get: function get() {\n return this._contextInfo.themeImageFileNames;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"updateFromDigestPageLoaded\", {\n get: function get() {\n return this._contextInfo.updateFromDigestPageLoaded;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"userDisplayName\", {\n get: function get() {\n return this._contextInfo.userDisplayName;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"userEmail\", {\n get: function get() {\n return this._contextInfo.userEmail;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"userFirstDayOfWeek\", {\n get: function get() {\n return this._contextInfo.userFirstDayOfWeek;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"userId\", {\n get: function get() {\n return this._contextInfo.userId;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"userLoginName\", {\n get: function get() {\n return this._contextInfo.userLoginName;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"userTime24\", {\n get: function get() {\n return this._contextInfo.userTime24;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"userTimeZoneData\", {\n get: function get() {\n return this._contextInfo.userTimeZoneData;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"viewId\", {\n get: function get() {\n return this._contextInfo.viewId;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"viewOnlyExperienceEnabled\", {\n get: function get() {\n return this._contextInfo.viewOnlyExperienceEnabled;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"webAbsoluteUrl\", {\n get: function get() {\n return this._contextInfo.webAbsoluteUrl;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"webDescription\", {\n get: function get() {\n return this._contextInfo.webDescription;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"webFirstDayOfWeek\", {\n get: function get() {\n return this._contextInfo.webFirstDayOfWeek;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"webId\", {\n get: function get() {\n return this._contextInfo.webId;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"webLanguage\", {\n get: function get() {\n return this._contextInfo.webLanguage;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"webLogoUrl\", {\n get: function get() {\n return this._contextInfo.webLogoUrl;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"webPermMask\", {\n get: function get() {\n return this._contextInfo.webPermMask;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"webServerRelativeUrl\", {\n get: function get() {\n return this._contextInfo.webServerRelativeUrl;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"webTemplate\", {\n get: function get() {\n return this._contextInfo.webTemplate;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"webTime24\", {\n get: function get() {\n return this._contextInfo.webTime24;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"webTitle\", {\n get: function get() {\n return this._contextInfo.webTitle;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"webUIVersion\", {\n get: function get() {\n return this._contextInfo.webUIVersion;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ContextInfo, \"window\", {\n get: function get() {\n return typeof window == \"undefined\" ? {} : window;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * Methods\r\n */\n // Method to generate a guid\n _ContextInfo.generateGUID = function () {\n // Set the batch id\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = Math.random() * 16 | 0,\n v = c == 'x' ? r : r & 0x3 | 0x8;\n return v.toString(16);\n });\n };\n // The page context information from an spfx project\n _ContextInfo._spfxPageContext = null;\n // Method to get the context information for a web\n _ContextInfo.getWeb = function (url) {\n // Create a new base object\n return new utils_1.Base({\n endpoint: \"contextinfo\",\n method: \"POST\",\n url: url\n });\n };\n // Method to set the page context information from an SPFX project\n _ContextInfo.setPageContext = function (spfxPageContext) {\n exports.ContextInfo[\"_spfxPageContext\"] = spfxPageContext;\n };\n return _ContextInfo;\n}();\nexports.ContextInfo = _ContextInfo;\n\n//# sourceURL=webpack:///./build/lib/contextInfo.js?");
/***/ }),
/***/ "./build/lib/graph.js":
/*!****************************!*\
!*** ./build/lib/graph.js ***!
\****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Graph\r\n */\nexports.Graph = function (accessToken, version) {\n var graph = new utils_1.Base({ accessToken: accessToken });\n // Default the target information\n graph.targetInfo.endpoint = version || \"v1.0\";\n graph.targetInfo.requestType = utils_1.RequestType.GraphGet;\n // Add the methods\n graph.addMethods(graph, { __metadata: { type: \"graph\" } });\n // Return the graph\n return graph;\n};\n// Method to get the graph token from a classic page\nexports.Graph.getAccessToken = function (scope) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Set the data \n var data = { \"resource\": \"https://graph.microsoft.com\" };\n scope ? data[\"scope\"] = scope : null;\n // Get the access token\n new utils_1.Base({\n endpoint: \"SP.OAuth.Token/Acquire\",\n data: data,\n method: \"POST\"\n }).execute(function (token) {\n // Resolve the promise\n resolve(token);\n });\n });\n};\n\n//# sourceURL=webpack:///./build/lib/graph.js?");
/***/ }),
/***/ "./build/lib/index.js":
/*!****************************!*\
!*** ./build/lib/index.js ***!
\****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nfunction __export(m) {\n for (var p in m) {\n if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(__webpack_require__(/*! ./contextInfo */ \"./build/lib/contextInfo.js\"));\n__export(__webpack_require__(/*! ./graph */ \"./build/lib/graph.js\"));\n__export(__webpack_require__(/*! ./list */ \"./build/lib/list.js\"));\n__export(__webpack_require__(/*! ./navigation */ \"./build/lib/navigation.js\"));\n__export(__webpack_require__(/*! ./peopleManager */ \"./build/lib/peopleManager.js\"));\n__export(__webpack_require__(/*! ./peoplePicker */ \"./build/lib/peoplePicker.js\"));\n__export(__webpack_require__(/*! ./profileLoader */ \"./build/lib/profileLoader.js\"));\n__export(__webpack_require__(/*! ./search */ \"./build/lib/search.js\"));\n__export(__webpack_require__(/*! ./site */ \"./build/lib/site.js\"));\n__export(__webpack_require__(/*! ./socialFeed */ \"./build/lib/socialFeed.js\"));\n__export(__webpack_require__(/*! ./userProfile */ \"./build/lib/userProfile.js\"));\n__export(__webpack_require__(/*! ./utility */ \"./build/lib/utility.js\"));\n__export(__webpack_require__(/*! ./web */ \"./build/lib/web.js\"));\nvar Types = __webpack_require__(/*! ./types */ \"./build/lib/types/index.js\");\nexports.Types = Types;\n\n//# sourceURL=webpack:///./build/lib/index.js?");
/***/ }),
/***/ "./build/lib/list.js":
/*!***************************!*\
!*** ./build/lib/list.js ***!
\***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\nvar web_1 = __webpack_require__(/*! ./web */ \"./build/lib/web.js\");\n/**\r\n * List\r\n */\nexports.List = function (listName, targetInfo) {\n var list = new utils_1.Base(targetInfo);\n // Default the properties\n list.targetInfo.defaultToWebFl = true;\n list.targetInfo.endpoint = \"web/lists/getByTitle('\" + listName.replace(/\\'/g, \"''\") + \"')\";\n // Add the methods\n list.addMethods(list, { __metadata: { type: \"list\" } });\n // Return the list\n return list;\n};\n// Static method to get the list by the entity name.\nexports.List.getByEntityName = function (entityTypeName, callback, targetInfo) {\n // Query for the list\n var query = web_1.Web(targetInfo)\n // Get the lists\n .Lists()\n // Set the query\n .query({\n Filter: \"EntityTypeName eq '\" + entityTypeName + \"'\",\n Top: 1\n });\n // See if the callback exists\n if (typeof callback != \"function\") {\n // Execute the request synchronously and return it\n var list = query.executeAndWait();\n return list.results ? list.results[0] : list;\n }\n // Execute the request asynchronously\n query.execute(function (lists) {\n // Execute the callback method\n callback(lists.results ? lists.results[0] : lists);\n });\n};\n// Static method to get the list data from the SP.List.getListDataAsStream endpoint\nexports.List.getDataAsStream = function (listFullUrl, parameters) {\n if (parameters === void 0) {\n parameters = {};\n }\n var params = \"?listFullUrl='\" + listFullUrl + \"'\";\n // Parse the parameters\n for (var key in parameters) {\n // Append the parameter\n params += \"&\" + key + \"=\" + parameters[key];\n }\n // Return the base object\n return new utils_1.Base({\n endpoint: \"SP.List.getListDataAsStream\" + params\n });\n};\n\n//# sourceURL=webpack:///./build/lib/list.js?");
/***/ }),
/***/ "./build/lib/navigation.js":
/*!*********************************!*\
!*** ./build/lib/navigation.js ***!
\*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Navigation\r\n */\nexports.Navigation = function (url, targetInfo) {\n var navigation = new utils_1.Base(targetInfo);\n // Default the properties\n navigation.targetInfo.defaultToWebFl = true;\n navigation.targetInfo.endpoint = \"navigation\";\n // See if the web url exists\n if (url) {\n // Set the settings\n navigation.targetInfo.url = url;\n }\n // Add the methods\n navigation.addMethods(navigation, { __metadata: { type: \"navigationservicerest\" } });\n // Return the navigation\n return navigation;\n};\n\n//# sourceURL=webpack:///./build/lib/navigation.js?");
/***/ }),
/***/ "./build/lib/peopleManager.js":
/*!************************************!*\
!*** ./build/lib/peopleManager.js ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * People Manager\r\n */\nexports.PeopleManager = function (targetInfo) {\n var peopleManager = new utils_1.Base(targetInfo);\n // Default the properties\n peopleManager.targetInfo.defaultToWebFl = true;\n peopleManager.targetInfo.endpoint = \"sp.userprofiles.peoplemanager\";\n // Add the methods\n peopleManager.addMethods(peopleManager, { __metadata: { type: \"peoplemanager\" } });\n // Return the people manager\n return peopleManager;\n};\n\n//# sourceURL=webpack:///./build/lib/peopleManager.js?");
/***/ }),
/***/ "./build/lib/peoplePicker.js":
/*!***********************************!*\
!*** ./build/lib/peoplePicker.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * People Picker\r\n */\nexports.PeoplePicker = function (targetInfo) {\n var peoplePicker = new utils_1.Base(targetInfo);\n // Default the properties\n peoplePicker.targetInfo.defaultToWebFl = true;\n peoplePicker.targetInfo.endpoint = \"SP.UI.ApplicationPages.ClientPeoplePickerWebServiceInterface\";\n peoplePicker.targetInfo.overrideDefaultRequestToHostFl = true;\n // Add the methods\n peoplePicker.addMethods(peoplePicker, { __metadata: { type: \"peoplepicker\" } });\n // Return the people picker\n return peoplePicker;\n};\n\n//# sourceURL=webpack:///./build/lib/peoplePicker.js?");
/***/ }),
/***/ "./build/lib/profileLoader.js":
/*!************************************!*\
!*** ./build/lib/profileLoader.js ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Profile Loader\r\n */\nexports.ProfileLoader = function (targetInfo) {\n var profileLoader = new utils_1.Base(targetInfo);\n // Default the properties\n profileLoader.targetInfo.defaultToWebFl = true;\n profileLoader.targetInfo.endpoint = \"sp.userprofiles.profileloader.getprofileloader\";\n profileLoader.targetInfo.method = \"POST\";\n // Add the methods\n profileLoader.addMethods(profileLoader, { __metadata: { type: \"profileloader\" } });\n // Return the profile loader\n return profileLoader;\n};\n\n//# sourceURL=webpack:///./build/lib/profileLoader.js?");
/***/ }),
/***/ "./build/lib/search.js":
/*!*****************************!*\
!*** ./build/lib/search.js ***!
\*****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Search\r\n */\nexports.Search = function (url, targetInfo) {\n var search = new utils_1.Base(targetInfo);\n // Default the properties\n search.targetInfo.defaultToWebFl = true;\n search.targetInfo.endpoint = \"search\";\n // See if the web url exists\n if (url) {\n // Set the settings\n search.targetInfo.url = url;\n }\n // Add the methods\n search.addMethods(search, { __metadata: { type: \"search\" } });\n /** The search query method */\n search.searchquery = function (settings) {\n // Execute the request\n return search.executeMethod(\"query\", {\n argNames: [\"query\"],\n name: \"query?[[query]]\",\n requestType: utils_1.RequestType.GetReplace\n }, exports.Search.getQuery(settings));\n };\n /** The search suggest method */\n search.suggest = function (settings) {\n // Execute the request\n return search.executeMethod(\"query\", {\n argNames: [\"query\"],\n name: \"suggest?[[query]]\",\n requestType: utils_1.RequestType.GetReplace\n }, exports.Search.getQuery(settings));\n };\n // Return the search\n return search;\n};\n// Static method to compute the query\nexports.Search.getQuery = function (parameters) {\n var query = \"\";\n // Parse the parameters\n for (var key in parameters) {\n // Append the parameter to the query\n query += (query == \"\" ? \"\" : \"&\") + key + \"='\" + parameters[key] + \"'\";\n }\n // Return the query\n return [query];\n};\n\n//# sourceURL=webpack:///./build/lib/search.js?");
/***/ }),
/***/ "./build/lib/site.js":
/*!***************************!*\
!*** ./build/lib/site.js ***!
\***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Site\r\n */\nexports.Site = function (url, targetInfo) {\n var site = new utils_1.Base(targetInfo);\n // Default the properties\n site.targetInfo.defaultToWebFl = true;\n site.targetInfo.endpoint = \"site\";\n // See if the web url exists\n if (url) {\n // Set the settings\n site.targetInfo.url = url;\n }\n // Add the methods\n site.addMethods(site, { __metadata: { type: \"site\" } });\n // Return the site\n return site;\n};\n// Static method to see if a site exists\nexports.Site.exists = function (url) {\n // Return the base object\n return new utils_1.Base({\n data: { url: url },\n defaultToWebFl: true,\n endpoint: \"SP.Site.Exists\",\n method: \"POST\"\n });\n};\n// Static method to get the app context\nexports.Site.getAppContext = function (siteUrl) {\n // Return the base object\n return new utils_1.Base({\n data: { siteUrl: siteUrl },\n defaultToWebFl: true,\n endpoint: \"SP.AppContextSite\",\n method: \"POST\"\n });\n};\n// Method to get the url by id\nexports.Site.getUrlById = function (id) {\n // Return the base object\n return new utils_1.Base({\n data: { id: id },\n defaultToWebFl: true,\n endpoint: \"SP.Site.GetUrlById\",\n method: \"POST\"\n });\n};\n\n//# sourceURL=webpack:///./build/lib/site.js?");
/***/ }),
/***/ "./build/lib/socialFeed.js":
/*!*********************************!*\
!*** ./build/lib/socialFeed.js ***!
\*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Social Feed\r\n */\nexports.SocialFeed = function (targetInfo) {\n var socialFeed = new utils_1.Base(targetInfo);\n // Default the properties\n socialFeed.targetInfo.defaultToWebFl = true;\n socialFeed.targetInfo.endpoint = \"social.feed\";\n // Add the methods\n socialFeed.addMethods(socialFeed, { __metadata: { type: \"socialfeed\" } });\n // Method to post to another user's feed\n socialFeed.postToFeed = function (accountName, creationData) {\n var postInfo = { ID: null, creationData: creationData };\n // Set the post metadata\n postInfo[\"__metadata\"] = { type: \"SP.Social.SocialRestPostCreationData\" };\n postInfo.creationData[\"__metadata\"] = { type: \"SP.Social.SocialPostCreationData\" };\n return socialFeed.executeMethod(\"postToMyFeed\", {\n argNames: [\"restCreationData\"],\n name: \"actor(item=@v)/feed?@v='\" + encodeURIComponent(accountName) + \"'\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n }, [postInfo]);\n };\n // Method to post to the current user's feed\n socialFeed.postToMyFeed = function (creationData) {\n var postInfo = { ID: null, creationData: creationData };\n // Set the post metadata\n postInfo[\"__metadata\"] = { type: \"SP.Social.SocialRestPostCreationData\" };\n postInfo.creationData[\"__metadata\"] = { type: \"SP.Social.SocialPostCreationData\" };\n return socialFeed.executeMethod(\"postToMyFeed\", {\n argNames: [\"restCreationData\"],\n name: \"my/feed/post\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n }, [postInfo]);\n };\n // Return the social feed\n return socialFeed;\n};\n\n//# sourceURL=webpack:///./build/lib/socialFeed.js?");
/***/ }),
/***/ "./build/lib/types/index.js":
/*!**********************************!*\
!*** ./build/lib/types/index.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n\n//# sourceURL=webpack:///./build/lib/types/index.js?");
/***/ }),
/***/ "./build/lib/userProfile.js":
/*!**********************************!*\
!*** ./build/lib/userProfile.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * User Profile\r\n */\nexports.UserProfile = function (targetInfo) {\n var userProfile = new utils_1.Base(targetInfo);\n // Default the properties\n userProfile.targetInfo.defaultToWebFl = true;\n userProfile.targetInfo.endpoint = \"sp.userprofiles.profileloader.getprofileloader/getUserProfile\";\n userProfile.targetInfo.method = \"POST\";\n // Add the methods\n userProfile.addMethods(userProfile, { __metadata: { type: \"userprofile\" } });\n // Return the user profile\n return userProfile;\n};\n\n//# sourceURL=webpack:///./build/lib/userProfile.js?");
/***/ }),
/***/ "./build/lib/utility.js":
/*!******************************!*\
!*** ./build/lib/utility.js ***!
\******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Utility\r\n */\nexports.Utility = function (url, targetInfo) {\n var utility = new utils_1.Base(targetInfo);\n // Default the properties\n utility.targetInfo.defaultToWebFl = true;\n utility.targetInfo.endpoint = \"SP.Utilities.Utility\";\n // See if the web url exists\n if (url) {\n // Set the settings\n utility.targetInfo.url = url;\n }\n // Add the methods\n utility.addMethods(utility, { __metadata: { type: \"utility\" } });\n // Method to create a wiki page\n utility.createWikiPage = function (listUrl, content) {\n if (content === void 0) {\n content = \"\";\n }\n var parameters = {\n ServerRelativeUrl: listUrl,\n WikiHtmlContent: content\n };\n // Execute the method\n return utility.executeMethod(\"createWikiPage\", {\n argNames: [\"parameters\"],\n name: \"SP.Utilities.Utility.CreateWikiPageInContextWeb\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.PostWithArgsInBody\n }, [parameters]);\n };\n // Method to send an email\n utility.sendEmail = function (properties) {\n // Parse the email properties\n for (var _i = 0, _a = [\"To\", \"CC\", \"BCC\"]; _i < _a.length; _i++) {\n var propName = _a[_i];\n var propValue = properties[propName];\n // Ensure the value exists\n if (propValue) {\n // See if it's a string\n if (typeof propValue === \"string\") {\n // Add the results property\n properties[propName] = { 'results': [propValue] };\n }\n // Else, assume it's an array\n else {\n // Add the results property\n properties[propName] = { 'results': propValue };\n }\n }\n }\n // Execute the method\n return utility.executeMethod(\"sendEmail\", {\n argNames: [\"properties\"],\n metadataType: \"SP.Utilities.EmailProperties\",\n name: \"SP.Utilities.Utility.sendEmail\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.PostWithArgsInBody\n }, [properties]);\n };\n // Return the utility\n return utility;\n};\n\n//# sourceURL=webpack:///./build/lib/utility.js?");
/***/ }),
/***/ "./build/lib/web.js":
/*!**************************!*\
!*** ./build/lib/web.js ***!
\**************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\nexports.Web = function (url, targetInfo) {\n var web = new utils_1.Base(targetInfo);\n // Default the properties\n web.targetInfo.defaultToWebFl = true;\n web.targetInfo.endpoint = \"web\";\n // See if the web url exists\n if (url) {\n // Set the settings\n web.targetInfo.url = url;\n }\n // Add the methods\n web.addMethods(web, { __metadata: { type: \"web\" } });\n // Return the web\n return web;\n};\n// Static method to get a remote web\nexports.Web.getRemoteWeb = function (requestUrl) {\n // Return the remote web information\n return new utils_1.Base({\n data: { requestUrl: requestUrl },\n defaultToWebFl: true,\n endpoint: \"SP.RemoteWeb?$expand=Web\",\n method: \"POST\"\n });\n};\n\n//# sourceURL=webpack:///./build/lib/web.js?");
/***/ }),
/***/ "./build/mapper/audit.js":
/*!*******************************!*\
!*** ./build/mapper/audit.js ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Audit\r\n */\nexports.audit = {\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n\n//# sourceURL=webpack:///./build/mapper/audit.js?");
/***/ }),
/***/ "./build/mapper/eventReceiver.js":
/*!***************************************!*\
!*** ./build/mapper/eventReceiver.js ***!
\***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Event Receiver\r\n */\nexports.eventreceiver = {\n // Deletes the object\n delete: {\n requestType: utils_1.RequestType.Delete\n },\n // Updates it's properties.\n update: {\n metadataType: \"SP.EventReceiverDefinition\",\n name: \"\",\n requestMethod: \"MERGE\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n }\n};\n/**\r\n * Event Receivers\r\n */\nexports.eventreceivers = {\n // Adds an event receiver to the collection.\n add: {\n metadataType: \"SP.EventReceiverDefinition\",\n name: \"\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Gets an event receiver by it's id.\n getById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"eventreceiver\"\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n\n//# sourceURL=webpack:///./build/mapper/eventReceiver.js?");
/***/ }),
/***/ "./build/mapper/file.js":
/*!******************************!*\
!*** ./build/mapper/file.js ***!
\******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Attachment\r\n */\nexports.attachment = {};\n/**\r\n * Attachment Files\r\n */\nexports.attachmentfiles = {\n /**\r\n * Adds the attachment that is represented by the specified file name and byte array to the list item.\r\n * @param name - The name of the file to add.\r\n * @param contents - The file contents as an array buffer.\r\n **/\n add: {\n argNames: [\"fileName\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n/**\r\n * File\r\n */\nexports.file = {\n /*********************************************************************************************************************************/\n // Properties\n /*********************************************************************************************************************************/\n properties: [\"Author|user\", \"CheckedOutByUser|user\", \"EffectiveInformationRightsManagementSettings\", \"InformationRightsManagementSettings\", \"ListItemAllFields\", \"LockedByUser|user\", \"ModifiedBy|user\", \"Properties|propertyvalues\", \"VersionEvents\", \"Versions|fileversions\"],\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n // Approves the file submitted for content approval with the specified comment.\n approve: {\n argNames: [\"comment\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Stops the chunk upload session without saving the uploaded data. If the file doesn’t already exist in the library, the partially uploaded file will be deleted. Use this in response to user action (as in a request to cancel an upload) or an error or exception.\n // Use the uploadId value that was passed to the StartUpload method that started the upload session.\n // This method is currently available only on Office 365.\n cancelupload: {\n argNames: [\"uploadId\"],\n name: \"cancelupload(guid'[[uploadId]]')\",\n requestType: utils_1.RequestType.PostReplace\n },\n // Checks the file in to a document library based on the check-in type.\n // Check-In Types: MinorCheckIn = 0; MajorCheckIn = 1; OverwriteCheckIn = 2\n checkin: {\n argNames: [\"comment\", \"checkInType\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Checks out the file from a document library based on the check-out type.\n checkout: {\n requestType: utils_1.RequestType.Post\n },\n // Returns the file content.\n content: {\n name: \"$value\",\n requestType: utils_1.RequestType.GetBuffer\n },\n // Continues the chunk upload session with an additional fragment. The current file content is not changed.\n // Use the uploadId value that was passed to the StartUpload method that started the upload session.\n // This method is currently available only on Office 365.\n continueUpload: {\n argNames: [\"uploadId\", \"fileOffset\"],\n name: \"continueUpload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])\",\n requestType: utils_1.RequestType.PostReplace\n },\n // Copies the file to the destination URL.\n copyTo: {\n argNames: [\"strNewUrl\", \"bOverWrite\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Deletes the object\n delete: {\n requestType: utils_1.RequestType.Delete\n },\n // Denies approval for a file that was submitted for content approval.\n // Only documents in lists that are enabled for content approval can be denied.\n deny: {\n argNames: [\"comment\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Uploads the last file fragment and commits the file. The current file content is changed when this method completes.\n // Use the uploadId value that was passed to the StartUpload method that started the upload session.\n // This method is currently available only on Office 365.\n finishUpload: {\n argNames: [\"uploadId\", \"fileOffset\"],\n name: \"finishUpload(uploadId=guid'[[uploadId]]', fileOffset=[[fileOffset]])\",\n requestType: utils_1.RequestType.PostReplace\n },\n // Specifies the control set used to access, modify, or add Web Parts associated with this Web Part Page and view.\n // An exception is thrown if the file is not an ASPX page.\n // Type of scopes: \n getlimitedwebpartmanager: {\n argNames: [\"scope\"],\n name: \"getLimitedWebPartManager(scope=[[scope]])\",\n requestType: utils_1.RequestType.GetReplace\n },\n // Moves the file to the specified destination URL.\n // Types of move operations: Overwrite = 1; AllowBrokenThickets (move even if supporting files are separated from the file) = 8.\n moveTo: {\n argNames: [\"newUrl\", \"flags\"],\n name: \"moveTo(newUrl='[[newUrl]]', flags=[[flags]])\",\n requestType: utils_1.RequestType.PostReplace\n },\n // Opens the file as a stream.\n openBinaryStream: {\n requestType: utils_1.RequestType.GetBuffer\n },\n // Submits the file for content approval with the specified comment.\n publish: {\n argNames: [\"comment\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n },\n // Moves the file to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n recycle: {\n requestType: utils_1.RequestType.Get\n },\n // Saves the file as a stream.\n saveBinaryStream: {\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Starts a new chunk upload session and uploads the first fragment. The current file content is not changed when this method completes.\n // The method is idempotent (and therefore does not change the result) as long as you use the same values for uploadId and stream.\n // The upload session ends either when you use the CancelUpload method or when you successfully complete the upload session by passing the rest of the file contents through the ContinueUpload and FinishUpload methods.\n startUpload: {\n argNames: [\"uploadId\"],\n name: \"startupload(uploadId=guid'[[uploadId]]')\",\n requestType: utils_1.RequestType.PostReplace\n },\n // Reverts an existing checkout for the file.\n undoCheckOut: {\n requestType: utils_1.RequestType.Post\n },\n // Removes the file from content approval or unpublish a major version.\n unpublish: {\n argNames: [\"comment\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Updates it's properties.\n update: {\n metadataType: \"SP.File\",\n name: \"\",\n requestMethod: \"MERGE\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n }\n};\n/**\r\n * Files\r\n */\nexports.files = {\n // Adds a file to this collection.\n add: {\n argNames: [\"overwrite\", \"url\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Adds a ghosted file to an existing list or document library.\n // Template File Types: StandardPage = 0; WikiPage = 1; FormPage = 2\n addTemplateFile: {\n argNames: [\"urlOfFile\", \"templateFileType\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Get the file at the specified URL.\n getByUrl: {\n argNames: [\"serverRelativeUrl\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"file\"\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n/**\r\n * File Version\r\n */\nexports.fileversion = {\n /*********************************************************************************************************************************/\n // Properties\n /*********************************************************************************************************************************/\n properties: [],\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n // Deletes the object\n delete: {\n requestType: utils_1.RequestType.Delete\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n/**\r\n * File Versions\r\n */\nexports.fileversions = {\n // Deletes the object\n delete: {\n requestType: utils_1.RequestType.Delete\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n/**\r\n * Folder\r\n */\nexports.folder = {\n /*********************************************************************************************************************************/\n // Properties\n /*********************************************************************************************************************************/\n properties: [\"Files|files|/getByUrl('[Name]')|file\", \"Folders|folders|/getByUrl('[Name]')|folder\", \"ListItemAllFields\", \"ParentFolder|folder\", \"Properties|propertyvalues\", \"StorageMetrics\"],\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n // Deletes the object\n delete: {\n requestType: utils_1.RequestType.Delete\n },\n // Get the file at the specified URL.\n getByUrl: {\n argNames: [\"serverRelativeUrl\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"folder\"\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n },\n // Moves the list folder to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n recycle: {\n requestType: utils_1.RequestType.Post\n },\n // Updates it's properties.\n update: {\n metadataType: \"SP.Folder\",\n name: \"\",\n requestMethod: \"MERGE\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n }\n};\n/**\r\n * Folders\r\n */\nexports.folders = {\n /*********************************************************************************************************************************/\n // Properties\n /*********************************************************************************************************************************/\n properties: [\"Files|files|/getByUrl('[Name]')|file\", \"Folders|folders|/getByUrl('[Name]')|folder\", \"ListItemAllFields\", \"ParentFolder\", \"StorageMetrics\"],\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n // Adds the folder that is located at the specified URL to the collection.\n add: {\n argNames: [\"url\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Get the file at the specified URL.\n getbyurl: {\n argNames: [\"serverRelativeUrl\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"folder\"\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n/**\r\n * Limited Web Part Manager\r\n */\nexports.limitedwebpartmanager = {\n /*********************************************************************************************************************************/\n // Properties\n /*********************************************************************************************************************************/\n properties: [\"WebParts|webparts|/([Id])|webpart\"],\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n // Gets a webpart by its id.\n get_WebParts: {\n argNames: [\"id\"],\n name: \"webparts?expand=WebPart\",\n requestType: utils_1.RequestType.GetReplace\n }\n};\n\n//# sourceURL=webpack:///./build/mapper/file.js?");
/***/ }),
/***/ "./build/mapper/graph.js":
/*!*******************************!*\
!*** ./build/mapper/graph.js ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Graph v1.0\r\n */\nexports.graph = {\n properties: [\"groups|graph_groups|/[Name]|graph_group\", \"users|graph_users|/[Name]|graph_user\"],\n /**\r\n * me\r\n **/\n me: {\n requestType: utils_1.RequestType.GraphGet,\n returnType: \"graph_me\"\n }\n};\n/**\r\n * Graph Drive\r\n */\nexports.graph_drive = {\n properties: [\"items|graph_drive_items|/[Name]|graph_drive_item\", \"root|graph_drive_item\", \"special|graph_drive_items\"]\n};\n/**\r\n * Graph Me\r\n */\nexports.graph_me = {\n properties: [\"drives|graph_drives|/[Name]|graph_drive\", \"messages|graph_messages|/[Name]|graph_message\"],\n /**\r\n * Calendar\r\n */\n calendar: {\n requestType: utils_1.RequestType.GraphGet,\n returnType: \"graph_calendar\"\n }\n};\n\n//# sourceURL=webpack:///./build/mapper/graph.js?");
/***/ }),
/***/ "./build/mapper/index.js":
/*!*******************************!*\
!*** ./build/mapper/index.js ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Mapper = __webpack_require__(/*! ./mapper */ \"./build/mapper/mapper.js\");\nexports.Mapper = Mapper;\nvar SPTypes = __webpack_require__(/*! ./sptypes */ \"./build/mapper/sptypes.js\");\nexports.SPTypes = SPTypes;\nvar Types = __webpack_require__(/*! ./types */ \"./build/mapper/types/index.js\");\nexports.Types = Types;\n\n//# sourceURL=webpack:///./build/mapper/index.js?");
/***/ }),
/***/ "./build/mapper/list.js":
/*!******************************!*\
!*** ./build/mapper/list.js ***!
\******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Content Type\r\n */\nexports.contenttype = {\n /*********************************************************************************************************************************/\n // Properties\n /*********************************************************************************************************************************/\n properties: [\"FieldLinks|fieldlinks|('[Name]')|fieldlink\", \"Fields|fields|/getByInternalNameOrTitle('[Name]')|field\", \"WorkflowAssociations\"],\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n // Deletes the content type.\n delete: {\n requestType: utils_1.RequestType.Delete\n },\n // Updates it's properties.\n update: {\n metadataType: \"SP.ContentType\",\n name: \"\",\n requestMethod: \"MERGE\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n }\n};\n/**\r\n * Content Types\r\n */\nexports.contenttypes = {\n // Adds a content type to the collection.\n add: {\n metadataType: \"SP.ContentType\",\n name: \"\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Adds an existing content type to this collection.\n addAvailableContentType: {\n argNames: [\"contentTypeId\"],\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Gets a content type by id.\n getById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"contenttype\"\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n/**\r\n * Field\r\n */\nexports.field = {\n // Deletes the object\n delete: {\n requestType: utils_1.RequestType.Delete\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n },\n // Sets the value of the ShowInDisplayForm property for this field.\n setShowInDisplayForm: {\n argNames: [\"showInForm\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n },\n // Sets the value of the ShowInEditForm property for this field.\n setShowInEditForm: {\n argNames: [\"showInForm\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n },\n // Sets the value of the ShowInNewForm property for this field.\n setShowInNewForm: {\n argNames: [\"showInForm\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n },\n // Updates it's properties.\n update: {\n inheritMetadataType: true,\n name: \"\",\n requestMethod: \"MERGE\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n }\n};\n/**\r\n * Field Links\r\n */\nexports.fieldlinks = {\n // Adds a field link to the collection.\n add: {\n argNames: [\"data\"],\n metadataType: \"SP.FieldLink\",\n name: \"\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Gets a field link by it's id.\n getById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"fieldlink\"\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n/**\r\n * Fields\r\n */\nexports.fields = {\n // Adds a field to the field collection.\n add: {\n metadataType: \"SP.Field\",\n name: \"\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Adds a field to the field collection.\n addField: {\n argNames: [\"parameters\"],\n metadataType: \"SP.FieldCreationInformation\",\n name: \"addField\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Adds a secondary lookup field that depends on a primary lookup field for its relationship to the list where it gets its information.\n addDependentLookupField: {\n argNames: [\"displayname\", \"primarylookupfieldid\", \"showfield\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Creates a field based on the specified schema, Boolean value, and field options.\n // Set the option to addFieldInternalNameHint - 8 to ensure the internal name in the schema xml is not altered.\n createFieldAsXml: {\n argNames: [\"schemaXml\"],\n requestType: utils_1.RequestType.PostWithArgsInBody,\n data: {\n parameters: {\n __metadata: { type: \"SP.XmlSchemaFieldCreationInformation\" },\n Options: 8,\n SchemaXml: \"[[schemaXml]]\"\n }\n }\n },\n // Gets the field with the specified ID.\n getById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly,\n returnType: \"field\"\n },\n // Returns the first Field object with the specified internal name or title from the collection.\n getByInternalNameOrTitle: {\n argNames: [\"internalNameOrTitle\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly,\n returnType: \"field\"\n },\n // Returns the first field object in the collection based on the title of the specified field.\n getByTitle: {\n argNames: [\"title\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly,\n returnType: \"field\"\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n/**\r\n * Items\r\n */\nexports.items = {\n // Adds an item to the list item collection.\n add: {\n metadataType: function metadataType(obj) {\n return obj.parent && obj.parent[\"ListItemEntityTypeFullName\"] || \"SP.ListItem\";\n },\n name: \"\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Gets an item by its id.\n getById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"listitem\"\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n/**\r\n * List\r\n */\nexports.list = {\n /*********************************************************************************************************************************/\n // Properties\n /*********************************************************************************************************************************/\n properties: [\"BrowserFileHandling\", \"ContentTypes|contenttypes|('[Name]')|contenttype\", \"CreatablesInfo\", \"DefaultDisplayFormUrl\", \"DefaultEditFormUrl\", \"DefaultNewFormUrl\", \"DefaultView|view\", \"DescriptionResource\", \"EventReceivers|eventreceivers|('[Name]')|eventreceiver\", \"Fields|fields|/getByInternalNameOrTitle('[Name]')|field\", \"FirstUniqueAncestorSecurableObject\", \"Forms|forms|('[Name]')|form\", \"InformationRightsManagementSettings\", \"Items|items|([Name])|item\", \"ParentWeb\", \"RoleAssignments|roleassignments|([Name])|roleassignment\", \"RootFolder|folder|/getByUrl('[Name]')|file\", \"Subscriptions\", \"TitleResource\", \"UserCustomActions|usercustomactions|('[Name]')|usercustomaction\", \"Views|views|('[Name]')|view\", \"WorkflowAssociations\"],\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n // Creates unique role assignments for the securable object.\n breakRoleInheritance: {\n argNames: [\"copyroleassignments\", \"clearsubscopes\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Deletes the object\n delete: {\n requestType: utils_1.RequestType.Delete\n },\n // Returns the collection of changes from the change log that have occurred within the list, based on the specified query.\n getChanges: {\n argNames: [\"query\"],\n metadataType: \"SP.ChangeQuery\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Returns an item based on the id.\n getItemById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"item\"\n },\n // Returns a collection of items from the list based on the view xml.\n getItems: {\n argNames: [\"viewXml\"],\n requestType: utils_1.RequestType.PostWithArgsInBody,\n data: {\n query: {\n __metadata: { type: \"SP.CamlQuery\" },\n ViewXml: \"[[viewXml]]\"\n }\n }\n },\n // Returns a collection of items from the list based on the specified query.\n getItemsByQuery: {\n argNames: [\"camlQuery\"],\n name: \"getItems\",\n requestType: utils_1.RequestType.PostWithArgsInBody,\n data: {\n query: {\n __metadata: { type: \"SP.CamlQuery\" },\n ViewXml: \"<View>[[camlQuery]]</View>\"\n }\n }\n },\n // Returns a collection of items from the list based on the specified query.\n getListItemChangesSinceToken: {\n argNames: [\"query\"],\n metadataType: \"SP.ChangeLogItemQuery\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Returns a collection of lookup fields that use this list as a data source and that have FieldLookup.IsRelationship set to true.\n getRelatedFields: {\n requestType: utils_1.RequestType.Get\n },\n // Gets the effective user permissions for the current user.\n getUserEffectivePermissions: {\n argNames: [\"loginName\"],\n name: \"getUserEffectivePermissions(@user)?@user='[[loginName]]'\",\n requestType: utils_1.RequestType.GetReplace\n },\n // Returns the list view with the specified view identifier.\n getViewById: {\n argNames: [\"viewId\"],\n name: \"getView\",\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"view\"\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n },\n // Moves the list to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n recycle: {\n requestType: utils_1.RequestType.Post\n },\n // Renders the list data.\n renderListData: {\n argNames: [\"viewXml\"],\n name: \"renderListData(@v)?@v='<View>[[viewXml]]</View>'\",\n requestType: utils_1.RequestType.PostReplace\n },\n // Renders the list form data.\n // Types of modes: 1 - Display, 2 - Edit, 3 - New\n renderListFormData: {\n argNames: [\"itemid\", \"formid\", \"mode\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Reserves a list item ID for idempotent list item creation.\n reserveListItemId: {\n requestType: utils_1.RequestType.Post\n },\n // Resets the role inheritance for the securable object and inherits role assignments from the parent securable object.\n resetRoleInheritance: {\n requestType: utils_1.RequestType.Post\n },\n // Updates it's properties.\n update: {\n metadataType: \"SP.List\",\n name: \"\",\n requestMethod: \"MERGE\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n }\n};\n/**\r\n * List Item\r\n */\nexports.listitem = {\n /*********************************************************************************************************************************/\n // Properties\n /*********************************************************************************************************************************/\n properties: [\"AttachmentFiles|attachmentfiles|('[Name]')|attachment\", \"ContentType|contenttype\", \"FieldValuesAsHtml\", \"FieldValuesAsText\", \"FieldValuesForEdit\", \"File|file\", \"FirstUniqueAncestorSecurableObject\", \"Folder|folder\", \"GetDlpPolicyTip\", \"ParentList|list\", \"Properties|propertyvalues\", \"RoleAssignments|roleassignments|roleassignments|([Name])|roleassignment\"],\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n // Creates unique role assignments for the securable object.\n breakRoleInheritance: {\n argNames: [\"copyroleassignments\", \"clearsubscopes\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Deletes the object\n delete: {\n requestType: utils_1.RequestType.Delete\n },\n // Gets the effective permissions that a specified user has on the list item.\n getUserEffectivePermissions: {\n argNames: [\"loginName\"],\n name: \"getUserEffectivePermissions(@user)?@user='[[loginName]]'\",\n requestType: utils_1.RequestType.GetReplace\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n },\n // Moves the list item to the Recycle Bin and returns the identifier of the new Recycle Bin item.\n recycle: {\n requestType: utils_1.RequestType.Post\n },\n // Resets the role inheritance for the securable object and inherits role assignments from the parent securable object.\n resetRoleInheritance: {\n requestType: utils_1.RequestType.Post\n },\n // Updates it's properties.\n update: {\n inheritMetadataType: true,\n metadataType: function metadataType(obj) {\n return obj.parent && obj.parent[\"ListItemEntityTypeFullName\"] || \"SP.ListItem\";\n },\n name: \"\",\n requestMethod: \"MERGE\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Validates and sets the values of the specified collection of fields for the list item.\n validateUpdateListItem: {\n argNames: [\"formValues\", \"bNewDocumentUpdate\"],\n requestType: utils_1.RequestType.PostWithArgsInBody\n }\n};\n/**\r\n * Lists\r\n */\nexports.lists = {\n // Adds a list to the list collection.\n add: {\n metadataType: \"SP.List\",\n name: \"\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Gets a list that is the default asset location for images or other files, which the users upload to their wiki pages.\n ensureSiteAssetsLibrary: {\n requestType: utils_1.RequestType.Post\n },\n // Gets a list that is the default location for wiki pages.\n ensureSitePagesLibrary: {\n requestType: utils_1.RequestType.Post\n },\n // Returns the list with the specified list identifier.\n getById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"list\"\n },\n // Returns the list with the specified title from the collection.\n getByTitle: {\n argNames: [\"title\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"list\"\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n/**\r\n * Version\r\n */\nexports.version = {\n // Gets the version with the specified ID.\n getById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"version\"\n },\n // Deletes all versions in the collection.\n deleteAll: {\n requestType: utils_1.RequestType.Post\n },\n // Deletes a version, by the specified id.\n deleteById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n },\n // Deletes a version, by the specified label.\n deleteByLabel: {\n argNames: [\"label\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n },\n // Restores a version, by the specified label.\n restoreByLabel: {\n argNames: [\"label\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n }\n};\n/**\r\n * View\r\n */\nexports.view = {\n /*********************************************************************************************************************************/\n // Properties\n /*********************************************************************************************************************************/\n properties: [\"ViewFields|viewfieldcollection\"],\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n // Deletes the object\n delete: {\n requestType: utils_1.RequestType.Delete\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n },\n // Returns the list view as HTML.\n renderAsHtml: {\n requestType: utils_1.RequestType.Get\n },\n // Updates it's properties.\n update: {\n metadataType: \"SP.View\",\n name: \"\",\n requestMethod: \"MERGE\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n }\n};\n/**\r\n * View Field Collection\r\n */\nexports.viewfieldcollection = {\n // Adds the field with the specified field internal name or display name to the collection.\n addViewField: {\n argNames: [\"fieldName\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n },\n // Moves the field with the specified field internal name to the specified position in the collection.\n moveViewFieldTo: {\n argNames: [\"field\", \"index\"],\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n },\n // Removes all the fields from the collection.\n removeAllViewFields: {\n requestType: utils_1.RequestType.Post\n },\n // Removes the field with the specified field internal name from the collection.\n removeViewField: {\n argNames: [\"fieldName\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly\n }\n};\n/**\r\n * Views\r\n */\nexports.views = {\n // Adds a view to the view collection.\n add: {\n metadataType: \"SP.View\",\n name: \"\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Gets the list view with the specified ID.\n getById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"view\"\n },\n // Gets the list view with the specified title.\n getByTitle: {\n argNames: [\"title\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"view\"\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n\n//# sourceURL=webpack:///./build/mapper/list.js?");
/***/ }),
/***/ "./build/mapper/mapper.js":
/*!********************************!*\
!*** ./build/mapper/mapper.js ***!
\********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nfunction __export(m) {\n for (var p in m) {\n if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(__webpack_require__(/*! ./audit */ \"./build/mapper/audit.js\"));\n__export(__webpack_require__(/*! ./eventReceiver */ \"./build/mapper/eventReceiver.js\"));\n__export(__webpack_require__(/*! ./file */ \"./build/mapper/file.js\"));\n__export(__webpack_require__(/*! ./graph */ \"./build/mapper/graph.js\"));\n__export(__webpack_require__(/*! ./list */ \"./build/mapper/list.js\"));\n__export(__webpack_require__(/*! ./navigation */ \"./build/mapper/navigation.js\"));\n__export(__webpack_require__(/*! ./propertyValues */ \"./build/mapper/propertyValues.js\"));\n__export(__webpack_require__(/*! ./search */ \"./build/mapper/search.js\"));\n__export(__webpack_require__(/*! ./security */ \"./build/mapper/security.js\"));\n__export(__webpack_require__(/*! ./site */ \"./build/mapper/site.js\"));\n__export(__webpack_require__(/*! ./social */ \"./build/mapper/social.js\"));\n__export(__webpack_require__(/*! ./user */ \"./build/mapper/user.js\"));\n__export(__webpack_require__(/*! ./userCustomAction */ \"./build/mapper/userCustomAction.js\"));\n\n//# sourceURL=webpack:///./build/mapper/mapper.js?");
/***/ }),
/***/ "./build/mapper/navigation.js":
/*!************************************!*\
!*** ./build/mapper/navigation.js ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Navigation\r\n */\nexports.navigationservicerest = {\n /**\r\n * Properties\r\n */\n properties: [\"MenuState|menustate|([Name])|menunode\"],\n /**\r\n * Methods\r\n */\n // Method to get the menu state.\n getMenuState: {\n argNames: [\"menuNodeKey\", \"depth\", \"customProperties\", \"mapProviderName\"],\n name: \"MenuState\",\n RequestType: utils_1.RequestType.GetWithArgsInQSAsVar\n }\n};\n\n//# sourceURL=webpack:///./build/mapper/navigation.js?");
/***/ }),
/***/ "./build/mapper/propertyValues.js":
/*!****************************************!*\
!*** ./build/mapper/propertyValues.js ***!
\****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Property Values\r\n */\nexports.propertyvalues = {\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n\n//# sourceURL=webpack:///./build/mapper/propertyValues.js?");
/***/ }),
/***/ "./build/mapper/search.js":
/*!********************************!*\
!*** ./build/mapper/search.js ***!
\********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Search\r\n */\nexports.search = {\n postquery: {\n argNames: [\"request\"],\n metadataType: \"Microsoft.Office.Server.Search.REST.SearchRequest\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n }\n};\n\n//# sourceURL=webpack:///./build/mapper/search.js?");
/***/ }),
/***/ "./build/mapper/security.js":
/*!**********************************!*\
!*** ./build/mapper/security.js ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Role Assignment\r\n */\nexports.roleassignment = {\n /*********************************************************************************************************************************/\n // Properties\n /*********************************************************************************************************************************/\n properties: [\"Member\", \"RoleDefinitionBindings|roledefinitions\"],\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n // Deletes the object\n delete: {\n requestType: utils_1.RequestType.Delete\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n/**\r\n * Role Assignments\r\n */\nexports.roleassignments = {\n // Adds a new role assignment with the specified principal and role definitions to the collection.\n addRoleAssignment: {\n argNames: [\"principalId\", \"roleDefId\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Gets the role assignment associated with the specified principal ID from the collection.\n getByPrincipalId: {\n argNames: [\"principalId\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"roleassignment\"\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n },\n // Gets the role definition with the specified role type.\n removeRoleAssignment: {\n argNames: [\"principalId\", \"roleDefId\"],\n requestType: utils_1.RequestType.PostWithArgs\n }\n};\n/**\r\n * Role Definition\r\n */\nexports.roledefinition = {\n // Deletes the object\n delete: {\n requestType: utils_1.RequestType.Delete\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n/**\r\n * Role Definitions\r\n */\nexports.roledefinitions = {\n // Gets the role definition with the specified ID from the collection.\n getById: {\n argNames: [\"roleDefId\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"roledefinition\"\n },\n // Gets the role definition with the specified name.\n getByName: {\n argNames: [\"name\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"roledefinition\"\n },\n // Gets the role definitions with the specified role type.\n getByType: {\n argNames: [\"roleType\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"roledefinitions\"\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n\n//# sourceURL=webpack:///./build/mapper/security.js?");
/***/ }),
/***/ "./build/mapper/site.js":
/*!******************************!*\
!*** ./build/mapper/site.js ***!
\******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Features\r\n */\nexports.features = {\n /**\r\n * Activates a feature.\r\n * @param id - The feature id.\r\n **/\n add: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n },\n /**\r\n * Gets a feature by id.\r\n * @param id - The feature id.\r\n */\n getById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"feature\"\n },\n // Gets a feature by it's name.\n getByName: {\n argNames: [\"name\"],\n name: \"?$select=DisplayName,*&$filter=DisplayName eq '[[name]]'\",\n requestType: utils_1.RequestType.GetReplace,\n returnType: \"feature\"\n },\n /**\r\n * Queries the collection\r\n */\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n },\n /**\r\n * Deactivates a feature.\r\n * @param id - The feature id.\r\n **/\n remove: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n }\n};\n/**\r\n * Site\r\n */\nexports.site = {\n /*********************************************************************************************************************************/\n // Properties\n /*********************************************************************************************************************************/\n properties: [\"EventReceivers|eventreceivers|('[Name]')|eventreceiver\", \"Features|features|('[Name]')|feature\", \"Owner|user\", \"RootWeb|web\", \"UserCustomActions|usercustomactions|('[Name]')|usercustomaction\"],\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n // Creates a temporary evaluation SPSite for this SPSite, for the purposes of determining whether an upgrade is likely to be successful.\n createPreviewSPSite: {\n argNames: [\"upgrade\", \"sendemail\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Extend the upgrade reminder date for this SPSite by the days specified at WebApplication.UpgradeReminderDelay.\n extendUpgradeReminderDate: {\n requestType: utils_1.RequestType.Post\n },\n // Specifies the list template gallery, site template gallery, Web Part gallery, master page gallery, or other galleries from the site collection, including custom galleries that are defined by users.\n getCatalog: {\n argNames: [\"typeCatalog\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n },\n // Specifies the collection of the site collection changes from the change log that have occurred within the scope of the site collection, based on the specified query.\n getChanges: {\n argNames: [\"query\"],\n metadataType: \"SP.ChangeQuery\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Specifies the collection of custom list templates for a given site.\n getCustomListTemplates: {\n argNames: [\"web\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Returns the collection of site definitions that are available for creating Web sites within the site collection.\n getWebTemplates: {\n argNames: [\"LCID\", \"overrideCompatLevel\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Invalidates cached upgrade information about the site collection so that this information will be recomputed the next time it is needed.\n invalidate: {\n requestType: utils_1.RequestType.Post\n },\n // Returns true if the object needs to be upgraded; otherwise, false.\n needsUpgradeByType: {\n argNames: [\"versionUpgrade\", \"recursive\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Returns the site at the specified URL.\n openWeb: {\n argNames: [\"strUrl\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n },\n // Returns the site with the specified GUID.\n openWebById: {\n argNames: [\"gWebId\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n },\n // Queries the object\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n },\n // Runs a health check as follows. (The health rules referenced below perform an implementation-dependent check on the health of a site collection)\n runHealthCheck: {\n argNames: [\"ruleId\", \"bRepair\", \"bRunAlways\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Either runs a site collection upgrade, or schedules it to be run in the future, depending on available system resources and the value of the queueOnly parameter. The user executing this method MUST be a farm administrator or a site collection administrator.\n runUpgradeSiteSession: {\n argNames: [\"versionUpgrade\", \"queueOnly\", \"sendEmail\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Updates it's properties.\n update: {\n metadataType: \"SP.Site\",\n name: \"\",\n requestMethod: \"MERGE\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Sets whether the client-side object model (CSOM) requests that are made in the context of any site inside the site collection require UseRemoteAPIs permission.\n updateClientObjectModelUseRemoteAPIsPermissionSetting: {\n argNames: [\"requireUseRemoteAPIs\"],\n requestType: utils_1.RequestType.PostWithArgs\n }\n};\n/**\r\n * Tenant App\r\n */\nexports.tenantapp = {\n // Deploy solution package in tenant app catalog\n deploy: {\n requestType: utils_1.RequestType.Post\n },\n // Install solution package from tenant app catalog to SharePoint site\n install: {\n requestType: utils_1.RequestType.Post\n },\n // Queries the object\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n },\n // Remove solution package from tenant app catalog\n remove: {\n requestType: utils_1.RequestType.Post\n },\n // Retract solution package in the tenant app catalog\n retract: {\n requestType: utils_1.RequestType.Post\n },\n // Upgrade solution package in SharePoint site\n upgrade: {\n requestType: utils_1.RequestType.Post\n },\n // Uninstall solution package from SharePoint site\n uninstall: {\n requestType: utils_1.RequestType.Post\n }\n};\n/**\r\n * Tenant Apps\r\n */\nexports.tenantapps = {\n // Get an app by id\n getById: {\n argNames: [\"guid\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"tenantapp\"\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n/**\r\n * Tenant App Catalog\r\n */\nexports.tenantappcatalog = {\n /*********************************************************************************************************************************/\n // Properties\n /*********************************************************************************************************************************/\n properties: [\"AvailableApps|tenantapps|/getById('[Id]')|tenantapp\"],\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n // Adds the folder that is located at the specified URL to the collection.\n add: {\n argNames: [\"overwrite\", \"url\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Get an app by id.\n getById: {\n argNames: [\"guid\"],\n name: \"AvailableApps/getById('[[guid]]')\",\n requestType: utils_1.RequestType.GetReplace,\n returnType: \"tenantapp\"\n },\n // Gets the site collection app catalog sites\n SiteCollectionAppCatalogsSites: {\n requestType: utils_1.RequestType.Post\n }\n};\n/**\r\n * Utility\r\n */\nexports.utility = {\n createEmailBodyForInvitation: {\n argNames: [\"pageAddress\"],\n name: \"SP.Utilities.Utility.CreateEmailBodyForInvitation\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n getAppLicenseDeploymentId: {\n name: \"SP.Utilities.Utility.GetAppLicenseDeploymentId\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.Get\n },\n getAppLicenseInformation: {\n name: \"SP.Utilities.Utility.GetAppLicenseInformation\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.Get\n },\n getCurrentUserEmailAddresses: {\n name: \"SP.Utilities.Utility.GetCurrentUserEmailAddresses\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.Get\n },\n getLocalizedString: {\n argNames: [\"sourceValue\"],\n name: \"SP.Utilities.Utility.GetLocalizedString\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.GetWithArgsValueOnly\n },\n getLowerCaseString: {\n argNames: [\"sourceValue\", \"lcid\"],\n name: \"SP.Utilities.Utility.GetLowerCaseString\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n importAppLicense: {\n argNames: [\"url\"],\n name: \"SP.Utilities.Utility.ImportAppLicense\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.PostWithArgs\n },\n isUserLicensedForEntityInContext: {\n argNames: [\"url\"],\n name: \"SP.Utilities.Utility.IsUserLicensedForEntityInContext\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.PostWithArgs\n },\n localizeWebPartGallery: {\n argNames: [\"url\"],\n name: \"SP.Utilities.Utility.LocalizeWebPartGallery\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.PostWithArgs\n },\n markDiscussionAsFeatured: {\n argNames: [\"url\"],\n name: \"SP.Utilities.Utility.MarkDiscussionAsFeatured\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.PostWithArgs\n },\n resolvePrincipal: {\n name: \"SP.Utilities.Utility.ResolvePrincipalInCurrentContext\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.Post\n },\n searchPrincipals: {\n name: \"SP.Utilities.Utility.SearchPrincipalsUsingContextWeb\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.Post\n },\n unmarkDiscussionAsFeatured: {\n argNames: [\"url\"],\n name: \"SP.Utilities.Utility.UnmarkDiscussionAsFeatured\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.PostWithArgsInBody\n }\n};\n/**\r\n * Web\r\n */\nexports.web = {\n /*********************************************************************************************************************************/\n // Properties\n /*********************************************************************************************************************************/\n properties: [\"AllProperties|propertyvalues\", \"AppTiles\", \"AssociatedMemberGroup|group\", \"AssociatedOwnerGroup|group\", \"AssociatedVisitorGroup|group\", \"Author|user\", \"AvailableContentTypes|contenttypes\", \"AvailableFields|fields\", \"ClientWebParts\", \"ContentTypes|contenttypes|('[Name]')|contenttype\", \"CurrentUser|user\", \"DataLeakagePreventionStatusInfo\", \"DescriptionResource\", \"EventReceivers|eventreceivers|('[Name]')|eventreceiver\", \"Features|features|('[Name]')|feature\", \"Fields|fields|/getByInternalNameOrTitle('[Name]')|field\", \"FirstUniqueAncestorSecurableObject\", \"Folders|folders|/getByUrl('[Name]')|folder\", \"Lists|lists|/getByTitle('[Name]')|list\", \"ListTemplates|listtemplates|('[Name]')|listtemplate\", \"Navigation\", \"ParentWeb\", \"PushNotificationSubscribers\", \"RecycleBin\", \"RegionalSettings\", \"RoleAssignments|roleassignments|([Name])|roleassignment\", \"RoleDefinitions|roledefinitions|/getByName('[Name]')|roledefinition\", \"RootFolder|folder|/getByUrl('[Name]')|file\", \"SiteGroups|sitegroups|/getByName('[Name]')|group\", \"SiteUserInfoList\", \"SiteUsers|users|/getById([Name])|user\", \"TenantAppCatalog|tenantappcatalog\", \"ThemeInfo\", \"TitleResource\", \"UserCustomActions|usercustomactions|('[Name]')|usercustomaction\", \"WebInfos|webinfos\", \"Webs|webs\", \"WorkflowAssociations\", \"WorkflowTemplates\"],\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n // Applies the theme specified by the contents of each of the files specified in the arguments to the site.\n applyTheme: {\n argNames: [\"colorpaletteurl\", \"fontschemeurl\", \"backgroundimageurl\", \"sharegenerated\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Applies the specified site definition or site template to the Web site that has no template applied to it.\n applyWebTemplate: {\n argName: [\"name\"],\n requestType: utils_1.RequestType.PostWithArgsInQSAsVar\n },\n // Creates unique role assignments for the securable object.\n breakRoleInheritance: {\n argNames: [\"copyroleassignments\", \"clearsubscopes\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Deletes the object\n delete: {\n requestType: utils_1.RequestType.Delete\n },\n // Checks whether the push notification subscriber exist for the current user with the given device application instance ID.\n doesPushNotificationSubscriberExist: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly\n },\n // Returns whether the current user has the given set of permissions.\n doesUserHavePermissions: {\n argNames: [\"High\", \"Low\"],\n requestType: utils_1.RequestType.GetWithArgsInQSAsVar\n },\n // Checks whether the specified login name belongs to a valid user in the site. If the user doesn't exist, adds the user to the site.\n ensureUser: {\n argNames: [\"logonName\"],\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Sends data to an OData service.\n executeRemoteLOB: {\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Gets the app BDC catalog.\n getAppBdcCatalog: {\n requestType: utils_1.RequestType.Post\n },\n // Gets the app BDC catalog for the specified app instance.\n getAppBdcCatalogForAppInstance: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n },\n // Retrieves an AppInstance installed on this Site.\n getAppInstanceById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly\n },\n // Retrieves all AppInstances installed on this site that are instances of the specified App.\n getAppInstancesByProductId: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly\n },\n // Returns a collection of site templates available for the site.\n getAvailableWebTemplates: {\n argNames: [\"lcid\", \"doincludecrosslanguage\"],\n requestType: utils_1.RequestType.GetWithArgs\n },\n // Returns the list gallery on the site.\n getCatalog: {\n argNames: [\"galleryType\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"list\"\n },\n // Returns the collection of all changes from the change log that have occurred within the scope of the site, based on the specified query.\n getChanges: {\n argNames: [\"query\"],\n metadataType: \"SP.ChangeQuery\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Gets the context information for the site.\n getContextWebInformation: {\n name: \"contextInfo\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.Post\n },\n // Gets the custom list templates for the site.\n getCustomListTemplates: {\n requestType: utils_1.RequestType.Get\n },\n // Gets the document libraries on a site. (SharePoint Online only)\n getDocumentLibraries: {\n argNames: [\"url\"],\n name: \"sp.web.getDocumentLibraries(@v)?@v='[[url]]'\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.GetReplace\n },\n // Gets the specified external content type in a line-of-business (LOB) system application.\n getEntity: {\n argNames: [\"namespace\", \"name\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Returns the file object located at the specified server-relative URL.\n getFileByServerRelativeUrl: {\n argNames: [\"url\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"file\"\n },\n // Returns the folder object located at the specified server-relative URL.\n getFolderByServerRelativeUrl: {\n argNames: [\"url\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"folder\"\n },\n // Gets the list at the specified site-relative URL. (SharePoint Online only)\n getList: {\n argNames: [\"url\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"list\"\n },\n // Gets the push notification subscriber over the site for the specified device application instance ID.\n getPushNotificationSubscriber: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly\n },\n // Queries for the push notification subscribers over the site for the specified value of custom arguments. Null or empty custom arguments will return subscribers without any filtering.\n getPushNotificationSubscribersByArgs: {\n argNames: [\"args\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly\n },\n // Queries for the push notification subscribers over the site for the specified user.\n getPushNotificationSubscribersByUser: {\n argNames: [\"loginName\"],\n requestType: utils_1.RequestType.GetWithArgsInQSAsVar\n },\n // Returns the collection of child sites of the current site based on the specified query. (SharePoint Online only)\n getSubwebsFilteredForCurrentUser: {\n argNames: [\"nwebtemplatefilter\", \"nconfigurationfilter\"],\n requestType: utils_1.RequestType.GetWithArgs,\n returnType: \"webinfos\"\n },\n // Returns the user corresponding to the specified member identifier for the current site.\n getUserById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"user\"\n },\n // Gets the effective permissions that the specified user has within the current application scope.\n getUserEffectivePermissions: {\n argNames: [\"loginName\"],\n name: \"getUserEffectivePermissions(@user)?@user='[[loginName]]'\",\n requestType: utils_1.RequestType.GetReplace\n },\n // Gets the site URL from a page URL.\n getWebUrlFromPageUrl: {\n name: \"sp.web.getWebUrlFromPageUrl\",\n requestType: utils_1.RequestType.GetWithArgsInQSAsVar\n },\n // Uploads and installs an app package to this site.\n loadAndInstallApp: {\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Uploads and installs an App package on the site in a specified locale.\n loadAndInstallAppInSpecifiedLocale: {\n argNames: [\"appPackageStream\", \"installationLocaleLCID\"],\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Uploads an App package and creates an instance from it.\n loadApp: {\n argNames: [\"appPackageStream\", \"installationLocaleLCID\"],\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Returns the name of the image file for the icon that is used to represent the specified file.\n mapToIcon: {\n argNames: [\"filename\", \"progid\", \"size\"],\n requestType: utils_1.RequestType.GetWithArgs\n },\n // Processes a notification from an external system.\n processExternalNotification: {\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Queries the object\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n },\n // Registers the subscriber for push notifications over the site. If the registration already exists, the service token is updated with the new value.\n registerPushNotificationSubscriber: {\n argNames: [\"deviceappinstanceid\", \"servicetoken\"],\n requestType: utils_1.RequestType.PostWithArgs\n },\n // Resets the role inheritance for the securable object and inherits role assignments from the parent securable object.\n resetRoleInheritance: {\n requestType: utils_1.RequestType.Post\n },\n // Unregisters the subscriber for push notifications from the site.\n unregisterPushNotificationSubscriber: {\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n },\n // Updates it's properties.\n update: {\n metadataType: \"SP.Web\",\n name: \"\",\n requestMethod: \"MERGE\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n }\n};\n/**\r\n * Web Information Collection\r\n */\nexports.webinfos = {\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n/**\r\n * Webs\r\n */\nexports.webs = {\n add: {\n argNames: [\"parameters\"],\n metadataType: \"SP.WebCreationInformation\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n\n//# sourceURL=webpack:///./build/mapper/site.js?");
/***/ }),
/***/ "./build/mapper/social.js":
/*!********************************!*\
!*** ./build/mapper/social.js ***!
\********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * People Manager\r\n */\nexports.peoplemanager = {\n amIFollowedBy: {\n argNames: [\"accountName\"],\n name: \"amIFollowedBy(@v)?@v='[[accountName]]'\",\n requestType: utils_1.RequestType.GetReplace\n },\n amIFollowing: {\n name: \"amIFollowing(@v)?@v='[[accountName]]'\",\n requestType: utils_1.RequestType.GetReplace\n },\n follow: {\n argNames: [\"accountName\"],\n name: \"follow(@v)?@v='[[accountName]]'\",\n requestType: utils_1.RequestType.PostReplace\n },\n followTag: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n },\n getFollowedTags: {\n argNames: [\"maxCount\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly\n },\n getFollowersFor: {\n argNames: [\"accountName\"],\n name: \"getFollowersFor(@v)?@v='[[accountName]]'\",\n requestType: utils_1.RequestType.GetReplace\n },\n getMyFollowers: {\n requestType: utils_1.RequestType.Get\n },\n getMyProperties: {\n requestType: utils_1.RequestType.Get\n },\n getMySuggestions: {\n requestType: utils_1.RequestType.Get\n },\n getPeopleFollowedBy: {\n argNames: [\"accountName\"],\n name: \"getPeopleFollowedBy(@v)?@v='[[accountName]]'\",\n requestType: utils_1.RequestType.GetReplace\n },\n getPeopleFollowedByMe: {\n requestType: utils_1.RequestType.Get\n },\n getPropertiesFor: {\n argNames: [\"accountName\"],\n name: \"getPropertiesFor(@v)?@v='[[accountName]]'\",\n requestType: utils_1.RequestType.GetReplace\n },\n getTrendingTags: {\n name: \"sp.userprofiles.peoplemanager.gettrendingtags\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.Get\n },\n getUserProfilePropertyFor: {\n argNames: [\"accountName\", \"propertyName\"],\n name: \"getUserProfilePropertyFor(accountname=@v, propertyname='[[propertyName]]')?@v='[[accountName]]'\",\n requestType: utils_1.RequestType.GetReplace\n },\n hideSuggestion: {\n argNames: [\"accountName\"],\n name: \"hideSuggestion(@v)?@v='[[accountName]]'\",\n requestType: utils_1.RequestType.PostReplace\n },\n isFollowing: {\n argNames: [\"possibleFollowerAccountName\", \"possibleFolloweeAccountName\"],\n name: \"sp.userprofiles.peoplemanager.isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)?@v='[[possibleFollowerAccountName]]'&@y='[[possibleFolloweeAccountName]]'\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.GetReplace\n },\n setMyProfilePicture: {\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n stopFollowing: {\n argNames: [\"accountName\"],\n name: \"stopFollowing(@v)?@v='[[accountName]]'\",\n requestType: utils_1.RequestType.PostWithArgsInQSAsVar\n },\n stopFollowingTag: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n }\n};\n/**\r\n * Profile Loader\r\n */\nexports.profileloader = {\n createPersonalSiteEnqueueBulk: {\n argNames: [\"emailIDs\"],\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n getOwnerUserProfile: {\n name: \"sp.userprofiles.profileloader.getowneruserprofile\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.Post,\n returnType: \"userprofile\"\n },\n getUserProfile: {\n requestType: utils_1.RequestType.Post,\n returnType: \"userprofile\"\n }\n};\n/**\r\n * Social Feed\r\n */\nexports.socialfeed = {\n actor: {\n argNames: [\"accountName\"],\n name: \"actor(item=@v)?@v='[[accountName]]'\",\n requestType: utils_1.RequestType.GetReplace\n },\n actorFeed: {\n argNames: [\"accountName\"],\n name: \"actor(item=@v)/feed?@v='[[accountName]]'\",\n requestType: utils_1.RequestType.GetReplace\n },\n clearMyUnreadMentionCount: {\n name: \"my/mentionfeed/clearMyUnreadMentionCount\",\n requestType: utils_1.RequestType.Post\n },\n my: {\n name: \"my\",\n requestType: utils_1.RequestType.Get\n },\n myFeed: {\n name: \"my/feed\",\n requestType: utils_1.RequestType.Get\n },\n myLikes: {\n name: \"my/likes\",\n requestType: utils_1.RequestType.Get\n },\n myMentionFeed: {\n name: \"my/mentionfeed\",\n requestType: utils_1.RequestType.Get\n },\n myNews: {\n name: \"my/news\",\n requestType: utils_1.RequestType.Get\n },\n myTimelineFeed: {\n name: \"my/timelinefeed\",\n requestType: utils_1.RequestType.Get\n },\n myUnreadMentionCount: {\n name: \"my/unreadmentioncount\",\n requestType: utils_1.RequestType.Get\n }\n};\n/**\r\n * User Profile\r\n */\nexports.userprofile = {\n /*********************************************************************************************************************************/\n // Properties\n /*********************************************************************************************************************************/\n properties: [\"PersonalSite|site\"],\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n createPersonalSiteEnque: {\n argNames: [\"interactiveMode\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n },\n shareAllSocialData: {\n argNames: [\"makePublic\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n }\n};\n\n//# sourceURL=webpack:///./build/mapper/social.js?");
/***/ }),
/***/ "./build/mapper/sptypes.js":
/*!*********************************!*\
!*** ./build/mapper/sptypes.js ***!
\*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\r\n * Base Permission Types\r\n */\nexports.BasePermissionTypes = {\n EmptyMask: 0,\n ViewListItems: 1,\n AddListItems: 2,\n EditListItems: 3,\n DeleteListItems: 4,\n ApproveItems: 5,\n OpenItems: 6,\n ViewVersions: 7,\n DeleteVersions: 8,\n CancelCheckout: 9,\n ManagePersonalViews: 10,\n ManageLists: 12,\n ViewFormPages: 13,\n Open: 17,\n ViewPages: 18,\n AddAndCustomizePages: 19,\n ApplyThemeAndBorder: 20,\n ApplyStyleSheets: 21,\n ViewUsageData: 22,\n CreateSSCSite: 23,\n ManageSubwebs: 24,\n CreateGroups: 25,\n ManagePermissions: 26,\n BrowseDirectories: 27,\n BrowseUserInfo: 28,\n AddDelPrivateWebParts: 29,\n UpdatePersonalWebParts: 30,\n ManageWeb: 31,\n UseClientIntegration: 37,\n UseRemoteAPIs: 38,\n ManageAlerts: 39,\n CreateAlerts: 40,\n EditMyUserInfo: 41,\n EnumeratePermissions: 63,\n FullMask: 65\n};\n/**\r\n * Calendar Types\r\n */\nexports.CalendarTypes = {\n Gregorian: 1,\n JapaneseEmperorEra: 3,\n TaiwanCalendar: 4,\n KoreanTangunEra: 5,\n Hijri: 6,\n Thai: 7,\n HebrewLunar: 8,\n GregorianMiddleEastFrench: 9,\n GregorianArabic: 10,\n GregorianTransliteratedEnglish: 11,\n GregorianTransliteratedFrench: 12,\n KoreanandJapaneseLunar: 14,\n ChineseLunar: 15,\n SakaEra: 16\n};\n/**\r\n * Check Out Types\r\n */\nexports.CheckOutType = { Online: 0, Offline: 1, None: 2 };\n/**\r\n * Choice Format Types\r\n */\nexports.ChoiceFormatType = { Dropdown: 0, RadioButtons: 1 };\n/**\r\n * Client Template Utility\r\n */\nexports.ClientTemplatesUtility = {\n UserLookupDelimitString: \";#\",\n UserMultiValueDelimitString: \",#\"\n};\n/**\r\n * Control Modes\r\n */\nexports.ControlMode = {\n Invalid: 0,\n Display: 1,\n Edit: 2,\n New: 3,\n View: 4\n};\n/**\r\n * Date Format\r\n */\nexports.DateFormat = { DateOnly: 0, DateTime: 1 };\n/**\r\n * Draft Visibility Types\r\n */\nexports.DraftVisibilityType = { Reader: 0, Author: 1, Approver: 2 };\n/**\r\n * Event Receiver Synchronization Types\r\n */\nexports.EventReceiverSynchronizationType = { Synchronization: 1, Asynchronous: 2 };\n/**\r\n * Event Receiver Types\r\n */\nexports.EventReceiverType = {\n ItemAdding: 1,\n ItemUpdating: 2,\n ItemDeleting: 3,\n ItemCheckingIn: 4,\n ItemCheckingOut: 5,\n ItemUncheckingOut: 6,\n ItemAttachmentAdding: 7,\n ItemAttachmentDeleting: 8,\n ItemFileMoving: 9,\n ItemVersionDeleting: 11,\n FieldAdding: 101,\n FieldUpdating: 102,\n FieldDeleting: 103,\n ListAdding: 104,\n ListDeleting: 105,\n SiteDeleting: 201,\n WebDeleting: 202,\n WebMoving: 203,\n WebAdding: 204,\n GroupAdding: 301,\n GroupUpdating: 302,\n GroupDeleting: 303,\n GroupUserAdding: 304,\n GroupUserDeleting: 305,\n RoleDefinitionAdding: 306,\n RoleDefinitionUpdating: 307,\n RoleDefinitionDeleting: 308,\n RoleAssignmentAdding: 309,\n RoleAssignmentDeleting: 310,\n InheritanceBreaking: 311,\n InheritanceResetting: 312,\n WorkflowStarting: 501,\n ItemAdded: 10001,\n ItemUpdated: 10002,\n ItemDeleted: 10003,\n ItemCheckedIn: 10004,\n ItemCheckedOut: 10005,\n ItemUncheckedOut: 10006,\n ItemAttachmentAdded: 10007,\n ItemAttachmentDeleted: 10008,\n ItemFileMoved: 10009,\n ItemFileConverted: 10010,\n ItemVersionDeleted: 10011,\n FieldAdded: 10101,\n FieldUpdated: 10102,\n FieldDeleted: 10103,\n ListAdded: 10104,\n ListDeleted: 10105,\n SiteDeleted: 10201,\n WebDeleted: 10202,\n WebMoved: 10203,\n WebProvisioned: 10204,\n GroupAdded: 10301,\n GroupUpdated: 10302,\n GroupDeleted: 10303,\n GroupUserAdded: 10304,\n GroupUserDeleted: 10305,\n RoleDefinitionAdded: 10306,\n RoleDefinitionUpdated: 10307,\n RoleDefinitionDeleted: 10308,\n RoleAssignmentAdded: 10309,\n RoleAssignmentDeleted: 10310,\n InheritanceBroken: 10311,\n InheritanceReset: 10312,\n WorkflowStarted: 10501,\n WorkflowPostponed: 10502,\n WorkflowCompleted: 10503,\n EntityInstanceAdded: 10601,\n EntityInstanceUpdated: 10602,\n EntityInstanceDeleted: 10603,\n AppInstalled: 10701,\n AppUpgraded: 10702,\n AppUninstalling: 10703,\n EmailReceived: 20000,\n ContextEvent: 32766\n};\n/**\r\n * Field Note Types\r\n */\nexports.FieldNoteType = {\n /** Enhance Rich Text */\n EnhancedRichText: 0,\n /** Rich Text */\n RichText: 1,\n /** Text Only */\n TextOnly: 2\n};\n/**\r\n * Field Number Type\r\n */\nexports.FieldNumberType = {\n /** Decimal */\n Decimal: 0,\n /** Integer */\n Integer: 1,\n /** Percentage */\n Percentage: 2\n};\n/**\r\n * Field Result Types\r\n */\nexports.FieldResultType = {\n /** Boolean */\n Boolean: \"Boolean\",\n /** Currency */\n Currency: \"Currency\",\n /** Date Only */\n DateOnly: \"DateOnly\",\n /** Date & Time */\n DateTime: \"DateTime\",\n /** Number */\n Number: \"Number\",\n /** Text */\n Text: \"Text\"\n};\n/**\r\n * Field Types\r\n */\nexports.FieldType = {\n AllDayEvent: 29,\n Attachments: 19,\n Boolean: 8,\n Calculated: 17,\n Choice: 6,\n Computed: 12,\n ContentTypeId: 25,\n Counter: 5,\n CrossProjectLink: 22,\n Currency: 10,\n DateTime: 4,\n Error: 24,\n File: 18,\n Geolocation: 31,\n GridChoice: 16,\n Guid: 14,\n Integer: 1,\n Invalid: 0,\n Lookup: 7,\n MaxItems: 31,\n ModStat: 23,\n MultiChoice: 15,\n Note: 3,\n Number: 9,\n PageSeparator: 26,\n Recurrence: 21,\n Text: 2,\n ThreadIndex: 27,\n Threading: 13,\n URL: 11,\n User: 20,\n WorkflowEventType: 30,\n WorkflowStatus: 28\n};\n/**\r\n * Field User Selection Types\r\n */\nexports.FieldUserSelectionType = { PeopleOnly: 0, PeopleAndGroups: 1 };\n/**\r\n * File Template Types\r\n*/\nexports.FileTemplateType = { StandardPage: 0, WikiPage: 1, FormPage: 2 };\n/**\r\n * Friendly Date Format\r\n */\nexports.FriendlyDateFormat = {\n Unspecified: 0,\n Disabled: 1,\n Relative: 2\n};\n/**\r\n * List Template Types\r\n*/\nexports.ListTemplateType = {\n AccessRequest: 160,\n AdminTasks: 1200,\n Agenda: 201,\n AppDataCatalog: 125,\n Announcements: 104,\n CallTrack: 404,\n Categories: 303,\n Circulation: 405,\n Comments: 302,\n Contacts: 105,\n CustomGrid: 120,\n DataConnectionLibrary: 130,\n DataSources: 110,\n Decision: 204,\n DesignCatalog: 124,\n DeveloperSiteDraftApps: 1230,\n DiscussionBoard: 108,\n DocumentLibrary: 101,\n Events: 106,\n ExternalList: 600,\n Facility: 402,\n GanttTasks: 150,\n GenericList: 100,\n HealthReports: 1221,\n HealthRules: 1220,\n HelpLibrary: 151,\n Holidays: 421,\n HomePageLibrary: 212,\n IMEDic: 499,\n IssueTracking: 1100,\n Links: 103,\n ListTemplateCatalog: 114,\n MasterPageCatalog: 116,\n MaintenanceLogs: 175,\n MeetingObjective: 207,\n Meetings: 200,\n MeetingUser: 202,\n MySiteDocumentLibrary: 700,\n Posts: 301,\n NoCodePublic: 122,\n NoCodeWorkflows: 117,\n PictureLibrary: 109,\n SolutionCatalog: 121,\n Survey: 102,\n Tasks: 107,\n TasksWithTimelineAndHierarchy: 171,\n TextBox: 210,\n ThemeCatalog: 123,\n ThingsToBring: 211,\n Timecard: 420,\n UserInformation: 112,\n WebPageLibrary: 119,\n WebPartCatalog: 113,\n WebTemplateCatalog: 111,\n Whereabouts: 403,\n WorkflowHistory: 140,\n WorkflowProcess: 118,\n XMLForm: 115\n};\n/**\r\n * Locale LCID Types\r\n */\nexports.LocaleLCIDType = {\n Afrikaans: 1078,\n Albanian: 1052,\n ArabicAlgeria: 5121,\n ArabicBahrain: 15361,\n ArabicEgypt: 3073,\n ArabicIraq: 2049,\n ArabicJordan: 11265,\n ArabicLebanon: 12289,\n ArabicLibya: 4097,\n ArabicMorocco: 6145,\n ArabicOman: 8193,\n ArabicQatar: 16385,\n ArabicSaudiArabia: 1025,\n ArabicSyria: 10241,\n ArabicTunisia: 7169,\n ArabicUAE: 14337,\n ArabicYemen: 9217,\n Armenian: 1067,\n AzeriCyrillic: 2092,\n AzeriLatin: 1068,\n Basque: 1069,\n Belarusian: 1059,\n Bulgarian: 1026,\n Catalan: 1027,\n ChineseHongKongSAR: 3076,\n ChineseMacaoSAR: 5124,\n ChinesePRC: 2052,\n ChineseSingapore: 4100,\n ChineseTaiwan: 1028,\n CroatianCroatia: 1050,\n Czech: 1029,\n Danish: 1030,\n Divehi: 1125,\n DutchBelgium: 2067,\n DutchNetherlands: 1043,\n EnglishAustralia: 3081,\n EnglishBelize: 10249,\n EnglishCanada: 4105,\n EnglishCaribbean: 9225,\n EnglishIreland: 6153,\n EnglishJamaica: 8201,\n EnglishNewZealand: 5129,\n EnglishPhilippines: 13321,\n EnglishSouthAfrica: 7177,\n EnglishTrinidad: 11273,\n EnglishUnitedKingdom: 2057,\n EnglishUnitedStates: 1033,\n EnglishZimbabwe: 12297,\n Estonian: 1061,\n Faeroese: 1080,\n Finnish: 1035,\n FrenchBelgium: 2060,\n FrenchCanada: 3084,\n FrenchFrance: 1036,\n FrenchLuxembourg: 5132,\n FrenchMonaco: 6156,\n FrenchSwitzerland: 4108,\n Galician: 1110,\n Georgian: 1079,\n GermanAustria: 3079,\n GermanGermany: 1031,\n GermanLiechtenstein: 5127,\n GermanLuxembourg: 4103,\n GermanSwitzerland: 2055,\n Greek: 1032,\n Gujarati: 1095,\n HebrewIsrael: 1037,\n HindiIndia: 1081,\n Hungarian: 1038,\n Icelandic: 1039,\n Indonesian: 1057,\n ItalianItaly: 1040,\n ItalianSwitzerland: 2064,\n Japanese: 1041,\n Kannada: 1099,\n Kazakh: 1087,\n Konkani: 1111,\n Korean: 1042,\n KyrgyzCyrillic: 1088,\n Latvian: 1062,\n Lithuanian: 1063,\n MacedonianFYROM: 1071,\n Malay: 1086,\n MalayBruneiDarussalam: 2110,\n Marathi: 1102,\n MongolianCyrillic: 1104,\n NorwegianBokmal: 1044,\n NorwegianNynorsk: 2068,\n PersianIran: 1065,\n Polish: 1045,\n PortugueseBrazil: 1046,\n PortuguesePortugal: 2070,\n Punjabi: 1094,\n Romanian: 1048,\n Russian: 1049,\n Sanskrit: 1103,\n SerbianCyrillic: 3098,\n SerbianLatin: 2074,\n Slovak: 1051,\n Slovenian: 1060,\n SpanishArgentina: 11274,\n SpanishBolivia: 16394,\n SpanishChile: 13322,\n SpanishColombia: 9226,\n SpanishCostaRica: 5130,\n SpanishDominicanRepublic: 7178,\n SpanishEcuador: 12298,\n SpanishElSalvador: 17418,\n SpanishGuatemala: 4106,\n SpanishHonduras: 18442,\n SpanishMexico: 2058,\n SpanishNicaragua: 19466,\n SpanishPanama: 6154,\n SpanishParaguay: 15370,\n SpanishPeru: 10250,\n SpanishPuertoRico: 20490,\n SpanishSpain: 3082,\n SpanishUruguay: 14346,\n SpanishVenezuela: 8202,\n Swahili: 1089,\n Swedish: 1053,\n SwedishFinland: 2077,\n Syriac: 1114,\n Tamil: 1097,\n Tatar: 1092,\n Telugu: 1098,\n ThaiThailand: 1054,\n Turkish: 1055,\n Ukrainian: 1058,\n UrduPakistan: 1056,\n UzbekCyrillic: 2115,\n UzbekLatin: 1091,\n Vietnamese: 1066\n};\n/**\r\n * Page Types\r\n */\nexports.PageType = {\n DefaultView: 0,\n DialogView: 2,\n DisplayForm: 4,\n DisplayFormDialog: 5,\n EditForm: 6,\n EditFormDialog: 7,\n Invalid: -1,\n NewForm: 8,\n NewFormDialog: 9,\n NormalView: 1,\n Page_MAXITEMS: 11,\n SolutionForm: 10,\n View: 3\n};\n/**\r\n * Personal Site Capabilities\r\n */\nexports.PersonalSiteCapabilities = {\n Education: 16,\n Guest: 32,\n MyTasksDashboard: 8,\n None: 0,\n Profile: 1,\n Social: 2,\n Storage: 4\n};\n/**\r\n * Principal Sources\r\n */\nexports.PrincipalSources = {\n All: 15,\n MembershipProvider: 4,\n None: 0,\n RoleProvider: 8,\n UserInfoList: 1,\n Windows: 2\n};\n/**\r\n * Principal Types\r\n */\nexports.PrincipalTypes = {\n All: 15,\n DistributionList: 2,\n None: 0,\n SecurityGroup: 4,\n SharePointGroup: 8,\n User: 1\n};\n/**\r\n * Relationship Delete Behavior Types\r\n */\nexports.RelationshipDeleteBehaviorType = { None: 0, Cascade: 1, Restrict: 2 };\n/**\r\n * Render List Data Options\r\n */\nexports.RenderListDataOptions = {\n None: 0,\n ContextInfo: 1,\n ListData: 2,\n ListSchema: 4,\n MenuView: 8,\n ListContentType: 16,\n FileSystemItemId: 32,\n ClientFormSchema: 64,\n QuickLaunch: 128,\n Spotlight: 256,\n Visualization: 512,\n ViewMetadata: 1024,\n DisableAutoHyperlink: 2048,\n EnableMediaTAUrls: 4096,\n ParentInfo: 8192,\n PageContextInfo: 16384,\n ClientSideComponentManifest: 32768\n};\n/**\r\n * Reordering Rule Match Types\r\n */\nexports.ReorderingRuleMatchType = {\n ContentTypeIs: 5,\n FileExtensionMatches: 6,\n ManualCondition: 8,\n ResultContainsKeyword: 0,\n ResultHasTag: 7,\n TitleContainsKeyword: 1,\n TitleMatchesKeyword: 2,\n UrlExactlyMatches: 4,\n UrlStartsWith: 3\n};\n/**\r\n * Role Types\r\n */\nexports.RoleType = {\n Administrator: 5,\n Contributor: 3,\n Editor: 6,\n Guest: 1,\n None: 0,\n Reader: 2,\n WebDesigner: 4\n};\n/**\r\n * Status Pri Color\r\n */\nexports.StatusPriColor = {\n Blue: \"blue\",\n Green: \"green\",\n Red: \"red\",\n Yellow: \"yellow\"\n};\n/**\r\n * URL Format Types\r\n */\nexports.UrlFormatType = { Hyperlink: 0, Image: 1 };\n/**\r\n * URL Zones\r\n */\nexports.URLZones = { Default: 0, Intranet: 1, Internet: 2, Custom: 3, Extranet: 4 };\n/**\r\n * User Custom Action Registration Types\r\n */\nexports.UserCustomActionRegistrationType = { None: 0, List: 1, ContentType: 2, ProgId: 3, FileType: 4 };\n/**\r\n * View Types\r\n */\nexports.ViewType = {\n Calendar: 524288,\n Chart: 131072,\n Gantt: 67108864,\n Grid: 2048,\n Html: 1,\n Recurrence: 8193\n};\n/**\r\n * Web Template Types\r\n */\nexports.WebTemplateType = {\n AcademicLibrary: \"DOCMARKETPLACESITE\",\n App: \"APP\",\n AppCatalog: \"APPCATALOG\",\n BasicSearch: \"SRCHCENTERLITE\",\n Blog: \"BLOG\",\n BusinessIntelligenceCenter: \"BICenterSite\",\n CentralAdmin: \"CENTRALADMIN\",\n Community: \"COMMUNITY\",\n CommunityPortal: \"COMMUNITYPORTAL\",\n Dev: \"DEV\",\n DocumentCenter: \"BDR\",\n eDiscoveryCenter: \"EDISC\",\n EnterpriseSearch: \"SRCHCEN\",\n EnterpriseWiki: \"ENTERWIKI\",\n Global: \"GLOBAL\",\n GroupWorkSite: \"SGS\",\n Meetings: \"MEETINGS\",\n MeetingWorkspace: \"MPS\",\n PerformancePoint: \"PPMASite\",\n ProductCatalog: \"PRODUCTCATALOG\",\n Profiles: \"PROFILES\",\n ProjectSite: \"PROJECTSITE\",\n Publishing: \"BLANKINTERNET\",\n PublishingSite: \"CMSPUBLISHING\",\n RecordsCenter: \"OFFILE\",\n SharedServicesAdminSite: \"OSRV\",\n Site: \"STS\",\n TeamCollaborationSite: \"TEAM\",\n TenantAdmin: \"TENANTADMIN\",\n Wiki: \"WIKI\"\n};\n\n//# sourceURL=webpack:///./build/mapper/sptypes.js?");
/***/ }),
/***/ "./build/mapper/types/complexTypes.js":
/*!********************************************!*\
!*** ./build/mapper/types/complexTypes.js ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n\n//# sourceURL=webpack:///./build/mapper/types/complexTypes.js?");
/***/ }),
/***/ "./build/mapper/types/index.js":
/*!*************************************!*\
!*** ./build/mapper/types/index.js ***!
\*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar ComplexTypes = __webpack_require__(/*! ./complexTypes */ \"./build/mapper/types/complexTypes.js\");\nexports.ComplexTypes = ComplexTypes;\nvar Results = __webpack_require__(/*! ./results */ \"./build/mapper/types/results.js\");\nexports.Results = Results;\nvar SPTypes = __webpack_require__(/*! ./sptypes */ \"./build/mapper/types/sptypes.js\");\nexports.SPTypes = SPTypes;\n\n//# sourceURL=webpack:///./build/mapper/types/index.js?");
/***/ }),
/***/ "./build/mapper/types/results.js":
/*!***************************************!*\
!*** ./build/mapper/types/results.js ***!
\***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n\n//# sourceURL=webpack:///./build/mapper/types/results.js?");
/***/ }),
/***/ "./build/mapper/types/sptypes.js":
/*!***************************************!*\
!*** ./build/mapper/types/sptypes.js ***!
\***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n\n//# sourceURL=webpack:///./build/mapper/types/sptypes.js?");
/***/ }),
/***/ "./build/mapper/user.js":
/*!******************************!*\
!*** ./build/mapper/user.js ***!
\******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Group\r\n */\nexports.group = {\n /*********************************************************************************************************************************/\n // Properties\n /*********************************************************************************************************************************/\n properties: [\"Users|users|/getById([Name])|user\"],\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n },\n // Updates it's properties.\n update: {\n metadataType: \"SP.Group\",\n name: \"\",\n requestMethod: \"MERGE\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n }\n};\n/**\r\n * Site Groups\r\n */\nexports.sitegroups = {\n // Adds a group to the group collection.\n add: {\n metadataType: \"SP.Group\",\n name: \"\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Returns a group from the collection based on the member ID of the group.\n getById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"group\"\n },\n // Returns a cross-site group from the collection based on the name of the group.\n getByName: {\n argNames: [\"name\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"group\"\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n },\n // Removes the group with the specified member ID from the collection.\n removeById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n },\n // Removes the cross-site group with the specified name from the collection.\n removeByLoginName: {\n argNames: [\"name\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n }\n};\n/**\r\n * People Picker\r\n */\nexports.peoplepicker = {\n clientPeoplePickerResolveUser: {\n argNames: [\"queryParams\"],\n metadataType: \"SP.UI.ApplicationPages.ClientPeoplePickerQueryParameters\",\n name: \"SP.UI.ApplicationPages.ClientPeoplePickerWebServiceInterface.ClientPeoplePickerResolveUser\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n clientPeoplePickerSearchUser: {\n argNames: [\"queryParams\"],\n metadataType: \"SP.UI.ApplicationPages.ClientPeoplePickerQueryParameters\",\n name: \"SP.UI.ApplicationPages.ClientPeoplePickerWebServiceInterface.ClientPeoplePickerSearchUser\",\n replaceEndpointFl: true,\n requestType: utils_1.RequestType.PostWithArgsInBody\n }\n};\n/**\r\n * User\r\n */\nexports.user = {\n /*********************************************************************************************************************************/\n // Properties\n /*********************************************************************************************************************************/\n properties: [\"Groups|sitegroups|([Name])|group\"],\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n // Deletes the object\n delete: {\n requestType: utils_1.RequestType.Delete\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n },\n // Updates it's properties.\n update: {\n metadataType: \"SP.User\",\n name: \"\",\n requestMethod: \"MERGE\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n }\n};\n/**\r\n * Users\r\n */\nexports.users = {\n // Adds a user to the user collection.\n add: {\n metadataType: \"SP.User\",\n name: \"\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Gets the user with the specified email address.\n getByEmail: {\n argNames: [\"email\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"user\"\n },\n // Gets the user with the specified member identifier (ID).\n getById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"user\"\n },\n // Gets the user with the specified login name.\n getByLoginName: {\n argNames: [\"loginName\"],\n name: \"getByLoginName(@v)?@v='[[loginName]]'\",\n requestType: utils_1.RequestType.GetReplace,\n returnType: \"user\"\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n },\n // Removes the user with the specified ID.\n removeById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.PostWithArgsValueOnly\n },\n // Removes the user with the specified login name.\n removeByLoginName: {\n argNames: [\"loginName\"],\n name: \"removeByLoginName(@v)?@v='[[loginName]]'\",\n requestType: utils_1.RequestType.PostReplace\n }\n};\n\n//# sourceURL=webpack:///./build/mapper/user.js?");
/***/ }),
/***/ "./build/mapper/userCustomAction.js":
/*!******************************************!*\
!*** ./build/mapper/userCustomAction.js ***!
\******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * User Custom Action\r\n */\nexports.usercustomaction = {\n // Deletes the object\n delete: {\n requestType: utils_1.RequestType.Delete\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n/**\r\n * User Custom Actions\r\n */\nexports.usercustomactions = {\n // Adds a user custom action to the collection.\n add: {\n metadataType: \"SP.UserCustomAction\",\n name: \"\",\n requestType: utils_1.RequestType.PostWithArgsInBody\n },\n // Deletes all custom actions in the collection.\n clear: {\n requestType: utils_1.RequestType.Post\n },\n // Returns the custom action with the specified identifier.\n getById: {\n argNames: [\"id\"],\n requestType: utils_1.RequestType.GetWithArgsValueOnly,\n returnType: \"usercustomaction\"\n },\n // Queries the collection\n query: {\n argNames: [\"oData\"],\n requestType: utils_1.RequestType.OData\n }\n};\n\n//# sourceURL=webpack:///./build/mapper/userCustomAction.js?");
/***/ }),
/***/ "./build/rest.js":
/*!***********************!*\
!*** ./build/rest.js ***!
\***********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Helper = __webpack_require__(/*! ./helper */ \"./build/helper/index.js\");\nvar Lib = __webpack_require__(/*! ./lib */ \"./build/lib/index.js\");\nvar Mapper = __webpack_require__(/*! ./mapper */ \"./build/mapper/index.js\");\n/**\r\n * SharePoint REST Library\r\n */\nexports.$REST = {\n __ver: 4.29,\n AppContext: function AppContext(siteUrl) {\n return Lib.Site.getAppContext(siteUrl);\n },\n ContextInfo: Lib.ContextInfo,\n DefaultRequestToHostFl: false,\n Graph: Lib.Graph,\n Helper: {\n App: Helper.App,\n Dependencies: Helper.Dependencies,\n createDocSet: Helper.createDocSet,\n Executor: Helper.Executor,\n FieldSchemaXML: Helper.FieldSchemaXML,\n JSLink: Helper.JSLink,\n ListForm: Helper.ListForm,\n ListFormField: Helper.ListFormField,\n Loader: Helper.Loader,\n parse: Helper.parse,\n request: Helper.request,\n RibbonLink: Helper.RibbonLink,\n SP: Helper.SP,\n SPCfgFieldType: Helper.SPCfgFieldType,\n SPCfgType: Helper.SPCfgType,\n SPConfig: Helper.SPConfig,\n SuiteBarLink: Helper.SuiteBarLink,\n Taxonomy: Helper.Taxonomy,\n WebPart: Helper.WebPart\n },\n List: Lib.List,\n ListByEntityName: Lib.List.getByEntityName,\n ListDataAsStream: Lib.List.getDataAsStream,\n Navigation: Lib.Navigation,\n PeopleManager: Lib.PeopleManager,\n PeoplePicker: Lib.PeoplePicker,\n ProfileLoader: Lib.ProfileLoader,\n RemoteWeb: function RemoteWeb(requestUrl) {\n return Lib.Web.getRemoteWeb(requestUrl);\n },\n Search: Lib.Search,\n Site: Lib.Site,\n SiteExists: function SiteExists(url) {\n return Lib.Site.exists(url);\n },\n SiteUrl: function SiteUrl(id) {\n return Lib.Site.getUrlById(id);\n },\n SPTypes: Mapper.SPTypes,\n SocialFeed: Lib.SocialFeed,\n UserProfile: Lib.UserProfile,\n Utility: Lib.Utility,\n Web: Lib.Web\n};\n// See if the library doesn't exist, or is an older version\nvar global = Lib.ContextInfo.window.$REST;\nif (global == null || global.__ver == null || global.__ver < exports.$REST.__ver) {\n // Set the global variable\n Lib.ContextInfo.window.$REST = exports.$REST;\n // Ensure the SP lib exists\n if (Lib.ContextInfo.window.SP) {\n // Alert other scripts this library is loaded\n Lib.ContextInfo.window.SP.SOD.notifyScriptLoadedAndExecuteWaitingJobs(\"gd-sprest.js\");\n }\n}\n\n//# sourceURL=webpack:///./build/rest.js?");
/***/ }),
/***/ "./build/types.js":
/*!************************!*\
!*** ./build/types.js ***!
\************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar helper_1 = __webpack_require__(/*! ./helper */ \"./build/helper/index.js\");\nexports.Helper = helper_1.Types;\nvar mapper_1 = __webpack_require__(/*! ./mapper */ \"./build/mapper/index.js\");\nexports.SP = mapper_1.Types;\nvar utils_1 = __webpack_require__(/*! ./utils */ \"./build/utils/index.js\");\nexports.Util = utils_1.Types;\n\n//# sourceURL=webpack:///./build/types.js?");
/***/ }),
/***/ "./build/utils/base.js":
/*!*****************************!*\
!*** ./build/utils/base.js ***!
\*****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _1 = __webpack_require__(/*! . */ \"./build/utils/index.js\");\n/*********************************************************************************************************************************/\n// Base\n// This is the base class for all objects.\n/*********************************************************************************************************************************/\nvar Base = /** @class */function (_super) {\n __extends(Base, _super);\n /**\r\n * Constructor\r\n * @param targetInfo - The target information.\r\n */\n function Base(targetInfo) {\n var _this = _super.call(this) || this;\n // Default the properties\n _this.targetInfo = Object.create(targetInfo || {});\n _this.responses = [];\n _this.requestType = 0;\n _this.waitFlags = [];\n return _this;\n }\n // Method to wait for the requests to complete\n Base.prototype.done = function (resolve) {\n var _this = this;\n // Ensure the base is set\n this.base = this.base ? this.base : this;\n // Ensure the response index is set\n this.responseIndex = this.responseIndex >= 0 ? this.responseIndex : 0;\n // Wait for the responses to execute\n this.waitForRequestsToComplete(function () {\n var responses = _this.base.responses;\n // Clear the responses\n _this.base.responses = [];\n // Clear the wait flags\n _this.base.waitFlags = [];\n // Resolve the request\n resolve ? resolve.apply(_this, responses) : null;\n });\n };\n // Method to get the request information\n Base.prototype.getInfo = function () {\n return new _1.TargetInfo(this.targetInfo).requestInfo;\n };\n // Method to stringify the object\n Base.prototype.stringify = function () {\n // Stringify the object\n return JSON.stringify({\n response: this.response,\n status: this.status,\n targetInfo: {\n accessToken: this.targetInfo.accessToken,\n bufferFl: this.targetInfo.bufferFl,\n defaultToWebFl: this.targetInfo.defaultToWebFl,\n endpoint: this.targetInfo.endpoint,\n method: this.targetInfo.method,\n overrideDefaultRequestToHostFl: this.targetInfo.overrideDefaultRequestToHostFl,\n requestDigest: this.targetInfo.requestDigest,\n requestHeader: this.targetInfo.requestHeader,\n requestInfo: this.targetInfo.requestInfo,\n requestType: this.targetInfo.requestType,\n url: this.targetInfo.url\n }\n });\n };\n return Base;\n}(_1.BaseExecution);\nexports.Base = Base;\n\n//# sourceURL=webpack:///./build/utils/base.js?");
/***/ }),
/***/ "./build/utils/baseExecution.js":
/*!**************************************!*\
!*** ./build/utils/baseExecution.js ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ../lib */ \"./build/lib/index.js\");\nvar _1 = __webpack_require__(/*! . */ \"./build/utils/index.js\");\n/**\r\n * Base Execution\r\n */\nvar BaseExecution = /** @class */function (_super) {\n __extends(BaseExecution, _super);\n function BaseExecution() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // Method to execute this request as a batch request\n BaseExecution.prototype.batch = function (arg) {\n var callback = null;\n var appendFl = false;\n // See if the input is a boolean\n if (typeof arg === \"boolean\") {\n // Set the flag\n appendFl = arg;\n } else {\n // Set the callback\n callback = arg;\n }\n // Set the base\n this.base = this.base ? this.base : this;\n // See if we are appending this request\n if (appendFl && this.base.batchRequests) {\n // Append the request\n this.base.batchRequests[this.base.batchRequests.length - 1].push({\n targetInfo: new _1.TargetInfo(this.targetInfo)\n });\n } else {\n // Ensure the batch requests exist\n this.base.batchRequests = this.base.batchRequests || [];\n // Create the request\n this.base.batchRequests.push([{\n callback: callback,\n targetInfo: new _1.TargetInfo(this.targetInfo)\n }]);\n }\n // Return this object\n return this;\n };\n // Method to execute the request\n BaseExecution.prototype.execute = function () {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var reject = null;\n var resolve = null;\n var waitFl = false;\n // Parse the arguments\n for (var i = 0; i < args.length; i++) {\n var arg = args[i];\n // Check the type\n switch (typeof arg === \"undefined\" ? \"undefined\" : _typeof(arg)) {\n case \"boolean\":\n // Set the wait flag\n waitFl = arg;\n break;\n case \"function\":\n // See if the resolve method exists\n if (resolve) {\n // Set the reject method\n reject = arg;\n } else {\n // Set the resolve method\n resolve = arg;\n }\n break;\n }\n }\n // Set the base\n this.base = this.base ? this.base : this;\n // Set the response index\n this.responseIndex = this.base.responses.length;\n // Add this object to the responses\n this.base.responses.push(this);\n // See if we are waiting for the responses to complete\n if (waitFl) {\n // Wait for the responses to execute\n this.waitForRequestsToComplete(function () {\n // Execute this request\n _this.executeRequest(true, function (response, errorFl) {\n // See if there was an error\n if (errorFl) {\n // Reject the request\n reject ? reject(response) : null;\n }\n // Else, see if there is a resolve method\n else if (resolve) {\n // Set the base to this object, and clear requests\n // This will ensure requests from this object do not conflict w/ this request\n _this.base = _this;\n _this.base.responses = [];\n // Execute the callback and see if it returns a promise\n var returnVal = resolve(response);\n var waitFunc = returnVal ? returnVal.done || returnVal.then : null;\n if (waitFunc && typeof waitFunc === \"function\") {\n // Wait for the promise to complete\n waitFunc(function () {\n // Reset the base\n _this.base = _this.parent.base || _this.base;\n // Set the wait flag\n _this.base.waitFlags[_this.responseIndex] = true;\n });\n // Wait for the promise to complete\n return;\n }\n // Reset the base\n _this.base = _this.parent.base || _this.base;\n }\n // Set the wait flag\n _this.base.waitFlags[_this.responseIndex] = true;\n });\n }, this.responseIndex);\n } else {\n // Execute this request\n this.executeRequest(true, function (response, errorFl) {\n // See if there was an error\n if (errorFl) {\n // Reject the request\n reject ? reject(response) : null;\n } else {\n // Execute the resolve and see if it returns a promise\n var returnVal = resolve ? resolve(response) : null;\n if (returnVal && typeof returnVal.done === \"function\") {\n // Wait for the promise to complete\n returnVal.done(function () {\n // Set the wait flag\n _this.base.waitFlags[_this.responseIndex] = true;\n });\n } else {\n // Set the wait flag\n _this.base.waitFlags[_this.responseIndex] = true;\n }\n }\n });\n }\n // See if this is a query request\n if (this.targetInfo.requestType == _1.RequestType.OData) {\n // Return the parent\n return this.parent;\n }\n // Return this object\n return this;\n };\n // Method to execute the request synchronously\n BaseExecution.prototype.executeAndWait = function () {\n return this.executeRequest(false);\n };\n // Method to wait for the parent requests to complete\n BaseExecution.prototype.waitForRequestsToComplete = function (callback, requestIdx) {\n var _this = this;\n // Loop until the requests have completed\n var intervalId = lib_1.ContextInfo.window.setInterval(function () {\n var counter = 0;\n // Parse the responses to the requests\n for (var i = 0; i < _this.base.responses.length; i++) {\n var response = _this.base.responses[i];\n // See if we are waiting until a specified index\n if (requestIdx == counter++) {\n break;\n }\n // Return if the request hasn't completed\n if (response.xhr == null || !response.xhr.completedFl) {\n return;\n }\n // Ensure the wait flag is set for the previous request\n if (counter > 0 && _this.base.waitFlags[counter - 1] != true) {\n return;\n }\n }\n // Clear the interval\n lib_1.ContextInfo.window.clearInterval(intervalId);\n // Execute the callback\n callback();\n }, 10);\n };\n return BaseExecution;\n}(_1.BaseRequest);\nexports.BaseExecution = BaseExecution;\n\n//# sourceURL=webpack:///./build/utils/baseExecution.js?");
/***/ }),
/***/ "./build/utils/baseHelper.js":
/*!***********************************!*\
!*** ./build/utils/baseHelper.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ../lib */ \"./build/lib/index.js\");\nvar mapper_1 = __webpack_require__(/*! ../mapper */ \"./build/mapper/index.js\");\nvar _1 = __webpack_require__(/*! . */ \"./build/utils/index.js\");\n/**\r\n * Request Helper\r\n */\nvar BaseHelper = /** @class */function () {\n function BaseHelper() {}\n // Method to add the base references\n BaseHelper.prototype.addBaseReferences = function (base, obj) {\n // Add the base references\n obj[\"addMethods\"] = base.addMethods;\n obj[\"base\"] = base.base;\n obj[\"done\"] = base.done;\n obj[\"execute\"] = base.execute;\n obj[\"executeAndWait\"] = base.executeAndWait;\n obj[\"executeMethod\"] = base.executeMethod;\n obj[\"existsFl\"] = true;\n obj[\"getProperty\"] = base.getProperty;\n obj[\"parent\"] = base;\n obj[\"targetInfo\"] = base.targetInfo;\n obj[\"updateMetadataUri\"] = base.updateMetadataUri;\n obj[\"waitForRequestsToComplete\"] = base.waitForRequestsToComplete;\n };\n // Method to add the methods to base object\n BaseHelper.prototype.addMethods = function (base, data, graphType) {\n var obj = base;\n var isCollection = data.results && data.results.length > 0;\n // Determine the metadata\n var metadata = isCollection ? data.results[0].__metadata : data.__metadata;\n // Determine the object type\n var objType = metadata && metadata.type ? metadata.type : obj.targetInfo.endpoint;\n objType = objType.split('/');\n objType = objType[objType.length - 1];\n objType = objType.split('.');\n objType = objType[objType.length - 1].toLowerCase();\n objType += isCollection ? \"s\" : \"\";\n // See if this is a graph request\n if (/^graph/.test(objType)) {}\n // Do nothing\n\n // Else, see if the base is a field\n else if ((/^field/.test(objType) || /fields?$/.test(objType)) && objType != \"fieldlinks\" && objType != \"fields\") {\n // Update the type\n objType = \"field\" + (isCollection ? \"s\" : \"\");\n }\n // Else, see if the base is an item\n else if (/item$/.test(objType)) {\n // Update the type\n objType = \"listitem\";\n }\n // Else, see if the base is an item collection\n else if (/items$/.test(objType)) {\n // Update the type\n objType = \"items\";\n }\n // Else, see if this is a tenant app\n else if (/corporatecatalogappmetadata/.test(objType)) {\n // Update the type\n objType = \"tenantapp\";\n }\n // Else, see if this is a tenant app collection\n else if (/corporatecatalogappmetadatas/.test(objType)) {\n // Update the type\n objType = \"tenantapps\";\n }\n // Get the methods for the base object\n var methods = mapper_1.Mapper[objType];\n if (methods) {\n // Parse the methods\n for (var methodName in methods) {\n // Get the method information\n var methodInfo = methods[methodName] ? methods[methodName] : {};\n // See if the base is the \"Properties\" definition for the object\n if (methodName == \"properties\") {\n // Parse the properties\n for (var _i = 0, methodInfo_1 = methodInfo; _i < methodInfo_1.length; _i++) {\n var property = methodInfo_1[_i];\n var propInfo = property.split(\"|\");\n // Get the metadata type\n var propName = propInfo[0];\n var propType = propInfo.length > 1 ? propInfo[1] : null;\n var subPropName = propInfo.length > 2 ? propInfo[2] : null;\n var subPropType = propInfo.length > 3 ? propInfo[3] : null;\n // See if the property is null or is a collection\n if (obj[propName] == null || obj[propName].__deferred && obj[propName].__deferred.uri) {\n // See if the base property has a sub-property defined for it\n if (propInfo.length == 4) {\n // Update the ' char in the property name\n subPropName = subPropName.replace(/'/g, \"\\\\'\");\n // Add the property\n obj[propName] = new Function(\"name\", \"name = name ? '\" + propName + subPropName + \"'.replace(/\\\\[Name\\\\]/g, name.toString().replace(/\\'/g, \\\"''\\\")) : null;\" + \"return this.getProperty(name ? name : '\" + propName + \"', name ? '\" + subPropType + \"' : '\" + propType + \"');\");\n } else {\n // Add the property\n obj[propName] = new Function(\"return this.getProperty('\" + propName + \"', '\" + propType + \"');\");\n }\n }\n }\n // Continue the loop\n continue;\n }\n // See if the base object has a dynamic metadata type\n if (typeof methodInfo.metadataType === \"function\") {\n // Clone the object properties\n methodInfo = JSON.parse(JSON.stringify(methodInfo));\n // Set the metadata type\n methodInfo.metadataType = methods[methodName].metadataType(obj);\n }\n // Add the method to the object\n obj[methodName] = new Function(\"return this.executeMethod('\" + methodName + \"', \" + JSON.stringify(methodInfo) + \", arguments);\");\n }\n }\n };\n // Method to add properties to the base object\n BaseHelper.prototype.addProperties = function (base, data) {\n // Parse the data properties\n for (var key in data) {\n var value = data[key];\n // Skip properties\n if (key == \"__metadata\" || key == \"results\") {\n continue;\n }\n // See if the base is a collection property\n if (value && value.__deferred && value.__deferred.uri) {\n // Generate a method for the base property\n base[\"get_\" + key] = base[\"get_\" + key] ? base[\"get_\" + key] : new Function(\"return this.getCollection('\" + key + \"', arguments);\");\n } else {\n // Set the property, based on the property name\n switch (key) {\n case \"ClientPeoplePickerResolveUser\":\n case \"ClientPeoplePickerSearchUser\":\n base[key] = JSON.parse(value);\n break;\n default:\n // Append the property to the base object\n base[key] = value;\n break;\n }\n // See if the base is a collection\n if (base[key] && base[key].results) {\n // Ensure the collection is an object\n if (base[key].results.length == 0 || _typeof(base[key].results[0]) === \"object\") {\n // Create the base property as a new request\n var objCollection = new _1.Base(base.targetInfo);\n objCollection[\"results\"] = base[key].results;\n // See no results exist\n if (objCollection[\"results\"].length == 0) {\n // Set the metadata type to the key\n objCollection[\"__metadata\"] = { type: key };\n }\n // Update the endpoint for the base request to point to the base property\n objCollection.targetInfo.endpoint = (objCollection.targetInfo.endpoint.split(\"?\")[0] + \"/\" + key).replace(/\\//g, \"/\");\n // Add the methods\n base.addMethods(objCollection, objCollection);\n // Update the data collection\n base.updateDataCollection(base, objCollection[\"results\"]);\n // Update the property\n base[key] = objCollection;\n }\n }\n }\n }\n };\n // Method to update a collection object\n BaseHelper.prototype.updateDataCollection = function (obj, results) {\n // Ensure the base is a collection\n if (results) {\n // Save the results\n obj[\"results\"] = obj[\"results\"] ? obj[\"results\"].concat(results) : results;\n // See if only one object exists\n if (obj[\"results\"].length > 0) {\n var results_2 = obj[\"results\"];\n // Parse the results\n for (var _i = 0, results_1 = results_2; _i < results_1.length; _i++) {\n var result = results_1[_i];\n // Add the base references\n this.addBaseReferences(obj, result);\n // Update the metadata\n this.updateMetadata(obj, result);\n // Add the methods\n this.addMethods(result, result);\n }\n }\n }\n };\n // Method to convert the input arguments into an object\n BaseHelper.prototype.updateDataObject = function (isBatchRequest) {\n // Ensure the request was successful\n if (this.status >= 200 && this.status < 300) {\n // Return if we are expecting a buffer\n if (this.requestType == _1.RequestType.GetBuffer) {\n return;\n }\n // Parse the responses\n var batchIdx = 0;\n var batchRequestIdx = 0;\n var responses = isBatchRequest ? this.response.split(\"\\n\") : [this.response];\n for (var i = 0; i < responses.length; i++) {\n var data = null;\n // Try to convert the response\n var response = responses[i];\n response = response === \"\" && !isBatchRequest ? \"{}\" : response;\n try {\n data = isBatchRequest && response.indexOf(\"<?xml\") == 0 ? response : JSON.parse(response);\n } catch (ex) {\n continue;\n }\n // Set the object based on the request type\n var obj = isBatchRequest ? Object.create(this) : this;\n // Set the exists flag\n obj[\"existsFl\"] = typeof obj[\"Exists\"] === \"boolean\" ? obj[\"Exists\"] : data.error == null;\n // See if the data properties exists\n if (data.d) {\n // Save a reference to it\n obj[\"d\"] = data.d;\n // Update the metadata\n this.updateMetadata(obj, data.d);\n // Update the base object's properties\n this.addProperties(obj, data.d);\n // Add the methods\n this.addMethods(obj, data.d, data[\"@odata.context\"]);\n // Update the data collection\n this.updateDataCollection(obj, data.d.results);\n } else {\n // Update the base object's properties\n this.addProperties(obj, data);\n }\n // See if the batch request exists\n if (isBatchRequest) {\n // Get the batch request\n var batchRequest = this.base.batchRequests[batchIdx][batchRequestIdx++];\n if (batchRequest == null) {\n // Update the batch indexes\n batchIdx++;\n batchRequestIdx = 0;\n // Update the batch request\n batchRequest = this.base.batchRequests[batchIdx][batchRequestIdx++];\n }\n // Ensure the batch request exists\n if (batchRequest) {\n // Set the response object\n batchRequest.response = typeof data === \"string\" ? data : obj;\n // Execute the callback if it exists\n batchRequest.callback ? batchRequest.callback(batchRequest.response) : null;\n }\n }\n }\n // Clear the batch requests\n if (isBatchRequest) {\n this.base.batchRequests = null;\n }\n }\n };\n // Method to update the metadata\n BaseHelper.prototype.updateMetadata = function (base, data) {\n // Ensure the base is the app web\n if (!lib_1.ContextInfo.isAppWeb) {\n return;\n }\n // Get the url information\n var hostUrl = lib_1.ContextInfo.webAbsoluteUrl.toLowerCase();\n var requestUrl = data && data.__metadata && data.__metadata.uri ? data.__metadata.uri.toLowerCase() : null;\n var targetUrl = base.targetInfo && base.targetInfo.url ? base.targetInfo.url.toLowerCase() : null;\n // Ensure the urls exist\n if (hostUrl == null || requestUrl == null || targetUrl == null) {\n return;\n }\n // See if we need to make an update\n if (targetUrl.indexOf(hostUrl) == 0) {\n return;\n }\n // Update the metadata uri\n data.__metadata.uri = requestUrl.replace(hostUrl, targetUrl);\n };\n return BaseHelper;\n}();\nexports.BaseHelper = BaseHelper;\n\n//# sourceURL=webpack:///./build/utils/baseHelper.js?");
/***/ }),
/***/ "./build/utils/baseRequest.js":
/*!************************************!*\
!*** ./build/utils/baseRequest.js ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar __extends = undefined && undefined.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n return _extendStatics(d, b);\n };\n return function (d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _1 = __webpack_require__(/*! . */ \"./build/utils/index.js\");\n/**\r\n * Base Request\r\n */\nvar BaseRequest = /** @class */function (_super) {\n __extends(BaseRequest, _super);\n function BaseRequest() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // Method to execute a method\n BaseRequest.prototype.executeMethod = function (methodName, methodConfig, args) {\n var targetInfo = null;\n // See if the metadata is defined for the base object\n var metadata = this[\"d\"] ? this[\"d\"].__metadata : this[\"__metadata\"];\n if (metadata && metadata.uri) {\n // Create the target information and use the url defined for the base object\n targetInfo = {\n url: metadata.uri\n };\n // See if we are inheriting the metadata type\n if (methodConfig.inheritMetadataType && metadata.type) {\n // Copy the metadata type\n methodConfig.metadataType = metadata.type;\n }\n // Update the metadata uri\n this.updateMetadataUri(metadata, targetInfo);\n } else {\n // Copy the target information\n targetInfo = Object.create(this.targetInfo);\n }\n // Get the method information\n var methodInfo = new _1.MethodInfo(methodName, methodConfig, args);\n // Update the target information\n targetInfo.bufferFl = methodConfig.requestType == _1.RequestType.GetBuffer;\n targetInfo.data = methodInfo.body;\n targetInfo.defaultToWebFl = typeof targetInfo.defaultToWebFl === \"undefined\" && this.base ? this.base.targetInfo.defaultToWebFl : targetInfo.defaultToWebFl;\n targetInfo.method = methodInfo.requestMethod;\n targetInfo.requestType = methodConfig.requestType;\n // See if we are replacing the endpoint\n if (methodInfo.replaceEndpointFl) {\n // Replace the endpoint\n targetInfo.endpoint = methodInfo.url;\n }\n // Else, ensure the method url exists\n else if (methodInfo.url && methodInfo.url.length > 0) {\n // Ensure the end point exists\n targetInfo.endpoint = targetInfo.endpoint ? targetInfo.endpoint : \"\";\n // See if the endpoint exists, and the method is not a query string\n if (targetInfo.endpoint && methodInfo.url && methodInfo.url.indexOf(\"?\") != 0) {\n // Add a \"/\" separator to the url\n targetInfo.endpoint += \"/\";\n }\n // Append the url\n targetInfo.endpoint += methodInfo.url;\n }\n // Create a new object\n var obj = new _1.Base(targetInfo);\n // Set the properties\n obj.base = this.base ? this.base : this;\n obj.getAllItemsFl = methodInfo.getAllItemsFl;\n obj.parent = this;\n obj.requestType = methodConfig.requestType;\n // Ensure the return type exists\n if (methodConfig.returnType) {\n // Add the methods\n this.addMethods(obj, { __metadata: { type: methodConfig.returnType } });\n }\n // Return the object\n return obj;\n };\n // Method to execute the request\n BaseRequest.prototype.executeRequest = function (asyncFl, callback) {\n var _this = this;\n var isBatchRequest = this.base && this.base.batchRequests && this.base.batchRequests.length > 0;\n var targetInfo = isBatchRequest ? _1.Batch.getTargetInfo(this.base.batchRequests) : new _1.TargetInfo(this.targetInfo);\n // See if this is an asynchronous request\n if (asyncFl) {\n // See if the not a batch request, and it already exists\n if (this.xhr && !isBatchRequest) {\n // Execute the callback\n callback ? callback(this, false) : null;\n } else {\n // Create the request\n this.xhr = new _1.XHRRequest(asyncFl, targetInfo, function () {\n // Update the response and status\n _this.response = _this.xhr.response;\n _this.status = _this.xhr.status;\n var errorFl = !(_this.status >= 200 && _this.status < 300);\n // See if we are returning a file buffer\n if (_this.requestType == _1.RequestType.GetBuffer) {\n // Execute the callback\n callback ? callback(_this.response, errorFl) : null;\n } else {\n // Update the data object\n _this.updateDataObject(isBatchRequest);\n // Validate the data collection\n isBatchRequest ? null : _this.validateDataCollectionResults().then(function () {\n // Execute the callback\n callback ? callback(_this, errorFl) : null;\n });\n }\n });\n }\n }\n // Else, see if we already executed this request\n else if (this.xhr) {\n return this;\n }\n // Else, we haven't executed this request\n else {\n // Create the request\n this.xhr = new _1.XHRRequest(asyncFl, targetInfo);\n // Update the response and status\n this.response = this.xhr.response;\n this.status = this.xhr.status;\n // See if we are returning a file buffer\n if (this.requestType == _1.RequestType.GetBuffer) {\n // Return the response\n return this.response;\n }\n // Update the base object\n this.updateDataObject(isBatchRequest);\n // See if the base is a collection and has more results\n if (this[\"d\"] && this[\"d\"].__next) {\n // Add the \"next\" method to get the next set of results\n this[\"next\"] = new Function(\"return this.getNextSetOfResults();\");\n }\n // Return the base object\n return this;\n }\n };\n // Method to return a collection\n BaseRequest.prototype.getCollection = function (method, args) {\n // Copy the target information\n var targetInfo = Object.create(this.targetInfo);\n // Clear the target information properties from any previous requests\n targetInfo.data = null;\n targetInfo.method = null;\n // See if the metadata is defined for the base object\n var metadata = this[\"d\"] ? this[\"d\"].__metadata : this[\"__metadata\"];\n if (metadata && metadata.uri) {\n // Update the url of the target information\n targetInfo.url = metadata.uri;\n // Update the metadata uri\n this.updateMetadataUri(metadata, targetInfo);\n // Set the endpoint\n targetInfo.endpoint = method;\n } else {\n // Append the method to the endpoint\n targetInfo.endpoint += \"/\" + method;\n }\n // Update the callback\n targetInfo.callback = args && typeof args[0] === \"function\" ? args[0] : null;\n // Create a new object\n var obj = new _1.Base(targetInfo);\n // Set the properties\n obj.base = this.base ? this.base : this;\n obj.parent = this;\n // Return the object\n return obj;\n };\n // Method to get the next set of results\n BaseRequest.prototype.getNextSetOfResults = function () {\n // Create the target information to query the next set of results\n var targetInfo = Object.create(this.targetInfo);\n targetInfo.endpoint = \"\";\n targetInfo.url = this[\"d\"].__next;\n // Create a new object\n var obj = new _1.Base(targetInfo);\n // Set the properties\n obj.base = this.base ? this.base : this;\n obj.parent = this;\n // Return the object\n return obj;\n };\n // Method to return a property of the base object\n BaseRequest.prototype.getProperty = function (propertyName, requestType) {\n // Copy the target information\n var targetInfo = Object.create(this.targetInfo);\n // See if this is a graph request\n if (requestType.startsWith(\"graph\")) {\n // Default the request type\n targetInfo.requestType = _1.RequestType.GraphGet;\n }\n // Clear the target information properties from any previous requests\n targetInfo.data = null;\n targetInfo.method = null;\n // See if the metadata is defined for the base object\n var metadata = this[\"d\"] ? this[\"d\"].__metadata : this[\"__metadata\"];\n if (metadata && metadata.uri) {\n // Update the url of the target information\n targetInfo.url = metadata.uri;\n // Update the metadata uri\n this.updateMetadataUri(metadata, targetInfo);\n // Set the endpoint\n targetInfo.endpoint = propertyName;\n } else {\n // Append the property name to the endpoint\n targetInfo.endpoint += \"/\" + propertyName;\n }\n // Create a new object\n var obj = new _1.Base(targetInfo);\n // Set the properties\n obj.base = this.base ? this.base : this;\n obj.parent = this;\n // Add the methods\n requestType ? this.addMethods(obj, { __metadata: { type: requestType } }) : null;\n // Return the object\n return obj;\n };\n // Method to update the metadata uri\n BaseRequest.prototype.updateMetadataUri = function (metadata, targetInfo) {\n // See if this is a field\n if (/^SP.Field/.test(metadata.type) || /^SP\\..*Field$/.test(metadata.type)) {\n // Fix the url reference\n targetInfo.url = targetInfo.url.replace(/AvailableFields/, \"fields\");\n }\n // Else, see if this is an event receiver\n else if (/SP.EventReceiverDefinition/.test(metadata.type)) {\n // Fix the url reference\n targetInfo.url = targetInfo.url.replace(/\\/EventReceiver\\//, \"/EventReceivers/\");\n }\n // Else, see if this is a tenant app\n else if (/Microsoft.SharePoint.Marketplace.CorporateCuratedGallery.CorporateCatalogAppMetadata/.test(targetInfo.url)) {\n // Fix the url reference\n targetInfo.url = targetInfo.url.split(\"Microsoft.SharePoint.Marketplace.CorporateCuratedGallery.CorporateCatalogAppMetadata\")[0] + \"web/tenantappcatalog/availableapps/getbyid('\" + this[\"ID\"] + \"')\";\n }\n };\n // Method to validate the data collection results\n BaseRequest.prototype.validateDataCollectionResults = function () {\n var _this = this;\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Method to validate the request\n var request = function request(xhr, resolve) {\n // Validate the response\n if (xhr && xhr.status < 400 && typeof xhr.response === \"string\" && xhr.response.length > 0) {\n // Convert the response and ensure the data property exists\n var data = JSON.parse(xhr.response);\n // Set the next item flag\n _this.nextFl = data.d && data.d.__next;\n // See if there are more items to get\n if (_this.nextFl) {\n // See if we are getting all items in the base request\n if (_this.getAllItemsFl) {\n // Create the target information to query the next set of results\n var targetInfo = Object.create(_this.targetInfo);\n targetInfo.endpoint = \"\";\n targetInfo.url = data.d.__next;\n // Create a new object\n new _1.XHRRequest(true, new _1.TargetInfo(targetInfo), function (xhr) {\n // Convert the response and ensure the data property exists\n var data = JSON.parse(xhr.response);\n if (data.d) {\n // Update the data collection\n _this.updateDataCollection(_this, data.d.results);\n // Append the raw data results\n _this[\"d\"].results = _this[\"d\"].results.concat(data.d.results);\n // Validate the data collection\n request(xhr, resolve);\n } else {\n // Resolve the promise\n resolve();\n }\n });\n } else {\n // Add a method to get the next set of results\n _this[\"next\"] = new Function(\"return this.getNextSetOfResults();\");\n // Resolve the promise\n resolve();\n }\n } else {\n // Resolve the promise\n resolve();\n }\n } else {\n // Resolve the promise\n resolve();\n }\n };\n // Execute the request\n request(_this.xhr, resolve);\n });\n };\n return BaseRequest;\n}(_1.BaseHelper);\nexports.BaseRequest = BaseRequest;\n\n//# sourceURL=webpack:///./build/utils/baseRequest.js?");
/***/ }),
/***/ "./build/utils/batch.js":
/*!******************************!*\
!*** ./build/utils/batch.js ***!
\******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ../lib */ \"./build/lib/index.js\");\nvar _1 = __webpack_require__(/*! . */ \"./build/utils/index.js\");\n/**\r\n * Batch Requests\r\n */\nvar Batch = /** @class */function () {\n function Batch() {}\n /**\r\n * Methods\r\n */\n // Method to generate a batch request\n Batch.getTargetInfo = function (requests) {\n var batchId = \"batch_\" + lib_1.ContextInfo.generateGUID();\n var batchRequests = [];\n // Parse the requests\n for (var i = 0; i < requests.length; i++) {\n // Create the batch request\n batchRequests.push(this.createBatch(batchId, requests[i]));\n }\n // End the batch request\n batchRequests.push(\"--\" + batchId + \"--\");\n // Return the target info\n return new _1.TargetInfo({\n endpoint: \"$batch\",\n method: \"POST\",\n data: batchRequests.join(\"\\r\\n\"),\n requestHeader: {\n \"Content-Type\": 'multipart/mixed; boundary=\"' + batchId + '\"'\n }\n });\n };\n // Method to generate a batch request\n Batch.createBatch = function (batchId, requests) {\n // Create the batch request\n var batch = [\"--\" + batchId];\n // Determine if the batch requires a change set\n var requiresChangeset = requests[0] && requests[0].targetInfo.requestMethod != \"GET\";\n if (requiresChangeset) {\n var changesets = [];\n var changesetId = \"changeset_\" + lib_1.ContextInfo.generateGUID();\n // Parse the requests\n for (var i = 0; i < requests.length; i++) {\n var request = [];\n var targetInfo = requests[i].targetInfo;\n // Create a change set\n request.push(\"--\" + changesetId);\n request.push(\"Content-Type: application/http\");\n request.push(\"Content-Transfer-Encoding: binary\");\n request.push(\"\");\n request.push(\"POST \" + targetInfo.requestUrl + \" HTTP/1.1\");\n request.push(\"Content-Type: application/json;odata=verbose\");\n request.push(\"\");\n targetInfo.requestData ? request.push(targetInfo.requestData) : null;\n request.push(\"\");\n // Add the request to the change set\n changesets.push(request.join(\"\\r\\n\"));\n }\n // End the change set\n changesets.push(\"--\" + changesetId + \"--\");\n // Generate the change set\n var changeset = changesets.join(\"\\r\\n\");\n // Add the change set information to the batch\n batch.push(\"Content-Type: multipart/mixed; boundary=\" + changesetId);\n batch.push(\"Content-Length: \" + changeset.length);\n batch.push(\"Content-Transfer-Encoding: binary\");\n batch.push(\"\");\n batch.push(changeset);\n batch.push(\"\");\n }\n // Else, ensure a request exists\n else if (requests[0]) {\n var targetInfo = requests[0].targetInfo;\n // Add the request to the batch\n batch.push(\"Content-Type: application/http\");\n batch.push(\"Content-Transfer-Encoding: binary\");\n batch.push(\"\");\n batch.push(\"GET \" + targetInfo.requestUrl + \" HTTP/1.1\");\n batch.push(\"Accept: application/json;odata=verbose\");\n batch.push(\"\");\n targetInfo.requestData ? batch.push(targetInfo.requestData) : null;\n batch.push(\"\");\n }\n // Return the batch request\n return batch.join(\"\\r\\n\");\n };\n return Batch;\n}();\nexports.Batch = Batch;\n\n//# sourceURL=webpack:///./build/utils/batch.js?");
/***/ }),
/***/ "./build/utils/index.js":
/*!******************************!*\
!*** ./build/utils/index.js ***!
\******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nfunction __export(m) {\n for (var p in m) {\n if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(__webpack_require__(/*! ./requestType */ \"./build/utils/requestType.js\"));\n__export(__webpack_require__(/*! ./baseHelper */ \"./build/utils/baseHelper.js\"));\n__export(__webpack_require__(/*! ./baseRequest */ \"./build/utils/baseRequest.js\"));\n__export(__webpack_require__(/*! ./baseExecution */ \"./build/utils/baseExecution.js\"));\n__export(__webpack_require__(/*! ./base */ \"./build/utils/base.js\"));\n__export(__webpack_require__(/*! ./batch */ \"./build/utils/batch.js\"));\n__export(__webpack_require__(/*! ./methodInfo */ \"./build/utils/methodInfo.js\"));\n__export(__webpack_require__(/*! ./oData */ \"./build/utils/oData.js\"));\n__export(__webpack_require__(/*! ./targetInfo */ \"./build/utils/targetInfo.js\"));\n__export(__webpack_require__(/*! ./xhrRequest */ \"./build/utils/xhrRequest.js\"));\nvar Types = __webpack_require__(/*! ./types */ \"./build/utils/types/index.js\");\nexports.Types = Types;\n\n//# sourceURL=webpack:///./build/utils/index.js?");
/***/ }),
/***/ "./build/utils/methodInfo.js":
/*!***********************************!*\
!*** ./build/utils/methodInfo.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar _1 = __webpack_require__(/*! . */ \"./build/utils/index.js\");\n/*********************************************************************************************************************************/\n// Method Information\n// This class will create the method information for the request.\n/*********************************************************************************************************************************/\nvar MethodInfo = /** @class */function () {\n /*********************************************************************************************************************************/\n // Constructor\n /*********************************************************************************************************************************/\n function MethodInfo(methodName, methodInfo, args) {\n // Default the properties\n this.methodInfo = methodInfo;\n this.methodInfo.argValues = args;\n this.methodInfo.name = typeof this.methodInfo.name === \"string\" ? this.methodInfo.name : methodName;\n // Generate the parameters\n this.generateParams();\n // Generate the url\n this.methodUrl = this.generateUrl();\n }\n Object.defineProperty(MethodInfo.prototype, \"body\", {\n /*********************************************************************************************************************************/\n // Public Properties\n /*********************************************************************************************************************************/\n // The data passed through the body of the request\n get: function get() {\n return this.methodData;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MethodInfo.prototype, \"getAllItemsFl\", {\n // Flag to determine if we are getting all items\n get: function get() {\n return this.methodInfo.getAllItemsFl;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MethodInfo.prototype, \"replaceEndpointFl\", {\n // Flag to determine if this method replaces the endpoint\n get: function get() {\n return this.methodInfo.replaceEndpointFl ? true : false;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MethodInfo.prototype, \"requestMethod\", {\n // The request method\n get: function get() {\n // Return the request method if it exists\n if (typeof this.methodInfo.requestMethod === \"string\") {\n return this.methodInfo.requestMethod;\n }\n // Determine the request method, based on the request type\n switch (this.methodInfo.requestType) {\n case _1.RequestType.Delete:\n case _1.RequestType.Post:\n case _1.RequestType.PostWithArgs:\n case _1.RequestType.PostWithArgsInBody:\n case _1.RequestType.PostWithArgsInQS:\n case _1.RequestType.PostWithArgsInQSAsVar:\n case _1.RequestType.PostWithArgsValueOnly:\n case _1.RequestType.PostReplace:\n return \"POST\";\n default:\n return \"GET\";\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MethodInfo.prototype, \"url\", {\n // The url of the method and parameters\n get: function get() {\n return this.methodUrl;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MethodInfo.prototype, \"passDataInBody\", {\n /*********************************************************************************************************************************/\n // Private Variables\n /*********************************************************************************************************************************/\n get: function get() {\n return this.methodInfo.requestType == _1.RequestType.GetWithArgsInBody || this.methodInfo.requestType == _1.RequestType.PostWithArgsInBody;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MethodInfo.prototype, \"passDataInQS\", {\n get: function get() {\n return this.methodInfo.requestType == _1.RequestType.GetWithArgsInQS || this.methodInfo.requestType == _1.RequestType.PostWithArgsInQS;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MethodInfo.prototype, \"passDataInQSAsVar\", {\n get: function get() {\n return this.methodInfo.requestType == _1.RequestType.GetWithArgsInQSAsVar || this.methodInfo.requestType == _1.RequestType.PostWithArgsInQSAsVar;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MethodInfo.prototype, \"isTemplate\", {\n get: function get() {\n return this.methodInfo.data ? true : false;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MethodInfo.prototype, \"replace\", {\n get: function get() {\n return this.methodInfo.requestType == _1.RequestType.GetReplace || this.methodInfo.requestType == _1.RequestType.PostReplace;\n },\n enumerable: true,\n configurable: true\n });\n /*********************************************************************************************************************************/\n // Private Methods\n /*********************************************************************************************************************************/\n // Method to generate the method input parameters\n MethodInfo.prototype.generateParams = function () {\n var params = {};\n // Ensure values exist\n if (this.methodInfo.argValues == null) {\n return;\n }\n // See if the argument names exist\n if (this.methodInfo.argNames) {\n // Parse the argument names\n for (var i = 0; i < this.methodInfo.argNames.length && i < this.methodInfo.argValues.length; i++) {\n var name_1 = this.methodInfo.argNames[i];\n var value = this.methodInfo.argValues[i];\n // Copy the parameter value\n switch (_typeof(this.methodInfo.argValues[i])) {\n case \"boolean\":\n params[name_1] = this.methodInfo.argValues[i] ? \"true\" : \"false\";\n break;\n case \"number\":\n params[name_1] = this.methodInfo.argValues[i];\n break;\n //case \"string\":\n //params[name] = this.isTemplate || this.replace ? value : \"'\" + value + \"'\";\n //break;\n default:\n params[name_1] = value;\n break;\n }\n }\n }\n // See if the method has parameters\n var isEmpty = true;\n for (var k in params) {\n isEmpty = false;\n break;\n }\n this.methodParams = isEmpty ? null : params;\n // See if method parameters exist\n if (this.methodParams) {\n // See if a template is defined for the method data\n if (this.isTemplate) {\n // Ensure the object is a string\n if (typeof this.methodInfo.data !== \"string\") {\n // Stringify the object\n this.methodInfo.data = JSON.stringify(this.methodInfo.data);\n }\n // Parse the arguments\n for (var key in this.methodParams) {\n // Replace the argument in the template\n this.methodInfo.data = this.methodInfo.data.replace(\"[[\" + key + \"]]\", this.methodParams[key].replace(/\"/g, '\\\\\"').replace(/\\n/g, \"\"));\n }\n // Set the method data\n this.methodData = JSON.parse(this.methodInfo.data);\n }\n }\n // See if argument values exist\n if (this.methodInfo.argValues && this.methodInfo.argValues.length > 0) {\n // See if argument names exist\n if (this.methodInfo.argNames == null) {\n // Set the method data to first argument value\n this.methodData = this.methodInfo.argValues[0];\n }\n // Else, see if we are passing arguments outside of the parameters\n else if (this.methodInfo.argValues.length > this.methodInfo.argNames.length) {\n // Set the method data to the next available argument value\n this.methodData = this.methodInfo.argValues[this.methodInfo.argNames.length];\n }\n }\n // See if the metadata type exists\n if (this.methodInfo.metadataType) {\n // See if parameters exist\n if (this.methodInfo.argNames) {\n // Append the metadata to the first parameter, if it doesn't exist\n (this.methodData || this.methodParams)[this.methodInfo.argNames[0]][\"__metadata\"] = (this.methodData || this.methodParams)[this.methodInfo.argNames[0]][\"__metadata\"] || { \"type\": this.methodInfo.metadataType };\n } else {\n // Append the metadata to the parameters, if it doesn't exist\n (this.methodData || this.methodParams)[\"__metadata\"] = (this.methodData || this.methodParams)[\"__metadata\"] || { \"type\": this.methodInfo.metadataType };\n }\n }\n };\n // Method to generate the method and parameters as a url\n MethodInfo.prototype.generateUrl = function () {\n var url = this.methodInfo.name;\n // See if we are deleting the object\n if (this.methodInfo.requestType == _1.RequestType.Delete) {\n // Update the url\n url = \"deleteObject\";\n }\n // See if we are passing the data in the body\n if (this.passDataInBody) {\n var data = this.methodData || this.methodParams;\n // Stringify the data to be passed in the body\n this.methodData = JSON.stringify(data);\n }\n // See if we are passing the data in the query string as a variable\n if (this.passDataInQSAsVar) {\n var data = this.methodParams || this.methodData;\n // Append the parameters in the query string\n url += \"(@v)?@v=\" + (typeof data === \"string\" ? \"'\" + encodeURIComponent(data) + \"'\" : JSON.stringify(data));\n }\n // See if we are replacing the arguments\n if (this.replace) {\n // Parse the arguments\n for (var key in this.methodParams) {\n // Replace the argument in the url\n url = url.replace(\"[[\" + key + \"]]\", encodeURIComponent(this.methodParams[key]));\n }\n }\n // Else, see if this is an odata request\n else if (this.methodInfo.requestType == _1.RequestType.OData) {\n var oData = new _1.OData(this.methodParams[\"oData\"]);\n // Update the url\n url = \"?\" + oData.QueryString;\n // Set the get all items Flag\n this.methodInfo.getAllItemsFl = oData.GetAllItems;\n }\n // Else, see if we are not passing the data in the body or query string as a variable\n else if (!this.passDataInBody && !this.passDataInQSAsVar) {\n var params = \"\";\n // Ensure data exists\n var data = this.methodParams || this.methodData;\n if (data) {\n // Ensure the data is an object\n data = data && (typeof data === \"undefined\" ? \"undefined\" : _typeof(data)) === \"object\" ? data : { value: data };\n // Parse the parameters\n for (var name_2 in data) {\n var value = data[name_2];\n value = typeof value === \"string\" ? \"'\" + value + \"'\" : value;\n switch (this.methodInfo.requestType) {\n // Append the value only\n case _1.RequestType.GetWithArgsValueOnly:\n case _1.RequestType.PostWithArgsValueOnly:\n params += value + \", \";\n break;\n // Append the parameter and value\n default:\n params += name_2 + \"=\" + value + \", \";\n break;\n }\n }\n }\n // See if we are passing data in the query string\n if (this.passDataInQS) {\n // Set the url\n url += params.length > 0 ? \"?\" + params.replace(/, $/, \"&\") : \"\";\n } else {\n // Set the url\n url += params.length > 0 ? \"(\" + params.replace(/, $/, \"\") + \")\" : \"\";\n }\n }\n // Return the url\n return url;\n };\n return MethodInfo;\n}();\nexports.MethodInfo = MethodInfo;\n\n//# sourceURL=webpack:///./build/utils/methodInfo.js?");
/***/ }),
/***/ "./build/utils/oData.js":
/*!******************************!*\
!*** ./build/utils/oData.js ***!
\******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\r\n * OData\r\n */\nvar OData = /** @class */function () {\n /*********************************************************************************************************************************/\n // Constructor\n /*********************************************************************************************************************************/\n // The class constructor\n function OData(oData) {\n // Default the Variables\n this._custom = oData && oData.Custom ? oData.Custom : null;\n this._expand = oData && oData.Expand ? oData.Expand : [];\n this._filter = oData && oData.Filter ? oData.Filter : null;\n this._getAllItems = oData && oData.GetAllItems ? oData.GetAllItems : false;\n this._orderBy = oData && oData.OrderBy ? oData.OrderBy : [];\n this._select = oData && oData.Select ? oData.Select : [];\n this._skip = oData && oData.Skip ? oData.Skip : null;\n this._top = oData && oData.Top ? oData.Top : null;\n }\n Object.defineProperty(OData.prototype, \"Custom\", {\n /*********************************************************************************************************************************/\n // Properties\n /*********************************************************************************************************************************/\n // Custom\n get: function get() {\n return this._custom;\n },\n set: function set(value) {\n this._custom = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(OData.prototype, \"Expand\", {\n // Expand\n get: function get() {\n return this._expand;\n },\n set: function set(value) {\n this._expand = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(OData.prototype, \"Filter\", {\n // Filter\n get: function get() {\n return this._filter;\n },\n set: function set(value) {\n this._filter = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(OData.prototype, \"GetAllItems\", {\n // Flag to get all items\n get: function get() {\n return this._getAllItems;\n },\n set: function set(value) {\n this._getAllItems = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(OData.prototype, \"OrderBy\", {\n // Order By\n get: function get() {\n return this._orderBy;\n },\n set: function set(value) {\n this._orderBy = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(OData.prototype, \"QueryString\", {\n // Query String\n get: function get() {\n var qs = \"\";\n var values = [];\n // Get the query string values for the properties\n values.push(this.getQSValue(\"$select\", this._select));\n values.push(this.getQSValue(\"$orderby\", this._orderBy));\n this._top ? values.push(\"$top=\" + this._top) : null;\n this._skip ? values.push(\"$skip=\" + this._skip) : null;\n this._filter ? values.push(\"$filter=\" + this._filter) : null;\n values.push(this.getQSValue(\"$expand\", this._expand));\n this._custom ? values.push(this._custom) : null;\n // Parse the values\n for (var _i = 0, values_1 = values; _i < values_1.length; _i++) {\n var value = values_1[_i];\n // Ensure a value exists\n if (value && value != \"\") {\n // Append the query string value\n qs += (qs == \"\" ? \"\" : \"&\") + value;\n }\n }\n // Return the query string\n return qs;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(OData.prototype, \"Select\", {\n // Select\n get: function get() {\n return this._select;\n },\n set: function set(value) {\n this._select = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(OData.prototype, \"Skip\", {\n // Skip\n get: function get() {\n return this._skip;\n },\n set: function set(value) {\n this._skip = value;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(OData.prototype, \"Top\", {\n // Top\n get: function get() {\n return this._top;\n },\n set: function set(value) {\n this._top = value;\n },\n enumerable: true,\n configurable: true\n });\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n // Method to convert the array of strings to a query string value.\n OData.prototype.getQSValue = function (qsKey, keys) {\n // Return the query string\n return keys.length > 0 ? qsKey + \"=\" + keys.join(\",\") : \"\";\n };\n return OData;\n}();\nexports.OData = OData;\n\n//# sourceURL=webpack:///./build/utils/oData.js?");
/***/ }),
/***/ "./build/utils/requestType.js":
/*!************************************!*\
!*** ./build/utils/requestType.js ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\r\n * Request Type\r\n */\nexports.RequestType = {\n // Requests\n Custom: 0,\n Delete: 1,\n Merge: 2,\n OData: 3,\n // Get Requests\n Get: 10,\n GetBuffer: 11,\n GetWithArgs: 12,\n GetWithArgsInBody: 13,\n GetWithArgsInQS: 14,\n GetWithArgsInQSAsVar: 15,\n GetWithArgsValueOnly: 16,\n GetReplace: 17,\n // Graph Requests\n GraphGet: 20,\n GraphPost: 21,\n // Post Requests\n Post: 30,\n PostWithArgs: 31,\n PostWithArgsInBody: 32,\n PostWithArgsInQS: 33,\n PostWithArgsInQSAsVar: 34,\n PostWithArgsValueOnly: 35,\n PostReplace: 36\n};\n\n//# sourceURL=webpack:///./build/utils/requestType.js?");
/***/ }),
/***/ "./build/utils/targetInfo.js":
/*!***********************************!*\
!*** ./build/utils/targetInfo.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ../lib */ \"./build/lib/index.js\");\nvar _1 = __webpack_require__(/*! . */ \"./build/utils/index.js\");\n/**\r\n * Target Information\r\n */\nvar TargetInfo = /** @class */function () {\n /*********************************************************************************************************************************/\n // Constructor\n /*********************************************************************************************************************************/\n function TargetInfo(targetInfo) {\n // Default the properties\n this.request = targetInfo || {};\n this.requestData = this.request.data;\n this.requestHeaders = this.request.requestHeader;\n this.requestMethod = this.request.method ? this.request.method : \"GET\";\n // Set the request url\n this.isGraph ? this.setGraphRequestUrl() : this.setRESTRequestUrl();\n }\n Object.defineProperty(TargetInfo.prototype, \"isBatchRequest\", {\n // Flag to determine if this is a batch request\n get: function get() {\n return this.request.endpoint == \"$batch\";\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TargetInfo.prototype, \"isGraph\", {\n // Flag to determine if this is a graph request\n get: function get() {\n return this.request.requestType == _1.RequestType.GraphGet || this.request.requestType == _1.RequestType.GraphPost;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TargetInfo.prototype, \"requestInfo\", {\n // The request information\n get: function get() {\n // Return the request information\n return {\n data: this.requestData,\n method: this.requestMethod,\n url: this.requestUrl\n };\n },\n enumerable: true,\n configurable: true\n });\n /*********************************************************************************************************************************/\n // Methods\n /*********************************************************************************************************************************/\n // Method to get the domain url\n TargetInfo.prototype.getDomainUrl = function () {\n var url = lib_1.ContextInfo.document ? lib_1.ContextInfo.document.location.href : \"\";\n // See if this is an app web\n if (lib_1.ContextInfo.isAppWeb) {\n // Set the url to the host url\n url = TargetInfo.getQueryStringValue(\"SPHostUrl\") + \"\";\n }\n // Split the url and validate it\n url = url.split('/');\n if (url && url.length >= 2) {\n // Set the url\n url = url[0] + \"//\" + url[2];\n }\n // Return the url\n return url;\n };\n // Method to get a query string value\n TargetInfo.getQueryStringValue = function (key) {\n // Get the query string\n var queryString = lib_1.ContextInfo.existsFl && lib_1.ContextInfo.document ? lib_1.ContextInfo.document.location.href.split('?') : [\"\"];\n queryString = queryString.length > 1 ? queryString[1] : queryString[0];\n // Parse the values\n var values = queryString.split('&');\n for (var i = 0; i < values.length; i++) {\n var keyValue = values[i].split('=');\n // Ensure a value exists\n if (keyValue.length == 1) {\n continue;\n }\n // See if this is the key we are looking for\n if (decodeURIComponent(keyValue[0]) == key) {\n return decodeURIComponent(keyValue[1]);\n }\n }\n // Key was not found\n return null;\n };\n // Method to set the request url for the Graph API\n TargetInfo.prototype.setGraphRequestUrl = function () {\n // Return the request url\n this.requestUrl = \"https://graph.microsoft.com/\" + this.request.endpoint;\n };\n // Method to set the request url for the REST API\n TargetInfo.prototype.setRESTRequestUrl = function () {\n var endpoint = this.request.endpoint ? \"/\" + this.request.endpoint : \"\";\n var hostUrl = TargetInfo.getQueryStringValue(\"SPHostUrl\");\n var qs = (endpoint.indexOf(\"?\") === -1 ? \"?\" : \"&\") + \"@target='{{Target}}'\";\n var template = \"{{Url}}\" + (this.request.endpoint ? \"/_api/{{EndPoint}}{{TargetUrl}}\" : \"\");\n // See if we are defaulting the url for the app web\n if (lib_1.ContextInfo.existsFl && lib_1.ContextInfo.window.$REST && lib_1.ContextInfo.window.$REST.DefaultRequestToHostFl && lib_1.ContextInfo.isAppWeb && !this.request.overrideDefaultRequestToHostFl && this.request.url == null) {\n // Default the url to the host web\n this.request.url = hostUrl;\n }\n // Ensure the url exists\n if (this.request.url == null) {\n // Default the url to the current site/web url\n this.request.url = this.request.defaultToWebFl == false ? lib_1.ContextInfo.siteAbsoluteUrl : lib_1.ContextInfo.webAbsoluteUrl;\n }\n // Else, see if the url already contains the full request\n else if (/\\/_api\\//.test(this.request.url)) {\n // Get the url\n var url = this.request.url.toLowerCase().split(\"/_api/\");\n // See if this is the app web and we are executing against a different web\n if (lib_1.ContextInfo.isAppWeb && url[0] != lib_1.ContextInfo.webAbsoluteUrl.toLowerCase()) {\n // Set the request url\n this.requestUrl = lib_1.ContextInfo.webAbsoluteUrl + \"/_api/SP.AppContextSite(@target)/\" + url[1] + endpoint + qs.replace(/{{Target}}/g, url[0]);\n } else {\n // Set the request url\n this.requestUrl = this.request.url + (this.request.endpoint ? \"/\" + this.request.endpoint : \"\");\n }\n return;\n }\n // See if this is a relative url\n if (this.request.url.indexOf(\"http\") != 0) {\n // Add the domain\n this.request.url = this.getDomainUrl() + this.request.url;\n }\n // See if this is the app web, and we are executing against a different web\n if (lib_1.ContextInfo.isAppWeb && this.request.url != lib_1.ContextInfo.webAbsoluteUrl) {\n // Set the request url\n this.requestUrl = template.replace(/{{Url}}/g, lib_1.ContextInfo.webAbsoluteUrl).replace(/{{EndPoint}}/g, \"SP.AppContextSite(@target)\" + endpoint).replace(/{{TargetUrl}}/g, qs.replace(/{{Target}}/g, this.request.url));\n } else {\n // Set the request url\n this.requestUrl = template.replace(/{{Url}}/g, this.request.url).replace(/{{EndPoint}}/g, this.request.endpoint).replace(/{{TargetUrl}}/g, \"\");\n }\n };\n return TargetInfo;\n}();\nexports.TargetInfo = TargetInfo;\n\n//# sourceURL=webpack:///./build/utils/targetInfo.js?");
/***/ }),
/***/ "./build/utils/types/index.js":
/*!************************************!*\
!*** ./build/utils/types/index.js ***!
\************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n\n//# sourceURL=webpack:///./build/utils/types/index.js?");
/***/ }),
/***/ "./build/utils/xhrRequest.js":
/*!***********************************!*\
!*** ./build/utils/xhrRequest.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ../lib */ \"./build/lib/index.js\");\n/**\r\n * XML HTTP Request Class\r\n */\nvar XHRRequest = /** @class */function () {\n /*********************************************************************************************************************************/\n // Constructor\n /*********************************************************************************************************************************/\n function XHRRequest(asyncFl, targetInfo, callback) {\n // Default the properties\n this.asyncFl = asyncFl;\n this.onRequestCompleted = callback || targetInfo.request.callback;\n this.targetInfo = targetInfo;\n this.xhr = this.createXHR();\n // Execute the request\n this.execute();\n }\n Object.defineProperty(XHRRequest.prototype, \"completedFl\", {\n /*********************************************************************************************************************************/\n // Public Properties\n /*********************************************************************************************************************************/\n // Flag indicating the request has completed\n get: function get() {\n return this.xhr ? this.xhr.readyState == 4 : false;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XHRRequest.prototype, \"response\", {\n // The response\n get: function get() {\n return this.xhr ? this.xhr.response : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XHRRequest.prototype, \"request\", {\n // The xml http request\n get: function get() {\n return this.xhr ? this.xhr : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XHRRequest.prototype, \"requestData\", {\n // The data send in the body of the request\n get: function get() {\n return this.targetInfo.requestData;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XHRRequest.prototype, \"requestUrl\", {\n // The reqest url\n get: function get() {\n return this.xhr ? this.xhr.responseURL : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(XHRRequest.prototype, \"status\", {\n // The request status\n get: function get() {\n return this.xhr ? this.xhr.status : null;\n },\n enumerable: true,\n configurable: true\n });\n /*********************************************************************************************************************************/\n // Private Methods\n /*********************************************************************************************************************************/\n // Method to create the xml http request\n XHRRequest.prototype.createXHR = function () {\n // See if the generic object doesn't exist\n if (typeof XMLHttpRequest !== \"undefined\") {\n // Create an instance of the xml http request object\n return new XMLHttpRequest();\n }\n // Try to create the request\n try {\n return new ActiveXObject(\"Msxml2.XMLHTTP.6.0\");\n } catch (e) {}\n // Try to create the request\n try {\n return new ActiveXObject(\"Msxml2.XMLHTTP.3.0\");\n } catch (e) {}\n // Try to create the request\n try {\n return new ActiveXObject(\"Microsoft.XMLHTTP\");\n } catch (e) {}\n // Throw an error\n throw new Error(\"This browser does not support xml http requests.\");\n };\n // Method to default the request headers\n XHRRequest.prototype.defaultHeaders = function (requestDigest) {\n var ifMatchExists = false;\n // See if the custom headers exist\n if (this.targetInfo.requestHeaders) {\n // Parse the custom headers\n for (var header in this.targetInfo.requestHeaders) {\n // Add the header\n this.xhr.setRequestHeader(header, this.targetInfo.requestHeaders[header]);\n // See if this is the \"IF-MATCH\" header\n ifMatchExists = ifMatchExists || header.toUpperCase() == \"IF-MATCH\";\n }\n } else {\n // See if this is a graph request\n if (this.targetInfo.isGraph) {\n // Set the default headers\n this.xhr.setRequestHeader(\"Accept\", \"application/json\");\n this.xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n } else {\n // Set the default headers\n this.xhr.setRequestHeader(\"Accept\", \"application/json;odata=verbose\");\n this.xhr.setRequestHeader(\"Content-Type\", \"application/json;odata=verbose\");\n }\n }\n // See if this is a graph request\n if (this.targetInfo.isGraph) {\n // Set the authorization\n this.xhr.setRequestHeader(\"Authorization\", \"Bearer \" + this.targetInfo.request.accessToken);\n } else {\n // See if custom headers were not defined\n if (this.targetInfo.requestHeaders == null) {\n // Set the method by default\n this.xhr.setRequestHeader(\"X-HTTP-Method\", this.targetInfo.requestMethod);\n }\n // Set the request digest\n this.xhr.setRequestHeader(\"X-RequestDigest\", requestDigest);\n // See if we are deleting or updating the data\n if (this.targetInfo.requestMethod == \"DELETE\" || this.targetInfo.requestMethod == \"MERGE\" && !ifMatchExists) {\n // Append the header for deleting/updating\n this.xhr.setRequestHeader(\"IF-MATCH\", \"*\");\n }\n }\n };\n // Method to execute the xml http request\n XHRRequest.prototype.execute = function () {\n var _this = this;\n // Set the request digest\n var requestDigest = this.targetInfo.request.requestDigest || \"\";\n if (requestDigest == \"\") {\n // Get the request digest\n requestDigest = lib_1.ContextInfo.document ? lib_1.ContextInfo.document.querySelector(\"#__REQUESTDIGEST\") : \"\";\n requestDigest = requestDigest ? requestDigest.value : \"\";\n }\n // See if we are targeting the context endpoint\n if (this.targetInfo.request.endpoint == \"contextinfo\") {\n // Execute the request\n this.executeRequest(requestDigest);\n }\n // See if this is a post request and the request digest does not exist\n else if (this.targetInfo.requestMethod != \"GET\" && requestDigest == \"\") {\n // See if this is a synchronous request\n if (!this.asyncFl) {\n // Log\n console.info(\"[gd-sprest] POST requests must include the request digest information for synchronous requests. This is due to the modern page not including this information on the page.\");\n } else {\n // Get the context information\n lib_1.ContextInfo.getWeb(this.targetInfo.request.url || document.location.pathname.substr(0, document.location.pathname.lastIndexOf('/'))).execute(function (contextInfo) {\n // Execute the request\n _this.executeRequest(contextInfo.GetContextWebInformation.FormDigestValue);\n });\n }\n } else {\n // Execute the request\n this.executeRequest(requestDigest);\n }\n };\n // Method to execute the xml http request\n XHRRequest.prototype.executeRequest = function (requestDigest) {\n var _this = this;\n // Ensure the xml http request exists\n if (this.xhr == null) {\n return null;\n }\n // Open the request\n this.xhr.open(this.targetInfo.requestMethod == \"GET\" ? \"GET\" : \"POST\", this.targetInfo.requestUrl, this.asyncFl);\n // See if we are making an asynchronous request\n if (this.asyncFl) {\n // Set the state change event\n this.xhr.onreadystatechange = function () {\n // See if the request has finished\n if (_this.xhr.readyState == 4) {\n // Execute the request completed event\n _this.onRequestCompleted ? _this.onRequestCompleted(_this) : null;\n }\n };\n }\n // See if we the response type is an array buffer\n // Note - Updating the response type is only allow for asynchronous requests. Any error will be thrown otherwise.\n if (this.targetInfo.request.bufferFl && this.asyncFl) {\n // Set the response type\n this.xhr.responseType = \"arraybuffer\";\n } else {\n // Default the headers\n this.defaultHeaders(requestDigest);\n // Ensure the arguments passed is defaulted as a string, unless it's an array buffer\n if (this.targetInfo.requestData && typeof this.targetInfo.requestData !== \"string\") {\n // Stringify the data object, if it's not an array buffer\n this.targetInfo.requestData = this.targetInfo.requestData.byteLength ? this.targetInfo.requestData : JSON.stringify(this.targetInfo.requestData);\n }\n }\n // Execute the request\n this.targetInfo.request.bufferFl || this.targetInfo.requestData == null ? this.xhr.send() : this.xhr.send(this.targetInfo.requestData);\n };\n return XHRRequest;\n}();\nexports.XHRRequest = XHRRequest;\n\n//# sourceURL=webpack:///./build/utils/xhrRequest.js?");
/***/ }),
/***/ "./node_modules/core-js/es6/promise.js":
/*!*********************************************!*\
!*** ./node_modules/core-js/es6/promise.js ***!
\*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("__webpack_require__(/*! ../modules/es6.object.to-string */ \"./node_modules/core-js/modules/es6.object.to-string.js\");\n__webpack_require__(/*! ../modules/es6.string.iterator */ \"./node_modules/core-js/modules/es6.string.iterator.js\");\n__webpack_require__(/*! ../modules/web.dom.iterable */ \"./node_modules/core-js/modules/web.dom.iterable.js\");\n__webpack_require__(/*! ../modules/es6.promise */ \"./node_modules/core-js/modules/es6.promise.js\");\nmodule.exports = __webpack_require__(/*! ../modules/_core */ \"./node_modules/core-js/modules/_core.js\").Promise;\n\n\n//# sourceURL=webpack:///./node_modules/core-js/es6/promise.js?");
/***/ }),
/***/ "./node_modules/core-js/modules/_a-function.js":
/*!*****************************************************!*\
!*** ./node_modules/core-js/modules/_a-function.js ***!
\*****************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n//# sourceURL=webpack:///./node_modules/core-js/modules/_a-function.js?");
/***/ }),
/***/ "./node_modules/core-js/modules/_add-to-unscopables.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/_add-to-unscopables.js ***!
\*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = __webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\")('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(/*! ./_hide */ \"./node_modules/core-js/modules/_hide.js\")(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n\n\n//# sourceURL=webpack:///./node_modules/core-js/modules/_add-to-unscopables.js?");
/***/ }),
/***/ "./node_modules/core-js/modules/_an-instance.js":
/*!******************************************************!*\
!*** ./node_modules/core-js/modules/_an-instance.js ***!
\******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = function (it, Constructor, name, forbiddenField) {\n if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n\n\n//# sourceURL=webpack:///./node_modules/core-js/modules/_an-instance.js?");
/***/ }),
/***/ "./node_modules/core-js/modules/_an-object.js":
/*!****************************************************!*\
!*** ./node_modules/core-js/modules/_an-object.js ***!
\****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("var isObject = __webpack_require__(/*! ./_is-object */ \"./node_modules/core-js/modules/_is-object.js\");\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n\n\n//# sourceURL=webpack:///./node_modules/core-js/modules/_an-object.js?");
/***/ }),
/***/ "./node_modules/core-js/modules/_array-includes.js":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/_array-includes.js ***!
\*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = __webpack_require__(/*! ./_to-iobject */ \"./node_modules/core-js/modules/_to-iobject.js\");\nvar toLength = __webpack_require__(/*! ./_to-length */ \"./node_modules/core-js/modules/_to-length.js\");\nvar toAbsoluteIndex = __webpack_require__(/*! ./_to-absolute-index */ \"./node_modules/core-js/modules/_to-absolute-index.js\");\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\n\n//# sourceURL=webpack:///./node_modules/core-js/modules/_array-includes.js?");
/***/ }),
/***/ "./node_modules/core-js/modules/_classof.js":
/*!**************************************************!*\
!*** ./node_modules/core-js/modules/_classof.js ***!
\**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
eval("// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = __webpack_require__(/*! ./_cof */ \"./node_modules/core-js/modules/_cof.js\");\nvar TAG = __webpack_require__(/*! ./_wks */ \"./node_modules/core-js/modules/_wks.js\")('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\n\n//# sourceURL=webpack:///./node_modules/core-js/modules/_classof.js?");
/***/ }),
/***/ "./node_modules/core-js/modules/_cof.js":
/*!**********************************************!*\
!*** ./node_modules/core-js/modules/_cof.js ***!
\**********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n\n\n//# sourceURL=webpack:///./node_modules/core-js/modules/_cof.js?");
/***/ }),
/***/ "./node_modules/core-js/modules/_core.js":
/*!***********************************************!*\
!*** ./node_modules/core-js/modules/_core.js ***!
\***********************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("var core = module.exports = { version: '2.5.4' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n\n\n//# sourceURL=webpack:///./node_modules/core-js/modules/_core.js?");