Comparing version 1.0.5-1 to 1.0.5
@@ -16,2 +16,10 @@ # @pnp/sp/clientsidepages | ||
Added in 1.0.5 you can also add a client side page using the list path. This gets around potential language issues with list title. You must specify the list path when calling this method in addition to the new page's filename. | ||
```TypeScript | ||
import { sp } from "@pnp/sp"; | ||
const page = await sp.web.addClientSidePageByPath(`MyFirstPage.aspx`, "/sites/dev/SitePages"); | ||
``` | ||
## Load Client-side page | ||
@@ -18,0 +26,0 @@ |
@@ -10,6 +10,6 @@ # @pnp/sp/search | ||
```TypeScript | ||
import pnp, { SearchQuery, SearchResults } from "@pnp/sp"; | ||
import { sp, SearchQuery, SearchResults } from "@pnp/sp"; | ||
// text search using SharePoint default values for other parameters | ||
pnp.sp.search("test").then((r: SearchResults) => { | ||
sp.search("test").then((r: SearchResults) => { | ||
@@ -22,3 +22,3 @@ console.log(r.ElapsedTime); | ||
// define a search query object matching the SearchQuery interface | ||
pnp.sp.search(<SearchQuery>{ | ||
sp.search(<SearchQuery>{ | ||
Querytext: "test", | ||
@@ -40,3 +40,3 @@ RowLimit: 10, | ||
```TypeScript | ||
import pnp, { SearchQueryBuilder, SearchResults } from "@pnp/sp"; | ||
import { sp, SearchQueryBuilder, SearchResults } from "@pnp/sp"; | ||
@@ -52,3 +52,3 @@ // this will hold our current results | ||
const q = SearchQueryBuilder.create("test").rowLimit(5); | ||
pnp.sp.search(q).then((r: SearchResults) => { | ||
sp.search(q).then((r: SearchResults) => { | ||
@@ -88,3 +88,3 @@ currentResults = r; // update the current results | ||
pnp.sp.search(q).then(h => { /* ... */ }); | ||
sp.search(q).then(h => { /* ... */ }); | ||
@@ -94,3 +94,3 @@ // provide a default query text in the create() | ||
pnp.sp.search(q2).then(h => { /* ... */ }); | ||
sp.search(q2).then(h => { /* ... */ }); | ||
@@ -107,4 +107,4 @@ // provide query text and a template | ||
let q4 = SearchQueryBuilder.create("financial data", appSearchSettings).enableSorting.enableStemming; | ||
pnp.sp.search(q3).then(h => { /* ... */ }); | ||
pnp.sp.search(q4).then(h => { /* ... */ }); | ||
sp.search(q3).then(h => { /* ... */ }); | ||
sp.search(q4).then(h => { /* ... */ }); | ||
``` | ||
@@ -117,5 +117,5 @@ | ||
```TypeScript | ||
import pnp, { SearchSuggestQuery, SearchSuggestResult } from "@pnp/sp"; | ||
import { sp, SearchSuggestQuery, SearchSuggestResult } from "@pnp/sp"; | ||
pnp.sp.searchSuggest("test").then((r: SearchSuggestResult) => { | ||
sp.searchSuggest("test").then((r: SearchSuggestResult) => { | ||
@@ -125,3 +125,3 @@ console.log(r); | ||
pnp.sp.searchSuggest(<SearchSuggestQuery>{ | ||
sp.searchSuggest(<SearchSuggestQuery>{ | ||
querytext: "test", | ||
@@ -128,0 +128,0 @@ count: 5, |
{ | ||
"name": "@pnp/sp", | ||
"version": "1.0.5-1", | ||
"version": "1.0.5", | ||
"description": "pnp - provides a fluent api for working with SharePoint REST", | ||
@@ -11,5 +11,5 @@ "main": "./dist/sp.es5.umd.js", | ||
"peerDependencies": { | ||
"@pnp/common": "1.0.5-1", | ||
"@pnp/logging": "1.0.5-1", | ||
"@pnp/odata": "1.0.5-1" | ||
"@pnp/common": "1.0.5", | ||
"@pnp/logging": "1.0.5", | ||
"@pnp/odata": "1.0.5" | ||
}, | ||
@@ -16,0 +16,0 @@ "author": { |
@@ -69,3 +69,3 @@ import { SharePointQueryable, SharePointQueryableCollection, SharePointQueryableInstance } from "./sharepointqueryable"; | ||
*/ | ||
readonly listItemAllFields: SharePointQueryableCollection; | ||
readonly listItemAllFields: SharePointQueryableInstance; | ||
/** | ||
@@ -72,0 +72,0 @@ * Gets a collection of versions |
@@ -54,3 +54,3 @@ import { TypedHash } from "@pnp/common"; | ||
*/ | ||
readonly listItemAllFields: SharePointQueryableCollection; | ||
readonly listItemAllFields: SharePointQueryableInstance; | ||
/** | ||
@@ -91,2 +91,8 @@ * Gets the parent folder, if available | ||
getItem<T>(...selects: string[]): Promise<Item & T>; | ||
/** | ||
* Moves a folder to destination path | ||
* | ||
* @param destUrl Absolute or relative URL of the destination path | ||
*/ | ||
moveTo(destUrl: string): Promise<void>; | ||
} | ||
@@ -93,0 +99,0 @@ export interface FolderAddResult { |
@@ -10,3 +10,3 @@ import { Items } from "./items"; | ||
import { TypedHash } from "@pnp/common"; | ||
import { ControlMode, RenderListData, ChangeQuery, CamlQuery, ChangeLogitemQuery, ListFormData, RenderListDataParameters } from "./types"; | ||
import { ControlMode, RenderListData, ChangeQuery, CamlQuery, ChangeLogitemQuery, ListFormData, RenderListDataParameters, ListItemFormUpdateValue } from "./types"; | ||
import { UserCustomActions } from "./usercustomactions"; | ||
@@ -209,2 +209,11 @@ import { Folder } from "./folders"; | ||
getListItemEntityTypeFullName(): Promise<string>; | ||
/** | ||
* Creates an item using path (in a folder), validates and sets its field values. | ||
* | ||
* @param formValues The fields to change and their new values. | ||
* @param decodedUrl Path decoded url; folder's server relative path. | ||
* @param bNewDocumentUpdate true if the list item is a document being updated after upload; otherwise false. | ||
* @param checkInComment Optional check in comment. | ||
*/ | ||
addValidateUpdateItemUsingPath(formValues: ListItemFormUpdateValue[], decodedUrl: string, bNewDocumentUpdate?: boolean, checkInComment?: string): Promise<ListItemFormUpdateValue[]>; | ||
} | ||
@@ -211,0 +220,0 @@ export interface ListAddResult { |
@@ -34,2 +34,7 @@ import { SharePointQueryable, SharePointQueryableInstance } from "./sharepointqueryable"; | ||
/** | ||
* Gets a Web instance representing the root web of the site collection | ||
* correctly setup for chaining within the library | ||
*/ | ||
getRootWeb(): Promise<Web>; | ||
/** | ||
* Gets the context information for this site collection | ||
@@ -36,0 +41,0 @@ */ |
@@ -348,2 +348,10 @@ import { TypedHash } from "@pnp/common"; | ||
addClientSidePage(pageName: string, title?: string, libraryTitle?: string): Promise<ClientSidePage>; | ||
/** | ||
* Creates a new client side page using the library path | ||
* | ||
* @param pageName Name of the new page | ||
* @param listRelativePath The server relative path to the list's root folder (including /sites/ if applicable) | ||
* @param title Display title of the new page | ||
*/ | ||
addClientSidePageByPath(pageName: string, listRelativePath: string, title?: string): Promise<ClientSidePage>; | ||
} | ||
@@ -350,0 +358,0 @@ /** |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
6572499
46320
1