gl-sp-frontend
Advanced tools
Comparing version 1.0.0-alpha14 to 1.0.0-alpha15
@@ -5,2 +5,3 @@ import { AttachmentFileAddResult, AttachmentFileInfo, ItemAddResult, TypedHash } from 'sp-pnp-js'; | ||
declare class Core { | ||
fieldsToStringArray(fields: string[]): string; | ||
/** | ||
@@ -18,3 +19,3 @@ * Retrieve a search list based on fields, filter and ordering | ||
*/ | ||
retrieveSingle(listItemId: number, listName: string, fieldsArray?: string[]): Promise<any[]>; | ||
retrieveSingle(listItemId: number, listName: string, fieldsArray?: string[]): Promise<any>; | ||
/** | ||
@@ -21,0 +22,0 @@ * Move items to recycle bin. The user will be able to restore the information. |
@@ -76,2 +76,5 @@ "use strict"; | ||
} | ||
Core.prototype.fieldsToStringArray = function (fields) { | ||
return fields.toString().replace('[', '').replace(']', ''); | ||
}; | ||
/** | ||
@@ -85,3 +88,3 @@ * Retrieve a search list based on fields, filter and ordering | ||
if (fieldsArray === void 0) { fieldsArray = []; } | ||
var fields = fieldsArray.toString().replace('[', '').replace(']', ''); | ||
var fields = this.fieldsToStringArray(fieldsArray); | ||
return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () { | ||
@@ -112,3 +115,3 @@ return __generator(this, function (_a) { | ||
if (fieldsArray === void 0) { fieldsArray = []; } | ||
var fields = fieldsArray.toString().replace('[', '').replace(']', ''); | ||
var fields = this.fieldsToStringArray(fieldsArray); | ||
return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () { | ||
@@ -115,0 +118,0 @@ return __generator(this, function (_a) { |
@@ -31,4 +31,2 @@ "use strict"; | ||
Accept: _this._jsonHeader, | ||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 Edg/83.0.478.37', | ||
'X-UA-Compatible': 'IE=Edge,chrome=1' | ||
}, | ||
@@ -38,16 +36,2 @@ baseUrl: url == null ? _this._baseUrl : url, | ||
}); | ||
sp_pnp_js_1.default.sp.configure({ | ||
headers: { | ||
Accept: _this._jsonHeader, | ||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 Edg/83.0.478.37', | ||
'X-UA-Compatible': 'IE=Edge,chrome=1' | ||
}, | ||
mode: 'cors', | ||
credentials: 'same-origin' | ||
}); | ||
// pnp.sp.web.configure({ | ||
// mode: 'cors', | ||
// credentials: 'include', | ||
// headers: { 'X-UA-Compatible': 'IE=Edge,chrome=1' } | ||
// }) | ||
resolve({ | ||
@@ -54,0 +38,0 @@ code: 200, |
@@ -5,2 +5,3 @@ import { AttachmentFileAddResult, AttachmentFileInfo, ItemAddResult, TypedHash } from 'sp-pnp-js'; | ||
declare class Core { | ||
fieldsToStringArray(fields: string[]): string; | ||
/** | ||
@@ -18,3 +19,3 @@ * Retrieve a search list based on fields, filter and ordering | ||
*/ | ||
retrieveSingle(listItemId: number, listName: string, fieldsArray?: string[]): Promise<any[]>; | ||
retrieveSingle(listItemId: number, listName: string, fieldsArray?: string[]): Promise<any>; | ||
/** | ||
@@ -21,0 +22,0 @@ * Move items to recycle bin. The user will be able to restore the information. |
@@ -74,2 +74,5 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
} | ||
Core.prototype.fieldsToStringArray = function (fields) { | ||
return fields.toString().replace('[', '').replace(']', ''); | ||
}; | ||
/** | ||
@@ -83,3 +86,3 @@ * Retrieve a search list based on fields, filter and ordering | ||
if (fieldsArray === void 0) { fieldsArray = []; } | ||
var fields = fieldsArray.toString().replace('[', '').replace(']', ''); | ||
var fields = this.fieldsToStringArray(fieldsArray); | ||
return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () { | ||
@@ -110,3 +113,3 @@ return __generator(this, function (_a) { | ||
if (fieldsArray === void 0) { fieldsArray = []; } | ||
var fields = fieldsArray.toString().replace('[', '').replace(']', ''); | ||
var fields = this.fieldsToStringArray(fieldsArray); | ||
return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () { | ||
@@ -113,0 +116,0 @@ return __generator(this, function (_a) { |
@@ -29,4 +29,2 @@ import { default as pnp } from 'sp-pnp-js'; | ||
Accept: _this._jsonHeader, | ||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 Edg/83.0.478.37', | ||
'X-UA-Compatible': 'IE=Edge,chrome=1' | ||
}, | ||
@@ -36,16 +34,2 @@ baseUrl: url == null ? _this._baseUrl : url, | ||
}); | ||
pnp.sp.configure({ | ||
headers: { | ||
Accept: _this._jsonHeader, | ||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 Edg/83.0.478.37', | ||
'X-UA-Compatible': 'IE=Edge,chrome=1' | ||
}, | ||
mode: 'cors', | ||
credentials: 'same-origin' | ||
}); | ||
// pnp.sp.web.configure({ | ||
// mode: 'cors', | ||
// credentials: 'include', | ||
// headers: { 'X-UA-Compatible': 'IE=Edge,chrome=1' } | ||
// }) | ||
resolve({ | ||
@@ -52,0 +36,0 @@ code: 200, |
{ | ||
"name": "gl-sp-frontend", | ||
"version": "1.0.0-alpha14", | ||
"version": "1.0.0-alpha15", | ||
"description": "Common code for SharePoint 2013/2016 using among web front-end development such as pure JavaScript, ES6+ and TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
105453
1813