Comparing version 1.0.2 to 1.0.3-0
@@ -113,2 +113,27 @@ # @pnp/sp/clientsidepages | ||
## Find Controls | ||
Added in _1.0.3_ | ||
You can use the either of the two available method to locate controls within a page. These method search through all sections, columns, and controls returning the first instance that meets the supplied criteria. | ||
```TypeScript | ||
import { ClientSideWebPart } from "@pnp/sp"; | ||
// find a control by instance id | ||
const control1 = page.findControlById("b99bfccc-164e-4d3d-9b96-da48db62eb78"); | ||
// type the returned control | ||
const control2 = page.findControlById<ClientSideWebPart>("c99bfccc-164e-4d3d-9b96-da48db62eb78"); | ||
const control3 = page.findControlById<ClientSideText>("a99bfccc-164e-4d3d-9b96-da48db62eb78"); | ||
// use any predicate to find a control | ||
const control4 = page2.findControl<ClientSideWebpart>((c: CanvasControl) => { | ||
// any logic you wish can be used on the control here | ||
// return true to return that control | ||
return c.order > 3; | ||
}); | ||
``` | ||
## Control Comments | ||
@@ -119,2 +144,5 @@ | ||
```TypeScript | ||
// indicates if comments are disabled, not valid until the page is loaded (Added in _1.0.3_) | ||
page.commentsDisabled | ||
// enable comments | ||
@@ -121,0 +149,0 @@ await page.enableComments(); |
@@ -110,4 +110,5 @@ # @pnp/sp | ||
* [Sharing](sharing.md) | ||
* [Social](social.md) | ||
* [SP.Utilities.Utility](sp-utilities-utility.md) | ||
* [Views](views.md) | ||
* [Webs](webs.md) |
{ | ||
"name": "@pnp/sp", | ||
"version": "1.0.2", | ||
"version": "1.0.3-0", | ||
"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.2", | ||
"@pnp/logging": "1.0.2", | ||
"@pnp/odata": "1.0.2" | ||
"@pnp/common": "1.0.3-0", | ||
"@pnp/logging": "1.0.3-0", | ||
"@pnp/odata": "1.0.3-0" | ||
}, | ||
@@ -16,0 +16,0 @@ "author": { |
@@ -35,2 +35,3 @@ import { List } from "./lists"; | ||
sections: CanvasSection[]; | ||
commentsDisabled: boolean; | ||
/** | ||
@@ -40,4 +41,5 @@ * Creates a new instance of the ClientSidePage class | ||
* @param baseUrl The url or SharePointQueryable which forms the parent of this web collection | ||
* @param commentsDisabled Indicates if comments are disabled, not valid until load is called | ||
*/ | ||
constructor(file: File, sections?: CanvasSection[]); | ||
constructor(file: File, sections?: CanvasSection[], commentsDisabled?: boolean); | ||
/** | ||
@@ -101,2 +103,14 @@ * Creates a new blank page within the supplied library | ||
/** | ||
* Finds a control by the specified instance id | ||
* | ||
* @param id Instance id of the control to find | ||
*/ | ||
findControlById<T extends CanvasControl = CanvasControl>(id: string): T; | ||
/** | ||
* Finds a control within this page's control tree using the supplied predicate | ||
* | ||
* @param predicate Takes a control and returns true or false, if true that control is returned by findControl | ||
*/ | ||
findControl<T extends CanvasControl = CanvasControl>(predicate: (c: CanvasControl) => boolean): T; | ||
/** | ||
* Sets the comments flag for a page | ||
@@ -103,0 +117,0 @@ * |
@@ -195,3 +195,3 @@ import { SharePointQueryable, SharePointQueryableCollection, SharePointQueryableInstance } from "./sharepointqueryable"; | ||
*/ | ||
setContentChunked(file: Blob, progress?: (data: ChunkedFileUploadProgressData) => void, chunkSize?: number): Promise<File>; | ||
setContentChunked(file: Blob, progress?: (data: ChunkedFileUploadProgressData) => void, chunkSize?: number): Promise<FileAddResult>; | ||
/** | ||
@@ -198,0 +198,0 @@ * Starts a new chunk upload session and uploads the first fragment. |
@@ -36,4 +36,5 @@ import { SharePointQueryable, SharePointQueryableCollection, SharePointQueryableInstance } from "./sharepointqueryable"; | ||
* @param skip The starting id where the page should start, use with top to specify pages | ||
* @param reverse It true the PagedPrev=true parameter is added allowing backwards navigation in the collection | ||
*/ | ||
skip(skip: number): this; | ||
skip(skip: number, reverse?: boolean): this; | ||
/** | ||
@@ -40,0 +41,0 @@ * Gets a collection designed to aid in paging through data |
@@ -9,2 +9,3 @@ import { SearchQuery, SearchResults, SearchQueryBuilder } from "./search"; | ||
import { SPBatch } from "./batch"; | ||
import { SocialMethods } from "./social"; | ||
import { UtilityMethods } from "./utilities"; | ||
@@ -67,2 +68,6 @@ import { SPConfiguration } from "./config/splibconfig"; | ||
/** | ||
* Access to social methods | ||
*/ | ||
readonly social: SocialMethods; | ||
/** | ||
* Access to the site collection level navigation service | ||
@@ -80,3 +85,10 @@ */ | ||
readonly utility: UtilityMethods; | ||
/** | ||
* Handles creating and configuring the objects returned from this class | ||
* | ||
* @param fm The factory method used to create the instance | ||
* @param path Optional additional path information to pass to the factory method | ||
*/ | ||
private create<T>(fm, path?); | ||
} | ||
export declare const sp: SPRest; |
@@ -368,3 +368,3 @@ import { SharePointQueryable, SharePointQueryableInstance } from "./sharepointqueryable"; | ||
}[]; | ||
Table: { | ||
Table?: { | ||
Rows: { | ||
@@ -378,2 +378,11 @@ Cells: { | ||
}; | ||
Refiners?: { | ||
Name: string; | ||
Entries: { | ||
RefinementCount: string; | ||
RefinementName: string; | ||
RefinementToken: string; | ||
RefinementValue: string; | ||
}[]; | ||
}[]; | ||
ResultTitle?: string; | ||
@@ -380,0 +389,0 @@ ResultTitleUrl?: string; |
@@ -78,5 +78,5 @@ import { FetchOptions } from "@pnp/common"; | ||
/** | ||
* Orders based on the supplied fields ascending | ||
* Orders based on the supplied fields | ||
* | ||
* @param orderby The name of the field to sort on | ||
* @param orderby The name of the field on which to sort | ||
* @param ascending If false DESC is appended, otherwise ASC (default) | ||
@@ -83,0 +83,0 @@ */ |
@@ -25,2 +25,3 @@ export { spExtractODataId, spODataEntity, spODataEntityArray } from "./odata"; | ||
export { UserUpdateResult, SiteUserProps } from "./siteusers"; | ||
export * from "./social"; | ||
export { SubscriptionAddResult, SubscriptionUpdateResult } from "./subscriptions"; | ||
@@ -27,0 +28,0 @@ export * from "./types"; |
@@ -1247,8 +1247,27 @@ import { TypedHash } from "@pnp/common"; | ||
MenuView = 8, | ||
ListContentType = 16, | ||
FileSystemItemId = 32, | ||
ClientFormSchema = 64, | ||
QuickLaunch = 128, | ||
Spotlight = 256, | ||
Visualization = 512, | ||
ViewMetadata = 1024, | ||
DisableAutoHyperlink = 2048, | ||
EnableMediaTAUrls = 4096, | ||
ParentInfo = 8192, | ||
PageContextInfo = 16384, | ||
ClientSideComponentManifest = 32768, | ||
} | ||
export interface RenderListDataParameters { | ||
ViewXml?: string; | ||
AllowMultipleValueFilterForTaxonomyFields?: boolean; | ||
DatesInUtc?: boolean; | ||
ExpandGroups?: boolean; | ||
FirstGroupOnly?: boolean; | ||
FolderServerRelativeUrl?: string; | ||
ImageFieldsToTryRewriteToCdnUrls?: string; | ||
OverrideViewXml?: string; | ||
Paging?: string; | ||
FolderServerRelativeUrl?: string; | ||
RenderOptions?: RenderListDataOptions; | ||
ReplaceGroup?: boolean; | ||
ViewXml?: string; | ||
} | ||
@@ -1255,0 +1274,0 @@ export interface MenuNode { |
@@ -97,2 +97,18 @@ import { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection } from "./sharepointqueryable"; | ||
/** | ||
* Sets single value User Profile property | ||
* | ||
* @param accountName The account name of the user | ||
* @param propertyName Property name | ||
* @param propertyValue Property value | ||
*/ | ||
setSingleValueProfileProperty(accountName: string, propertyName: string, propertyValue: string): Promise<void>; | ||
/** | ||
* Sets multi valued User Profile property | ||
* | ||
* @param accountName The account name of the user | ||
* @param propertyName Property name | ||
* @param propertyValues Property values | ||
*/ | ||
setMultiValuedProfileProperty(accountName: string, propertyName: string, propertyValues: string[]): Promise<void>; | ||
/** | ||
* Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only) | ||
@@ -99,0 +115,0 @@ * |
@@ -202,2 +202,11 @@ import { TypedHash } from "@pnp/common"; | ||
/** | ||
* Gets a folder by server relative relative path if your folder name contains # and % characters | ||
* you need to first encode the file name using encodeURIComponent() and then pass the url | ||
* let url = "/sites/test/Shared Documents/" + encodeURIComponent("%123"); | ||
* This works only in SharePoint online. | ||
* | ||
* @param folderRelativeUrl The server relative path to the folder (including /sites/ if applicable) | ||
*/ | ||
getFolderByServerRelativePath(folderRelativeUrl: string): Folder; | ||
/** | ||
* Gets a file by server relative url | ||
@@ -209,2 +218,10 @@ * | ||
/** | ||
* Gets a file by server relative url if your file name contains # and % characters | ||
* you need to first encode the file name using encodeURIComponent() and then pass the url | ||
* let url = "/sites/test/Shared Documents/" + encodeURIComponent("%123.docx"); | ||
* | ||
* @param fileRelativeUrl The server relative path to the file (including /sites/ if applicable) | ||
*/ | ||
getFileByServerRelativePath(fileRelativeUrl: string): File; | ||
/** | ||
* Gets a list by server relative url (list's root folder) | ||
@@ -211,0 +228,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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
5799556
76
42374
2