interface IClientsidePage {
    _inheritingObservers: boolean;
    _url: string;
    commentsDisabled: boolean;
    InternalPromise: symbol;
    InternalReject: symbol;
    InternalResolve: symbol;
    json?: Partial<IPageData>;
    moments: {
        auth: ((observers: QueryableAuthObserver[], url: URL, init: RequestInit) => Promise<[url: URL, init: RequestInit]>);
        construct: ((observers: QueryableConstructObserver[], init: QueryableInit, path?: string) => Timeline<any>);
        data: ((observers: QueryableDataObserver<any>[], ...args: any[]) => void);
        parse: ((observers: QueryableParseObserver[], url: URL, response: Response, result: any) => Promise<[url: URL, response: Response, result: any]>);
        post: ((observers: QueryablePostObserver[], url: URL, result: any) => Promise<[url: URL, result: any]>);
        pre: ((observers: QueryablePreObserver[], url: string, init: RequestInit, result: any) => Promise<[url: string, init: RequestInit, result: any]>);
        send: ((observers: QueryableSendObserver[], url: URL, init: RequestInit) => Promise<Promise<Response>>);
    };
    observers: ObserverCollection;
    parentUrl: string;
    sections: CanvasSection[];
    get authorByLine(): string;
    bannerImageUrl: string;
    description: string;
    get emit(): EmitProxyType<T>;
    get hasVerticalSection(): boolean;
    headerTextAlignment: TextAlignment;
    layoutType: LayoutType;
    get on(): OnProxyType<T>;
    pageLayout: ClientsidePageLayoutType;
    get query(): URLSearchParams;
    reservedHeight: number;
    showPublishDate: boolean;
    showTopicHeader: boolean;
    thumbnailUrl: string;
    title: string;
    topicHeader: string;
    get verticalSection(): CanvasSection;
    addSection(): CanvasSection;
    addVerticalSection(): CanvasSection;
    cloneObserversOnChange(): void;
    concat(pathPart: string): this;
    copy(web: IWeb, pageName: string, title: string, publish?: boolean, promotedState?: PromotedState): Promise<IClientsidePage>;
    copyTo(page: IClientsidePage, publish?: boolean): Promise<IClientsidePage>;
    delete(): Promise<void>;
    discardPageCheckout(): Promise<void>;
    error(e?: any): void;
    execute(userInit: RequestInit): Promise<void>;
    expand(...expands: string[]): this;
    findControl<T>(predicate: ((c: ColumnControl<any>) => boolean)): T;
    findControlById<T>(id: string): T;
    fromJSON(pageData: Partial<IPageData>): this;
    getCanvasContent1(): string;
    getContextInfo(path?: string): Promise<IContextInfo>;
    getControls(): IClientsideControlBaseData[];
    getItem<T>(...selects: string[]): Promise<IItem & T>;
    getLayoutWebpartsContent(): string;
    getParent<T>(factory: ISPInvokableFactory<any>, path?: string, base?: string): T;
    load(): Promise<IClientsidePage>;
    log(message: string, level?: number): void;
    promoteToNews(): Promise<boolean>;
    recycle(): Promise<void>;
    save(publish?: boolean): Promise<boolean>;
    saveAsTemplate(publish?: boolean): Promise<IClientsidePage>;
    schedulePublish(publishDate: Date): Promise<string>;
    select(...selects: string[]): this;
    setAuthorById(authorId: number): Promise<void>;
    setAuthorByLoginName(authorLoginName: string): Promise<void>;
    setBannerImage(url: string, props?: IBannerImageProps): void;
    setBannerImageFromExternalUrl(url: string, props?: IBannerImageProps): Promise<void>;
    setControls(controls: IClientsideControlBaseData[]): void;
    share(emails: string[], message: string): Promise<void>;
    start(init?: any): Promise<any>;
    toRequestUrl(): string;
    toUrl(): string;
    using(...behaviors: TimelinePipe<any>[]): this;
    <T>(init?: RequestInit): Promise<T>;
}

Hierarchy

  • _ClientsidePage
    • IClientsidePage
  • Type Parameters

    • T = any

    Parameters

    • Optionalinit: RequestInit

    Returns Promise<T>

Properties

_inheritingObservers: boolean
_url: string
commentsDisabled: boolean
InternalPromise: symbol
InternalReject: symbol
InternalResolve: symbol
json?: Partial<IPageData>
moments: {
    auth: ((observers: QueryableAuthObserver[], url: URL, init: RequestInit) => Promise<[url: URL, init: RequestInit]>);
    construct: ((observers: QueryableConstructObserver[], init: QueryableInit, path?: string) => Timeline<any>);
    data: ((observers: QueryableDataObserver<any>[], ...args: any[]) => void);
    parse: ((observers: QueryableParseObserver[], url: URL, response: Response, result: any) => Promise<[url: URL, response: Response, result: any]>);
    post: ((observers: QueryablePostObserver[], url: URL, result: any) => Promise<[url: URL, result: any]>);
    pre: ((observers: QueryablePreObserver[], url: string, init: RequestInit, result: any) => Promise<[url: string, init: RequestInit, result: any]>);
    send: ((observers: QueryableSendObserver[], url: URL, init: RequestInit) => Promise<Promise<Response>>);
}
observers: ObserverCollection
parentUrl: string
sections: CanvasSection[]

Accessors

  • get authorByLine(): string
  • Returns string

  • get bannerImageUrl(): string
  • Returns string

  • set bannerImageUrl(value): void
  • Parameters

    • value: string

    Returns void

  • get description(): string
  • Returns string

  • set description(value): void
  • Parameters

    • value: string

    Returns void

  • get emit(): EmitProxyType<T>
  • Property allowing access to invoke a moment from within this timeline

    Returns EmitProxyType<T>

  • get hasVerticalSection(): boolean
  • Returns boolean

  • get headerTextAlignment(): TextAlignment
  • Returns TextAlignment

  • set headerTextAlignment(value): void
  • Parameters

    • value: TextAlignment

    Returns void

  • get layoutType(): LayoutType
  • Returns LayoutType

  • set layoutType(value): void
  • Parameters

    • value: LayoutType

    Returns void

  • get on(): OnProxyType<T>
  • Property allowing access to manage observers on moments within this timeline

    Returns OnProxyType<T>

  • get pageLayout(): ClientsidePageLayoutType
  • Returns ClientsidePageLayoutType

  • set pageLayout(value): void
  • Parameters

    • value: ClientsidePageLayoutType

    Returns void

  • get query(): URLSearchParams
  • Querystring key, value pairs which will be included in the request

    Returns URLSearchParams

  • get reservedHeight(): number
  • Returns number

  • set reservedHeight(value): void
  • Parameters

    • value: number

    Returns void

  • get showPublishDate(): boolean
  • Returns boolean

  • set showPublishDate(value): void
  • Parameters

    • value: boolean

    Returns void

  • get showTopicHeader(): boolean
  • Returns boolean

  • set showTopicHeader(value): void
  • Parameters

    • value: boolean

    Returns void

  • get thumbnailUrl(): string
  • Returns string

  • set thumbnailUrl(value): void
  • Parameters

    • value: string

    Returns void

  • get title(): string
  • Returns string

  • set title(value): void
  • Parameters

    • value: string

    Returns void

  • get topicHeader(): string
  • Returns string

  • set topicHeader(value): void
  • Parameters

    • value: string

    Returns void

  • get verticalSection(): CanvasSection
  • Returns CanvasSection

Methods

  • Add a section to this page

    Returns CanvasSection

  • Add a section to this page

    Returns CanvasSection

  • By default a timeline references the same observer collection as a parent timeline, if any changes are made to the observers this method first clones them ensuring we maintain a local copy and de-ref the parent

    Returns void

  • Directly concatenates the supplied string to the current url, not normalizing "/" chars

    Parameters

    • pathPart: string

      The string to concatenate to the url

    Returns this

  • Creates a new page with all of the content copied from this page

    Parameters

    • web: IWeb

      The web where we will create the copy

    • pageName: string

      The file name of the new page

    • title: string

      The title of the new page

    • Optionalpublish: boolean

      If true the page will be published (Default: true)

    • OptionalpromotedState: PromotedState

    Returns Promise<IClientsidePage>

  • Copies the content from this page to the supplied page instance NOTE: fully overwriting any previous content!!

    Parameters

    • page: IClientsidePage

      Page whose content we replace with this page's content

    • Optionalpublish: boolean

      If true the page will be published after the copy, if false it will be saved but left unpublished (Default: true)

    Returns Promise<IClientsidePage>

  • Delete this page

    Returns Promise<void>

  • Discards the checkout of this page

    Returns Promise<void>

  • Shorthand method to emit an error event tied to this timeline

    Parameters

    • Optionale: any

      Optional. Any error object to emit. If none is provided no emit occurs

    Returns void

  • Method orchestrating the emit calls for the moments defined in inheriting classes

    Parameters

    • userInit: RequestInit

    Returns Promise<void>

  • Expands fields such as lookups to get additional data

    Parameters

    • Rest...expands: string[]

      The Fields for which to expand the values

    Returns this

  • Finds a control within this page's control tree using the supplied predicate

    Type Parameters

    • T extends ColumnControl<any> = ColumnControl<any>

    Parameters

    • predicate: ((c: ColumnControl<any>) => boolean)

      Takes a control and returns true or false, if true that control is returned by findControl

        • (c): boolean
        • Parameters

          • c: ColumnControl<any>

          Returns boolean

    Returns T

  • Finds a control by the specified instance id

    Type Parameters

    • T extends ColumnControl<any> = ColumnControl<any>

    Parameters

    • id: string

      Instance id of the control to find

    Returns T

  • Loads this instance from the appropriate JSON data

    Parameters

    • pageData: Partial<IPageData>

      JSON data to load (replaces any existing data)

    Returns this

  • Returns string

  • Gets the context info for the specified path

    Parameters

    • Optionalpath: string

      Optional. Absolute path to a SharePoint resource [Default: this.parentUrl]

    Returns Promise<IContextInfo>

  • Returns IClientsideControlBaseData[]

  • Gets the list item associated with this clientside page

    Type Parameters

    • T

    Parameters

    • Rest...selects: string[]

      Specific set of fields to include when getting the item

    Returns Promise<IItem & T>

  • Returns string

  • Gets a parent for this instance as specified

    Type Parameters

    • T extends ISPQueryable<any>

    Parameters

    • factory: ISPInvokableFactory<any>

      The contructor for the class to create

    • Optionalpath: string
    • Optionalbase: string

    Returns T

  • Loads this page's content from the server

    Returns Promise<IClientsidePage>

  • Shorthand method to emit a logging event tied to this timeline

    Parameters

    • message: string

      The message to log

    • Optionallevel: number

      The level at which the message applies

    Returns void

  • Promotes this page as a news item

    Returns Promise<boolean>

  • Recycle this page

    Returns Promise<void>

  • Persists the content changes (sections, columns, and controls) [does not work with batching]

    Parameters

    • Optionalpublish: boolean

      If true the page is published, if false the changes are persisted to SharePoint but not published [Default: true]

    Returns Promise<boolean>

  • Saves a copy of this page as a template in this library's Templates folder

    Parameters

    • Optionalpublish: boolean

      If true the template is published, false the template is not published (default: true)

    Returns Promise<IClientsidePage>

    IClientsidePage instance representing the new template page

  • Schedules a page for publishing

    Parameters

    • publishDate: Date

      Date to publish the item

    Returns Promise<string>

    Version which was scheduled to be published

  • Choose which fields to return

    Parameters

    • Rest...selects: string[]

      One or more fields to return

    Returns this

  • Sets the authors for this page from the supplied list of user integer ids

    Parameters

    • authorId: number

      The integer id of the user to set as the author

    Returns Promise<void>

  • Sets the authors for this page from the supplied list of user integer ids

    Parameters

    • authorLoginName: string

      The login name of the user (ex: i:0#.f|membership|name@tenant.com)

    Returns Promise<void>

  • Sets the modern page banner image

    Parameters

    • url: string

      Url of the image to display

    • Optionalprops: IBannerImageProps

    Returns void

  • Sets the banner image url from an external source. You must call save to persist the changes

    Parameters

    • url: string

      absolute url of the external file

    • Optionalprops: IBannerImageProps

      optional set of properties to control display of the banner image

    Returns Promise<void>

  • Parameters

    • controls: IClientsideControlBaseData[]

    Returns void

  • Share this Page's Preview content by Email

    Parameters

    • emails: string[]

      Set of emails to which the preview is shared

    • message: string

      The message to include

    Returns Promise<void>

    void

  • Starts a timeline

    Parameters

    • Optionalinit: any

      A value passed into the execute logic from the initiator of the timeline

    Returns Promise<any>

    The result of this.execute

    This method first emits "init" to allow for any needed initial conditions then calls execute with any supplied init

  • Gets the full url with query information

    Returns string

  • Gets the current url

    Returns string

  • Apply the supplied behavior(s) to this timeline

    Parameters

    • Rest...behaviors: TimelinePipe<any>[]

      One or more behaviors

    Returns this

    this Timeline