gd-sprest-react
Advanced tools
@@ -11,3 +11,2 @@ "use strict"; | ||
exports.FabricWebPart = function (props) { | ||
var element = null; | ||
// The render display component | ||
@@ -14,0 +13,0 @@ var renderDisplay = function (wp) { |
{ | ||
"name": "gd-sprest-react", | ||
"version": "2.9.8", | ||
"version": "2.9.9", | ||
"description": "SharePoint 2013/Online react components.", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
import { IPanelProps } from "office-ui-fabric-react"; | ||
import { Component } from "react"; | ||
@@ -20,2 +21,7 @@ /** | ||
*/ | ||
export interface IBasePanel<Props extends IBasePanelProps = IBasePanelProps, State extends IBasePanelState = IBasePanelState> { } | ||
export interface IBasePanel<Props extends IBasePanelProps = IBasePanelProps, State extends IBasePanelState = IBasePanelState> { } | ||
/** | ||
* Base Panel | ||
*/ | ||
export class BasePanel<Props extends IBasePanelProps = IBasePanelProps, State extends IBasePanelState = IBasePanelState> extends Component<Props, State> implements IBasePanel<Props, State> { } |
export * from "./basePanel"; | ||
export * from "./field"; | ||
export * from "./itemForm"; | ||
export * from "./peoplePicker"; |
import { Types } from "gd-sprest"; | ||
import { Component } from "react"; | ||
import { IAttachmentFile } from "../../fields/types"; | ||
@@ -22,2 +23,7 @@ | ||
/** | ||
* Item Form | ||
*/ | ||
export class ItemForm extends Component<IItemFormProps, IItemFormState> { } | ||
/** | ||
* Properties | ||
@@ -24,0 +30,0 @@ */ |
import { SP } from "gd-sprest-def"; | ||
import { IPeoplePickerProps, IPersonaProps } from "office-ui-fabric-react"; | ||
import { Component } from "react"; | ||
/** | ||
* SharePoint People Picker | ||
*/ | ||
export class SPPeoplePicker extends Component<ISPPeoplePickerProps, ISPPeoplePickerState> { } | ||
/** | ||
* Properties | ||
@@ -6,0 +12,0 @@ */ |
import { Types } from "gd-sprest"; | ||
import { Component } from "react"; | ||
@@ -73,2 +74,5 @@ /** | ||
/** | ||
* Base Field | ||
*/ | ||
export interface IBaseField<Props extends IBaseFieldProps, State extends IBaseFieldState> { | ||
@@ -94,2 +98,27 @@ /** | ||
updateValue: (value: any) => void; | ||
} | ||
/** | ||
* Base Field | ||
*/ | ||
export abstract class BaseField<Props extends IBaseFieldProps = IBaseFieldProps, State extends IBaseFieldState = IBaseFieldState> extends Component<Props, State> implements IBaseField<Props, State> { | ||
/** | ||
* The render field event. | ||
*/ | ||
renderField: () => JSX.Element; | ||
/** | ||
* Method to get the field value. | ||
*/ | ||
getFieldValue: () => any; | ||
/** | ||
* Event triggered after loading the field information. | ||
*/ | ||
onFieldLoaded?: (info: any, state: IBaseFieldState) => void; | ||
/** | ||
* Method to update the value | ||
*/ | ||
updateValue: (value: any) => void; | ||
} |
import { Types } from "gd-sprest"; | ||
import { Component } from "react"; | ||
/** | ||
* Attachments field | ||
*/ | ||
export class FieldAttachments extends Component<IFieldAttachmentsProps, IFieldAttachmentsState> implements IFieldAttachment { | ||
/** | ||
* Refreshes the item attachments. | ||
*/ | ||
refresh: () => PromiseLike<void>; | ||
/** | ||
* Saves the item attachments. | ||
*/ | ||
save: () => PromiseLike<void>; | ||
/** | ||
* Displays the file upload dialog. | ||
*/ | ||
showFileDialog: () => void; | ||
} | ||
/** | ||
* Attachment File | ||
@@ -5,0 +26,0 @@ */ |
import { ICheckboxProps } from "office-ui-fabric-react"; | ||
import { IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
import { BaseField, IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
/** | ||
* Boolean field | ||
*/ | ||
export class FieldBoolean extends BaseField<IFieldBooleanProps, IFieldBooleanState> implements IFieldBoolean { } | ||
/** | ||
* Boolean Field Properties | ||
@@ -23,2 +28,2 @@ */ | ||
*/ | ||
export interface IFieldBoolean extends IBaseField<IFieldBooleanProps, IFieldBooleanState> {} | ||
export interface IFieldBoolean extends IBaseField<IFieldBooleanProps, IFieldBooleanState> { } |
import { Types } from "gd-sprest"; | ||
import { IDropdownOption, IDropdownProps } from "office-ui-fabric-react"; | ||
import { IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
import { BaseField, IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
/** | ||
* Choice field | ||
*/ | ||
export class FieldChoice extends BaseField<IFieldChoiceProps, IFieldChoiceState> implements IFieldChoice { | ||
/** | ||
* Event triggered after the field information is retrieved from SharePoint. | ||
*/ | ||
onFieldLoaded: (fieldInfo: Types.Helper.IListFormChoiceFieldInfo, state: IFieldChoiceState) => void; | ||
} | ||
/** | ||
* Choice Field Properties | ||
@@ -7,0 +17,0 @@ */ |
import { Types } from "gd-sprest"; | ||
import { IDatePickerProps, IDropdownOption, IDropdownProps } from "office-ui-fabric-react"; | ||
import { IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
import { BaseField, IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
/** | ||
* Date Time field | ||
*/ | ||
export class FieldDateTime extends BaseField<IFieldDateTimeProps, IFieldDateTimeState> implements IFieldDateTime { } | ||
/** | ||
* Date/Time Field Properties | ||
@@ -7,0 +12,0 @@ */ |
import { Types } from "gd-sprest"; | ||
import { IDropdownOption, IDropdownProps } from "office-ui-fabric-react"; | ||
import { IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
import { BaseField, IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
/** | ||
* Lookup Field | ||
*/ | ||
export class FieldLookup extends BaseField<IFieldLookupProps, IFieldLookupState> implements IFieldLookup { } | ||
/** | ||
* Lookup Field Properties | ||
@@ -7,0 +12,0 @@ */ |
import { Types } from "gd-sprest"; | ||
import { IDropdownOption, IDropdownProps } from "office-ui-fabric-react"; | ||
import { IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
import { BaseField, IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
/** | ||
* Managed Metadata Field | ||
*/ | ||
export class FieldManagedMetadata extends BaseField<IFieldManagedMetadataProps, IFieldManagedMetadataState> implements IFieldManagedMetadata { } | ||
/** | ||
* Managed Metadata Term Information | ||
@@ -7,0 +12,0 @@ */ |
import { Types } from "gd-sprest"; | ||
import { ITextFieldProps } from "office-ui-fabric-react"; | ||
import { IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
import { BaseField, IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
/** | ||
* Number Field | ||
*/ | ||
export class FieldNumber extends BaseField<IFieldNumberProps, IFieldNumberState> { } | ||
/** | ||
* Number Field Properties | ||
@@ -7,0 +12,0 @@ */ |
import { Types } from "gd-sprest"; | ||
import { ITextFieldProps } from "office-ui-fabric-react"; | ||
import { IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
import { BaseField, IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
/** | ||
* Text Field | ||
*/ | ||
export class FieldText extends BaseField<IFieldTextProps, IFieldTextState> { } | ||
/** | ||
* Text Field Properties | ||
@@ -7,0 +12,0 @@ */ |
import { SP } from "gd-sprest-def"; | ||
import { ITextFieldProps } from "office-ui-fabric-react"; | ||
import { IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
import { BaseField, IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
/** | ||
* URL Field | ||
*/ | ||
export class FieldUrl extends BaseField<IFieldUrlProps, IFieldUrlState> { } | ||
/** | ||
* Url Field Properties | ||
@@ -7,0 +12,0 @@ */ |
import { Types } from "gd-sprest"; | ||
import { IPersonaProps, ILabelProps, IPeoplePickerProps } from "office-ui-fabric-react"; | ||
import { IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
import { BaseField, IBaseField, IBaseFieldProps, IBaseFieldState } from "."; | ||
/** | ||
* User Field | ||
*/ | ||
export class FieldUser extends BaseField<IFieldUserProps, IFieldUserState> { } | ||
/** | ||
* User Field Properties | ||
@@ -7,0 +12,0 @@ */ |
import { Types } from "gd-sprest"; | ||
/** | ||
* Fabric Web Part | ||
*/ | ||
export const FabricWebPart: (props: IFabricWebPartProps) => {}; | ||
/** | ||
* Fabric Web Part Information | ||
@@ -5,0 +10,0 @@ */ |
import { Types } from "gd-sprest"; | ||
import { Component } from "react"; | ||
import { IBasePanel } from "../../components/Types"; | ||
/** | ||
* Web Part Configuration Panel | ||
*/ | ||
export abstract class WebPartCfgPanel<Props extends IWebPartCfgProps = IWebPartCfgProps, State extends IWebPartCfgState = IWebPartCfgState> extends Component<Props, State> implements IWebPartCfgPanel { | ||
_errorMessage: HTMLDivElement; | ||
_panel: IBasePanel; | ||
onRenderContents: (cfg: Types.Helper.IWebPartCfg) => JSX.Element | Array<JSX.Element>; | ||
onRenderFooter: () => JSX.Element | Array<JSX.Element>; | ||
onRenderHeader: () => JSX.Element | Array<JSX.Element>; | ||
saveConfiguration: (wpCfg: Types.Helper.IWebPartCfg) => void; | ||
} | ||
/** | ||
* WebPart Configuration Panel | ||
@@ -6,0 +20,0 @@ */ |
import { Types } from "gd-sprest"; | ||
import { ILabel, ILabelProps, TagPicker, ITag, ITagPickerProps } from "office-ui-fabric-react"; | ||
import { | ||
IWebPartListCfgPanel, | ||
WebPartListCfg, IWebPartListCfgPanel, | ||
IWebPartListCfg, IWebPartListCfgProps, IWebPartListCfgState | ||
@@ -9,6 +9,10 @@ } from "."; | ||
/** | ||
* Field Configuration | ||
* WebPart Field Configuration Panel | ||
*/ | ||
export interface IWebPartFieldCfg extends IWebPartListCfg { | ||
Fields?: Array<Types.SP.IFieldResult>; | ||
export class WebPartFieldCfg<Props extends IWebPartFieldCfgProps = IWebPartFieldCfgProps, State extends IWebPartFieldCfgState = IWebPartFieldCfgState> extends WebPartListCfg<Props, State> implements IWebPartFieldCfgPanel { | ||
_fieldLabel: ILabel; | ||
_fieldPicker: TagPicker; | ||
onFieldPickerDisplay: (tags: Array<ITag>) => void; | ||
renderField: () => Array<JSX.Element>; | ||
} | ||
@@ -28,2 +32,9 @@ | ||
/** | ||
* Field Configuration | ||
*/ | ||
export interface IWebPartFieldCfg extends IWebPartListCfg { | ||
Fields?: Array<Types.SP.IFieldResult>; | ||
} | ||
/** | ||
* Field Configuration Properties | ||
@@ -30,0 +41,0 @@ */ |
import { Types } from "gd-sprest"; | ||
import { Component } from "react"; | ||
import { IWebPartListCfg } from "."; | ||
/** | ||
* WebPart List | ||
*/ | ||
export class WebPartList<Props extends IWebPartListProps = IWebPartListProps, State extends IWebPartListState = IWebPartListState> extends Component<Props, State> { } | ||
/** | ||
* List Item | ||
@@ -6,0 +12,0 @@ */ |
@@ -7,10 +7,21 @@ import { Types } from "gd-sprest"; | ||
} from "office-ui-fabric-react"; | ||
import { IWebPartCfgProps, IWebPartCfgState, IWebPartCfgPanel } from "."; | ||
import { WebPartCfgPanel, IWebPartCfgProps, IWebPartCfgState, IWebPartCfgPanel } from "."; | ||
/** | ||
* List Configuration | ||
* WebPart List Configuration Panel | ||
*/ | ||
export interface IWebPartListCfg extends Types.Helper.IWebPartCfg { | ||
ListName?: string; | ||
WebUrl?: string; | ||
export class WebPartListCfg<Props extends IWebPartListCfgProps = IWebPartListCfgProps, State extends IWebPartListCfgState = IWebPartListCfgState> extends WebPartCfgPanel<Props, State> implements IWebPartListCfgPanel { | ||
_query: Types.SP.ODataQuery; | ||
_listDropdown: IDropdown; | ||
_refreshButton: PrimaryButton; | ||
_saveButton: PrimaryButton; | ||
_webUrl: ITextField; | ||
getList: (option: IDropdownOption) => Types.SP.IListQueryResult; | ||
onListChanged: (state: IWebPartListCfgState, option?: IDropdownOption, idx?: number) => void; | ||
onListsLoaded: (newState: IWebPartListCfgState) => void; | ||
onRefresh: (ev: React.MouseEvent<HTMLButtonElement>) => void; | ||
renderList: () => JSX.Element; | ||
renderSaveButton: () => JSX.Element; | ||
renderWebUrl: () => Array<JSX.Element>; | ||
} | ||
@@ -38,2 +49,10 @@ | ||
/** | ||
* List Configuration | ||
*/ | ||
export interface IWebPartListCfg extends Types.Helper.IWebPartCfg { | ||
ListName?: string; | ||
WebUrl?: string; | ||
} | ||
/** | ||
* List Configuration Properties | ||
@@ -40,0 +59,0 @@ */ |
import { ITag } from "office-ui-fabric-react"; | ||
import { | ||
IWebPartListItem, IWebPartListProps, IWebPartListState, | ||
WebPartList, IWebPartListItem, IWebPartListProps, IWebPartListState, | ||
IWebPartSearchCfg | ||
@@ -8,2 +8,7 @@ } from "."; | ||
/** | ||
* WebPart Search | ||
*/ | ||
export class WebPartSearch<Props extends IWebPartSearchProps = IWebPartSearchProps, State extends IWebPartSearchState = IWebPartSearchState> extends WebPartList<Props, State> { } | ||
/** | ||
* Search Item | ||
@@ -10,0 +15,0 @@ */ |
import { | ||
IWebPartFieldCfg, IWebPartFieldCfgPanel, IWebPartFieldCfgProps, IWebPartFieldCfgState | ||
WebPartFieldCfg, IWebPartFieldCfg, IWebPartFieldCfgPanel, IWebPartFieldCfgProps, IWebPartFieldCfgState | ||
} from "."; | ||
/** | ||
* WebPart Search Configuration Panel | ||
*/ | ||
export class WebPartSearchCfg<Props extends IWebPartSearchCfgProps = IWebPartSearchCfgProps, State extends IWebPartSearchCfgState = IWebPartSearchCfgState> extends WebPartFieldCfg<Props, State> { } | ||
/** | ||
* Search Configuration | ||
@@ -7,0 +12,0 @@ */ |
import { IPivotItemProps, IRenderFunction, PivotLinkFormat, PivotLinkSize } from "office-ui-fabric-react"; | ||
import { Component } from "react"; | ||
import { IWebPartCfgProps } from "."; | ||
/** | ||
* WebPart Tabs | ||
*/ | ||
export class WebPartTabs<Props extends IWebPartTabsProps = IWebPartTabsProps, State extends IWebPartTabsState = IWebPartTabsState> extends Component<Props, State> { } | ||
/** | ||
* WebPart Tabs Props | ||
@@ -6,0 +12,0 @@ */ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
385652
1.67%91
1.11%9628
1.71%