gd-sprest-bs 8.3.2 → 8.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gd-sprest-bs.d.ts +747 -743
- package/docs/assets/search.js +1 -1
- package/docs/index.html +1 -1
- package/docs/interfaces/components.IAccordion.html +13 -0
- package/docs/interfaces/components.IAccordionItem.html +3 -0
- package/docs/interfaces/components.IAccordionOptions.html +3 -0
- package/docs/interfaces/components.IAccordionProps.html +9 -0
- package/docs/interfaces/{core.Components.IAlert.html → components.IAlert.html} +4 -4
- package/docs/interfaces/components.IAlertProps.html +9 -0
- package/docs/interfaces/components.IBadge.html +13 -0
- package/docs/interfaces/components.IBadgeProps.html +9 -0
- package/docs/interfaces/{core.Components.IBreadcrumb.html → components.IBreadcrumb.html} +3 -3
- package/docs/interfaces/components.IBreadcrumbItem.html +11 -0
- package/docs/interfaces/components.IBreadcrumbProps.html +13 -0
- package/docs/interfaces/{core.Components.IButton.html → components.IButton.html} +3 -3
- package/docs/interfaces/{core.Components.IButtonGroup.html → components.IButtonGroup.html} +3 -3
- package/docs/interfaces/components.IButtonGroupProps.html +9 -0
- package/docs/interfaces/components.IButtonProps.html +9 -0
- package/docs/interfaces/{core.Components.ICard.html → components.ICard.html} +3 -3
- package/docs/interfaces/components.ICardAction.html +3 -0
- package/docs/interfaces/components.ICardBody.html +3 -0
- package/docs/interfaces/components.ICardFooter.html +3 -0
- package/docs/interfaces/{core.Components.ICardGroup.html → components.ICardGroup.html} +3 -3
- package/docs/interfaces/components.ICardGroupProps.html +9 -0
- package/docs/interfaces/components.ICardHeader.html +3 -0
- package/docs/interfaces/components.ICardProps.html +9 -0
- package/docs/interfaces/{core.Components.ICarousel.html → components.ICarousel.html} +3 -3
- package/docs/interfaces/components.ICarouselItem.html +3 -0
- package/docs/interfaces/components.ICarouselOptions.html +3 -0
- package/docs/interfaces/components.ICarouselProps.html +9 -0
- package/docs/interfaces/components.ICheckboxGroup.html +13 -0
- package/docs/interfaces/components.ICheckboxGroupItem.html +3 -0
- package/docs/interfaces/components.ICheckboxGroupProps.html +9 -0
- package/docs/interfaces/{core.Components.ICollapse.html → components.ICollapse.html} +3 -3
- package/docs/interfaces/components.ICollapseOptions.html +3 -0
- package/docs/interfaces/components.ICollapseProps.html +9 -0
- package/docs/interfaces/components.IDropdown.html +29 -0
- package/docs/interfaces/components.IDropdownItem.html +3 -0
- package/docs/interfaces/components.IDropdownProps.html +9 -0
- package/docs/interfaces/components.IForm.html +21 -0
- package/docs/interfaces/components.IFormColumn.html +3 -0
- package/docs/interfaces/components.IFormControl.html +3 -0
- package/docs/interfaces/components.IFormControlProps.html +9 -0
- package/docs/interfaces/components.IFormControlPropsCheckbox.html +9 -0
- package/docs/interfaces/components.IFormControlPropsDropdown.html +9 -0
- package/docs/interfaces/components.IFormControlPropsListBox.html +9 -0
- package/docs/interfaces/components.IFormControlPropsMultiCheckbox.html +9 -0
- package/docs/interfaces/components.IFormControlPropsMultiDropdown.html +9 -0
- package/docs/interfaces/components.IFormControlPropsMultiListBox.html +9 -0
- package/docs/interfaces/components.IFormControlPropsMultiSwitch.html +9 -0
- package/docs/interfaces/components.IFormControlPropsNumberField.html +9 -0
- package/docs/interfaces/components.IFormControlPropsRange.html +9 -0
- package/docs/interfaces/components.IFormControlPropsSwitch.html +9 -0
- package/docs/interfaces/components.IFormControlPropsTextField.html +9 -0
- package/docs/interfaces/components.IFormControlValidationResult.html +3 -0
- package/docs/interfaces/components.IFormProps.html +9 -0
- package/docs/interfaces/components.IFormRow.html +3 -0
- package/docs/interfaces/{core.Components.IInputGroup.html → components.IInputGroup.html} +3 -3
- package/docs/interfaces/components.IInputGroupProps.html +9 -0
- package/docs/interfaces/{core.Components.IJumbotron.html → components.IJumbotron.html} +3 -3
- package/docs/interfaces/{core.Components.IJumbotronProps.html → components.IJumbotronProps.html} +3 -3
- package/docs/interfaces/components.IListBox.html +17 -0
- package/docs/interfaces/components.IListBoxProps.html +3 -0
- package/docs/interfaces/{core.Components.IListGroup.html → components.IListGroup.html} +3 -3
- package/docs/interfaces/components.IListGroupItem.html +3 -0
- package/docs/interfaces/components.IListGroupProps.html +9 -0
- package/docs/interfaces/{core.Components.IModal.html → components.IModal.html} +3 -3
- package/docs/interfaces/{core.Components.IModalOptions.html → components.IModalOptions.html} +3 -3
- package/docs/interfaces/components.IModalProps.html +9 -0
- package/docs/interfaces/{core.Components.INav.html → components.INav.html} +3 -3
- package/docs/interfaces/components.INavLink.html +3 -0
- package/docs/interfaces/components.INavLinkProps.html +7 -0
- package/docs/interfaces/components.INavProps.html +9 -0
- package/docs/interfaces/{core.Components.INavbar.html → components.INavbar.html} +3 -3
- package/docs/interfaces/components.INavbarItem.html +3 -0
- package/docs/interfaces/components.INavbarProps.html +9 -0
- package/docs/interfaces/components.INavbarSearchBox.html +3 -0
- package/docs/interfaces/{core.Components.IOffcanvas.html → components.IOffcanvas.html} +3 -3
- package/docs/interfaces/{core.Components.IOffcanvasOptions.html → components.IOffcanvasOptions.html} +3 -3
- package/docs/interfaces/components.IOffcanvasProps.html +9 -0
- package/docs/interfaces/{core.Components.IPagination.html → components.IPagination.html} +3 -3
- package/docs/interfaces/{core.Components.IPaginationProps.html → components.IPaginationProps.html} +3 -3
- package/docs/interfaces/{core.Components.IPopover.html → components.IPopover.html} +3 -3
- package/docs/interfaces/components.IPopoverProps.html +9 -0
- package/docs/interfaces/{core.Components.IProgress.html → components.IProgress.html} +3 -3
- package/docs/interfaces/{core.Components.IProgressGroup.html → components.IProgressGroup.html} +3 -3
- package/docs/interfaces/components.IProgressGroupProps.html +9 -0
- package/docs/interfaces/{core.Components.IProgressProps.html → components.IProgressProps.html} +3 -3
- package/docs/interfaces/{core.Components.ISpinner.html → components.ISpinner.html} +3 -3
- package/docs/interfaces/{core.Components.ISpinnerProps.html → components.ISpinnerProps.html} +3 -3
- package/docs/interfaces/components.ITable.html +7 -0
- package/docs/interfaces/components.ITableColumn.html +3 -0
- package/docs/interfaces/components.ITableProps.html +9 -0
- package/docs/interfaces/{core.Components.IToast.html → components.IToast.html} +3 -3
- package/docs/interfaces/components.IToastOptions.html +3 -0
- package/docs/interfaces/{core.Components.IToastProps.html → components.IToastProps.html} +4 -4
- package/docs/interfaces/{core.Components.IToolbar.html → components.IToolbar.html} +3 -3
- package/docs/interfaces/components.IToolbarItem.html +3 -0
- package/docs/interfaces/components.IToolbarProps.html +9 -0
- package/docs/interfaces/{core.Components.ITooltip.html → components.ITooltip.html} +3 -3
- package/docs/interfaces/components.ITooltipProps.html +9 -0
- package/docs/interfaces/datetime_types.IDateTime.html +6 -6
- package/docs/interfaces/datetime_types.IDateTimeProps.html +9 -9
- package/docs/interfaces/datetime_types.IFormControlPropsDateTime.html +7 -7
- package/docs/interfaces/field_types.IField.html +1 -1
- package/docs/interfaces/field_types.IFieldProps.html +1 -1
- package/docs/interfaces/field_types.IFieldValue.html +1 -1
- package/docs/interfaces/listFormDialog_types.IListFormDialog.html +10 -10
- package/docs/interfaces/listFormDialog_types.IListFormDialogProps.html +13 -13
- package/docs/interfaces/listForm_types.IListForm.html +3 -3
- package/docs/interfaces/listForm_types.IListFormAttachmentsProps.html +4 -4
- package/docs/interfaces/listForm_types.IListFormDisplay.html +2 -2
- package/docs/interfaces/listForm_types.IListFormDisplayProps.html +10 -10
- package/docs/interfaces/listForm_types.IListFormEdit.html +8 -8
- package/docs/interfaces/listForm_types.IListFormEditProps.html +13 -13
- package/docs/interfaces/peoplePicker_types.IFormControlPropsPeoplePicker.html +4 -4
- package/docs/interfaces/peoplePicker_types.IPeoplePicker.html +4 -4
- package/docs/interfaces/peoplePicker_types.IPeoplePickerProps.html +14 -14
- package/docs/interfaces/types.IFormControlTypes.html +1 -0
- package/docs/modules/components.html +280 -0
- package/docs/modules/core.Components.html +1 -280
- package/docs/modules/core.html +1 -1
- package/docs/modules/datetime.html +2 -2
- package/docs/modules/datetime_types.html +2 -2
- package/docs/modules/field.html +2 -2
- package/docs/modules/field_types.html +2 -2
- package/docs/modules/index.html +1 -1
- package/docs/modules/listForm.html +1 -1
- package/docs/modules/listFormDialog.html +2 -2
- package/docs/modules/listFormDialog_types.html +2 -2
- package/docs/modules/listForm_types.html +2 -2
- package/docs/modules/peoplePicker.html +2 -2
- package/docs/modules/peoplePicker_types.html +2 -2
- package/docs/modules/types.html +1 -0
- package/docs/modules.html +1 -1
- package/package.json +1 -1
- package/src/components/components.d.ts +6 -0
- package/src/components/types.d.ts +10 -0
- package/src/index.d.ts +2 -2
- package/src/rest.d.ts +2 -2
- package/src/webparts/{index.d.ts → types.d.ts} +0 -0
- package/docs/interfaces/core.Components.IAccordion.html +0 -13
- package/docs/interfaces/core.Components.IAccordionItem.html +0 -3
- package/docs/interfaces/core.Components.IAccordionOptions.html +0 -3
- package/docs/interfaces/core.Components.IAccordionProps.html +0 -9
- package/docs/interfaces/core.Components.IAlertProps.html +0 -9
- package/docs/interfaces/core.Components.IBadge.html +0 -13
- package/docs/interfaces/core.Components.IBadgeProps.html +0 -9
- package/docs/interfaces/core.Components.IBreadcrumbItem.html +0 -11
- package/docs/interfaces/core.Components.IBreadcrumbProps.html +0 -13
- package/docs/interfaces/core.Components.IButtonGroupProps.html +0 -9
- package/docs/interfaces/core.Components.IButtonProps.html +0 -9
- package/docs/interfaces/core.Components.ICardAction.html +0 -3
- package/docs/interfaces/core.Components.ICardBody.html +0 -3
- package/docs/interfaces/core.Components.ICardFooter.html +0 -3
- package/docs/interfaces/core.Components.ICardGroupProps.html +0 -9
- package/docs/interfaces/core.Components.ICardHeader.html +0 -3
- package/docs/interfaces/core.Components.ICardProps.html +0 -9
- package/docs/interfaces/core.Components.ICarouselItem.html +0 -3
- package/docs/interfaces/core.Components.ICarouselOptions.html +0 -3
- package/docs/interfaces/core.Components.ICarouselProps.html +0 -9
- package/docs/interfaces/core.Components.ICheckboxGroup.html +0 -13
- package/docs/interfaces/core.Components.ICheckboxGroupItem.html +0 -3
- package/docs/interfaces/core.Components.ICheckboxGroupProps.html +0 -9
- package/docs/interfaces/core.Components.ICollapseOptions.html +0 -3
- package/docs/interfaces/core.Components.ICollapseProps.html +0 -9
- package/docs/interfaces/core.Components.IDropdown.html +0 -29
- package/docs/interfaces/core.Components.IDropdownItem.html +0 -3
- package/docs/interfaces/core.Components.IDropdownProps.html +0 -9
- package/docs/interfaces/core.Components.IForm.html +0 -21
- package/docs/interfaces/core.Components.IFormColumn.html +0 -3
- package/docs/interfaces/core.Components.IFormControl.html +0 -3
- package/docs/interfaces/core.Components.IFormControlProps.html +0 -9
- package/docs/interfaces/core.Components.IFormControlPropsCheckbox.html +0 -9
- package/docs/interfaces/core.Components.IFormControlPropsDropdown.html +0 -9
- package/docs/interfaces/core.Components.IFormControlPropsListBox.html +0 -9
- package/docs/interfaces/core.Components.IFormControlPropsMultiCheckbox.html +0 -9
- package/docs/interfaces/core.Components.IFormControlPropsMultiDropdown.html +0 -9
- package/docs/interfaces/core.Components.IFormControlPropsMultiListBox.html +0 -9
- package/docs/interfaces/core.Components.IFormControlPropsMultiSwitch.html +0 -9
- package/docs/interfaces/core.Components.IFormControlPropsNumberField.html +0 -9
- package/docs/interfaces/core.Components.IFormControlPropsRange.html +0 -9
- package/docs/interfaces/core.Components.IFormControlPropsSwitch.html +0 -9
- package/docs/interfaces/core.Components.IFormControlPropsTextField.html +0 -9
- package/docs/interfaces/core.Components.IFormControlValidationResult.html +0 -3
- package/docs/interfaces/core.Components.IFormProps.html +0 -9
- package/docs/interfaces/core.Components.IFormRow.html +0 -3
- package/docs/interfaces/core.Components.IInputGroupProps.html +0 -9
- package/docs/interfaces/core.Components.IListBox.html +0 -17
- package/docs/interfaces/core.Components.IListBoxProps.html +0 -3
- package/docs/interfaces/core.Components.IListGroupItem.html +0 -3
- package/docs/interfaces/core.Components.IListGroupProps.html +0 -9
- package/docs/interfaces/core.Components.IModalProps.html +0 -9
- package/docs/interfaces/core.Components.INavLink.html +0 -3
- package/docs/interfaces/core.Components.INavLinkProps.html +0 -7
- package/docs/interfaces/core.Components.INavProps.html +0 -9
- package/docs/interfaces/core.Components.INavbarItem.html +0 -3
- package/docs/interfaces/core.Components.INavbarProps.html +0 -9
- package/docs/interfaces/core.Components.INavbarSearchBox.html +0 -3
- package/docs/interfaces/core.Components.IOffcanvasProps.html +0 -9
- package/docs/interfaces/core.Components.IPopoverProps.html +0 -9
- package/docs/interfaces/core.Components.IProgressGroupProps.html +0 -9
- package/docs/interfaces/core.Components.ITable.html +0 -7
- package/docs/interfaces/core.Components.ITableColumn.html +0 -3
- package/docs/interfaces/core.Components.ITableProps.html +0 -9
- package/docs/interfaces/core.Components.IToastOptions.html +0 -3
- package/docs/interfaces/core.Components.IToolbarItem.html +0 -3
- package/docs/interfaces/core.Components.IToolbarProps.html +0 -9
- package/docs/interfaces/core.Components.ITooltipProps.html +0 -9
- package/src/components/index.d.ts +0 -14
package/dist/gd-sprest-bs.d.ts
CHANGED
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
// Dependencies for this module:
|
|
3
3
|
// ../gd-bs
|
|
4
4
|
// ../gd-sprest
|
|
5
|
-
// ../gd-bs/src/components/types
|
|
6
5
|
// ../gd-bs/src/components/form/controlTypes
|
|
6
|
+
// ../gd-bs/src/components/components
|
|
7
7
|
// ../gd-bs/src/components/form/formTypes
|
|
8
|
-
// ../gd-bs/src/components/modal/types
|
|
9
|
-
// ../gd-bs/src/components/toolbar/types
|
|
10
8
|
// ../gd-bs/src/components/button/types
|
|
11
9
|
// ../gd-bs/src/components/nav/types
|
|
10
|
+
// ../gd-bs/src/components/modal/types
|
|
11
|
+
// ../gd-bs/src/components/toolbar/types
|
|
12
12
|
|
|
13
13
|
declare module 'gd-sprest-bs' {
|
|
14
14
|
export * from "gd-bs";
|
|
15
15
|
export * from "gd-sprest";
|
|
16
16
|
|
|
17
|
-
import { Components } from "gd-sprest-bs/components";
|
|
18
|
-
import * as WebParts from "gd-sprest-bs/webparts";
|
|
17
|
+
import { Components } from "gd-sprest-bs/components/types";
|
|
18
|
+
import * as WebParts from "gd-sprest-bs/webparts/types";
|
|
19
19
|
export {
|
|
20
20
|
Components,
|
|
21
21
|
WebParts
|
|
@@ -25,13 +25,8 @@ declare module 'gd-sprest-bs' {
|
|
|
25
25
|
export const $REST: IRESTBS;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
declare module 'gd-sprest-bs/components' {
|
|
29
|
-
export * from "gd-bs/
|
|
30
|
-
export * from "gd-sprest-bs/components/datetime/types";
|
|
31
|
-
export * from "gd-sprest-bs/components/field/types";
|
|
32
|
-
export * from "gd-sprest-bs/components/listForm/types";
|
|
33
|
-
export * from "gd-sprest-bs/components/listFormDialog/types";
|
|
34
|
-
export * from "gd-sprest-bs/components/peoplePicker/types";
|
|
28
|
+
declare module 'gd-sprest-bs/components/types' {
|
|
29
|
+
export * as Components from "gd-sprest-bs/components/components";
|
|
35
30
|
|
|
36
31
|
import { IFormControlTypes as Parent } from "gd-bs/src/components/form/controlTypes";
|
|
37
32
|
export interface IFormControlTypes extends Parent {
|
|
@@ -41,7 +36,7 @@ declare module 'gd-sprest-bs/components' {
|
|
|
41
36
|
export const FormControlTypes: IFormControlTypes;
|
|
42
37
|
}
|
|
43
38
|
|
|
44
|
-
declare module 'gd-sprest-bs/webparts' {
|
|
39
|
+
declare module 'gd-sprest-bs/webparts/types' {
|
|
45
40
|
export * from "gd-sprest-bs/webparts/base/helperTypes";
|
|
46
41
|
export * from "gd-sprest-bs/webparts/base/types";
|
|
47
42
|
export * from "gd-sprest-bs/webparts/list/types";
|
|
@@ -54,8 +49,8 @@ declare module 'gd-sprest-bs/webparts' {
|
|
|
54
49
|
declare module 'gd-sprest-bs/rest' {
|
|
55
50
|
import { IconTypes, Icons } from "gd-bs";
|
|
56
51
|
import { IREST } from "gd-sprest";
|
|
57
|
-
import * as Components from "gd-sprest-bs/components";
|
|
58
|
-
import * as WebParts from "gd-sprest-bs/webparts";
|
|
52
|
+
import * as Components from "gd-sprest-bs/components/types";
|
|
53
|
+
import * as WebParts from "gd-sprest-bs/webparts/types";
|
|
59
54
|
|
|
60
55
|
/**
|
|
61
56
|
* $REST Bootstrap Library
|
|
@@ -67,1041 +62,1050 @@ declare module 'gd-sprest-bs/rest' {
|
|
|
67
62
|
}
|
|
68
63
|
}
|
|
69
64
|
|
|
70
|
-
declare module 'gd-sprest-bs/components/
|
|
65
|
+
declare module 'gd-sprest-bs/components/components' {
|
|
66
|
+
export * from "gd-bs/src/components/components";
|
|
67
|
+
export * from "gd-sprest-bs/components/datetime/types";
|
|
68
|
+
export * from "gd-sprest-bs/components/field/types";
|
|
69
|
+
export * from "gd-sprest-bs/components/listForm/types";
|
|
70
|
+
export * from "gd-sprest-bs/components/listFormDialog/types";
|
|
71
|
+
export * from "gd-sprest-bs/components/peoplePicker/types";
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
declare module 'gd-sprest-bs/webparts/base/helperTypes' {
|
|
71
75
|
import { IFormControlProps } from "gd-bs/src/components/form/controlTypes";
|
|
76
|
+
import { IForm } from "gd-bs/src/components/form/formTypes";
|
|
77
|
+
import { IWebPartInfo } from "gd-sprest-bs/webparts/base/types";
|
|
72
78
|
|
|
73
79
|
/**
|
|
74
|
-
*
|
|
75
|
-
*/
|
|
76
|
-
export const DateTime: (props: IDateTimeProps) => IDateTime
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Date/Time
|
|
80
|
+
* Helper Methods
|
|
80
81
|
*/
|
|
81
|
-
export
|
|
82
|
-
/** The date/time picker element. */
|
|
83
|
-
el: HTMLDivElement;
|
|
84
|
-
|
|
85
|
-
/** The flatpickr object. */
|
|
86
|
-
flatpickrObj: any;
|
|
87
|
-
|
|
88
|
-
/** Returns the date as a Date/Time object. */
|
|
89
|
-
getDate: () => Date;
|
|
90
|
-
|
|
91
|
-
/** Method to get the value. */
|
|
92
|
-
getValue: () => string;
|
|
93
|
-
|
|
94
|
-
/** Method to set the value. */
|
|
95
|
-
setValue: (dt: string | Date, dtFormat?: string) => void;
|
|
96
|
-
}
|
|
82
|
+
export const Helper: IHelper;
|
|
97
83
|
|
|
98
84
|
/**
|
|
99
|
-
*
|
|
85
|
+
* Helper Methods
|
|
100
86
|
*/
|
|
101
|
-
export interface
|
|
102
|
-
/**
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
/** The element to render the form to. */
|
|
109
|
-
el?: Element;
|
|
87
|
+
export interface IHelper {
|
|
88
|
+
/**
|
|
89
|
+
* Method to get the webpart
|
|
90
|
+
* @param wpId - The webpart id.
|
|
91
|
+
*/
|
|
92
|
+
getWebPart(wpId: string): PromiseLike<IWPInstance>;
|
|
110
93
|
|
|
111
|
-
/**
|
|
112
|
-
|
|
94
|
+
/**
|
|
95
|
+
* Method to get the webpart id for a specified element
|
|
96
|
+
* @param el - The target element.
|
|
97
|
+
*/
|
|
98
|
+
getWebPartId(el: HTMLElement): string;
|
|
113
99
|
|
|
114
|
-
/**
|
|
115
|
-
|
|
100
|
+
/**
|
|
101
|
+
* Method to render the edit form.
|
|
102
|
+
* @param el - The element to render the form to.
|
|
103
|
+
* @param wpCfg - The webpart configuration information.
|
|
104
|
+
* @param formControls - The form controls to render.
|
|
105
|
+
*/
|
|
106
|
+
renderEditForm: (el: HTMLElement, wpCfg: IWebPartCfg, formControls: Array<IFormControlProps>) => IForm;
|
|
116
107
|
|
|
117
|
-
/**
|
|
118
|
-
|
|
108
|
+
/**
|
|
109
|
+
* Method to save the webpart configuration.
|
|
110
|
+
* This method may execute a postback, based on the page type.
|
|
111
|
+
* @param wpId - The webpart id.
|
|
112
|
+
* @param cfgId: The configuration element id.
|
|
113
|
+
* @param wpCfg - The webpart configuration.
|
|
114
|
+
*/
|
|
115
|
+
saveConfiguration(wpId: string, cfgId?: string, wpCfg?: any): PromiseLike<void>;
|
|
119
116
|
|
|
120
|
-
/**
|
|
121
|
-
|
|
117
|
+
/**
|
|
118
|
+
* Method to update the configuration element
|
|
119
|
+
* @param cfgId: The configuration element id.
|
|
120
|
+
* @param elTarget - The target element.
|
|
121
|
+
* @param wpCfg - The webpart configuration.
|
|
122
|
+
*/
|
|
123
|
+
updateConfigurationInElement(cfgId: string, elTarget: HTMLInputElement, wpCfg);
|
|
122
124
|
|
|
123
|
-
/**
|
|
124
|
-
|
|
125
|
+
/**
|
|
126
|
+
* Method to update the webpart content elements
|
|
127
|
+
* @param wpId - The webpart id.
|
|
128
|
+
* @param cfgId: The configuration element id.
|
|
129
|
+
* @param wpCfg - The webpart configuration.
|
|
130
|
+
*/
|
|
131
|
+
updateWebPartContentElements(wpId: string, cfgId?: string, wpCfg?: any): boolean;
|
|
125
132
|
}
|
|
126
133
|
|
|
127
134
|
/**
|
|
128
|
-
*
|
|
135
|
+
* WebPart Information
|
|
129
136
|
*/
|
|
130
|
-
export interface
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
showTime?: boolean;
|
|
136
|
-
|
|
137
|
-
/** The date/time value. */
|
|
138
|
-
value?: string;
|
|
137
|
+
export interface IWPInstance {
|
|
138
|
+
Context: any;
|
|
139
|
+
Properties: any;
|
|
140
|
+
WebPart: any;
|
|
141
|
+
WebPartDefinition: any;
|
|
139
142
|
}
|
|
140
143
|
}
|
|
141
144
|
|
|
142
|
-
declare module 'gd-sprest-bs/
|
|
143
|
-
import {
|
|
144
|
-
import { IFormControl, IFormControlProps
|
|
145
|
+
declare module 'gd-sprest-bs/webparts/base/types' {
|
|
146
|
+
import { IButtonProps } from "gd-bs/src/components/button/types";
|
|
147
|
+
import { IFormControl, IFormControlProps } from "gd-bs/src/components/form/controlTypes";
|
|
148
|
+
import { IForm } from "gd-bs/src/components/form/formTypes";
|
|
145
149
|
|
|
146
150
|
/**
|
|
147
|
-
*
|
|
151
|
+
* ### Web Part
|
|
152
|
+
*
|
|
153
|
+
* The client-side webpart component can be used to control what is displayed when a page is being edited and displayed. An optional hidden configuration element can be utilized to store a custom configuration.
|
|
154
|
+
*
|
|
155
|
+
* ```ts
|
|
156
|
+
* import { WebParts } from "gd-sprest-bs";
|
|
157
|
+
*
|
|
158
|
+
* // Create the webpart
|
|
159
|
+
* WebParts.WebPart({
|
|
160
|
+
* elementId: "my-wp",
|
|
161
|
+
* cfgElementId: "my-wp-cfg",
|
|
162
|
+
* onRenderDisplay: (wpInfo) => {
|
|
163
|
+
* // Render the display element
|
|
164
|
+
* wpInfo.el.innerHTML = '<h1>Hello Display Mode</h1>';
|
|
165
|
+
* },
|
|
166
|
+
* onRenderEdit: (wpInfo) => {
|
|
167
|
+
* // Render the edit element
|
|
168
|
+
* wpInfo.el.innerHTML = '<h1>Hello Edit Mode</h1>';
|
|
169
|
+
* }
|
|
170
|
+
* });
|
|
171
|
+
* ```
|
|
148
172
|
*/
|
|
149
|
-
export const
|
|
173
|
+
export const WebPart: (props: IWebPartProps) => IWebPart;
|
|
150
174
|
|
|
151
175
|
/**
|
|
152
|
-
*
|
|
176
|
+
* WebPart
|
|
153
177
|
*/
|
|
154
|
-
export interface
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
getValue: () => IFieldValue;
|
|
158
|
-
isValid: () => boolean;
|
|
159
|
-
}
|
|
178
|
+
export interface IWebPart<IWPCfg = IWebPartCfg, IWPInfo = IWebPartInfo> {
|
|
179
|
+
/** The webpart configuration. */
|
|
180
|
+
cfg: IWPCfg;
|
|
160
181
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
*/
|
|
164
|
-
export interface IFieldProps {
|
|
165
|
-
assignTo?: (obj: IField) => void;
|
|
166
|
-
controlMode?: number;
|
|
167
|
-
errorMessage?: string;
|
|
168
|
-
field: Types.SP.Field;
|
|
169
|
-
listInfo: Helper.IListFormResult;
|
|
170
|
-
lookupFilter?: string;
|
|
171
|
-
onError?: (msg: string) => void;
|
|
172
|
-
onControlRendered?: (control: IFormControl, field: Types.SP.Field) => void | Promise<IFormControl>;
|
|
173
|
-
onControlRendering?: (control: IFormControlProps, field: Types.SP.Field) => void | Promise<IFormControlProps>;
|
|
174
|
-
onValidate?: (field: Types.SP.Field, control: IFormControl, value: IFormControlValidationResult) => boolean | IFormControlValidationResult;
|
|
175
|
-
value?: any;
|
|
176
|
-
}
|
|
182
|
+
/** The webpart information. */
|
|
183
|
+
info: IWPInfo;
|
|
177
184
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
*/
|
|
181
|
-
export interface IFieldValue {
|
|
182
|
-
name: string;
|
|
183
|
-
value: any;
|
|
185
|
+
/** Method to update the edit form. */
|
|
186
|
+
updateEditForm?: (formControls: Array<IFormControl>) => void;
|
|
184
187
|
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
declare module 'gd-sprest-bs/components/listForm/types' {
|
|
188
|
-
import { IFormControl, IFormControlProps } from "gd-bs/src/components/form/controlTypes";
|
|
189
|
-
import { IForm, IFormRow } from "gd-bs/src/components/form/formTypes";
|
|
190
|
-
import { Helper, Types } from "gd-sprest";
|
|
191
188
|
|
|
192
189
|
/**
|
|
193
|
-
*
|
|
190
|
+
* WebPart Information
|
|
194
191
|
*/
|
|
195
|
-
export
|
|
192
|
+
export interface IWebPartInfo<IWPCfg = IWebPartCfg> {
|
|
193
|
+
/** The configuration */
|
|
194
|
+
cfg: IWPCfg;
|
|
196
195
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
*/
|
|
200
|
-
export interface IListForm extends Helper.IListForm {
|
|
201
|
-
/**
|
|
202
|
-
* Method to render the display form template.
|
|
203
|
-
* @param props - The display form properties.
|
|
204
|
-
*/
|
|
205
|
-
renderDisplayForm(props: IListFormDisplayProps): IListFormDisplay;
|
|
196
|
+
/** The element to render the webpart to */
|
|
197
|
+
el: HTMLElement;
|
|
206
198
|
|
|
207
|
-
/**
|
|
208
|
-
|
|
209
|
-
* @param props - The edit/new form properties.
|
|
210
|
-
*/
|
|
211
|
-
renderEditForm(props: IListFormEditProps): IListFormEdit;
|
|
199
|
+
/** The webpart id */
|
|
200
|
+
wpId: string;
|
|
212
201
|
}
|
|
213
202
|
|
|
214
203
|
/**
|
|
215
|
-
*
|
|
204
|
+
* WebPart Object
|
|
216
205
|
*/
|
|
217
|
-
export interface
|
|
218
|
-
/** The
|
|
219
|
-
|
|
206
|
+
export interface IWebPartObject {
|
|
207
|
+
/** The JSOM context object */
|
|
208
|
+
Context: any;
|
|
220
209
|
|
|
221
|
-
/** The
|
|
222
|
-
|
|
210
|
+
/** The webpart properties object */
|
|
211
|
+
Properties: any;
|
|
223
212
|
|
|
224
|
-
/** The
|
|
225
|
-
|
|
226
|
-
}
|
|
213
|
+
/** The webpart id */
|
|
214
|
+
WebPartId: string;
|
|
227
215
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
el: HTMLFormElement;
|
|
216
|
+
/** The webpart html element */
|
|
217
|
+
WebPart: HTMLElement;
|
|
218
|
+
|
|
219
|
+
/** The webpart definition object */
|
|
220
|
+
WebPartDefinition: any;
|
|
234
221
|
}
|
|
235
222
|
|
|
236
223
|
/**
|
|
237
|
-
*
|
|
224
|
+
* WebPart Properties
|
|
238
225
|
*/
|
|
239
|
-
export interface
|
|
240
|
-
/**
|
|
241
|
-
|
|
226
|
+
export interface IWebPartProps<IWPInfo = IWebPartInfo, IWPEditForm = IWebPartEditForm> {
|
|
227
|
+
/** The optional configuration element */
|
|
228
|
+
cfgElementId?: string;
|
|
242
229
|
|
|
243
|
-
/** The
|
|
230
|
+
/** The class name. */
|
|
244
231
|
className?: string;
|
|
245
232
|
|
|
246
|
-
/** The
|
|
247
|
-
|
|
233
|
+
/** The target element id to render the webpart to */
|
|
234
|
+
elementId?: string;
|
|
248
235
|
|
|
249
|
-
/** The form
|
|
250
|
-
|
|
236
|
+
/** The edit form */
|
|
237
|
+
editForm?: IWPEditForm;
|
|
251
238
|
|
|
252
|
-
/** The
|
|
253
|
-
|
|
239
|
+
/** The optional help link properties */
|
|
240
|
+
helpProps?: {
|
|
241
|
+
/** The link title */
|
|
242
|
+
title?: string;
|
|
254
243
|
|
|
255
|
-
|
|
256
|
-
|
|
244
|
+
/** The link url */
|
|
245
|
+
url: string;
|
|
246
|
+
};
|
|
257
247
|
|
|
258
|
-
/** The
|
|
259
|
-
|
|
248
|
+
/** The post render event */
|
|
249
|
+
onPostRender?: (wp: IWPInfo, ...args) => void;
|
|
260
250
|
|
|
261
|
-
/** The
|
|
262
|
-
|
|
251
|
+
/** The render event triggered when the page is in 'Display' mode */
|
|
252
|
+
onRenderDisplay?: (wp: IWPInfo) => any;
|
|
263
253
|
|
|
264
|
-
/** The
|
|
265
|
-
|
|
254
|
+
/** The render event triggered when the page is in 'Edit' mode */
|
|
255
|
+
onRenderEdit?: (wp: IWPInfo) => any;
|
|
256
|
+
|
|
257
|
+
/** The render form event triggered when the form is created */
|
|
258
|
+
onRenderForm?: (form: IForm, wp?: IWPInfo) => any;
|
|
259
|
+
|
|
260
|
+
/** The webpart class name */
|
|
261
|
+
wpClassName?: string;
|
|
266
262
|
}
|
|
267
263
|
|
|
268
264
|
/**
|
|
269
|
-
*
|
|
265
|
+
* WebPart Configuration
|
|
270
266
|
*/
|
|
271
|
-
export
|
|
272
|
-
/**
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
/** Appends rows to the form */
|
|
276
|
-
appendRows(rows: Array<IFormRow>);
|
|
277
|
-
|
|
278
|
-
/** The form element. */
|
|
279
|
-
el: HTMLFormElement;
|
|
280
|
-
|
|
281
|
-
/** Method to get a control by field name */
|
|
282
|
-
getControl(fieldName: string): IFormControl;
|
|
283
|
-
|
|
284
|
-
/** Method to get the form values */
|
|
285
|
-
getValues(): { [key: string]: any }
|
|
286
|
-
|
|
287
|
-
/** Method to determine if the field is valid */
|
|
288
|
-
isValid(): boolean;
|
|
267
|
+
export const WPCfg: (cfg: IWebPartCfg, props: IWebPartProps) => {
|
|
268
|
+
/** Method to render the edit form. */
|
|
269
|
+
renderForm?: (formControls: Array<IFormControl>) => void;
|
|
270
|
+
};
|
|
289
271
|
|
|
290
|
-
|
|
291
|
-
|
|
272
|
+
/**
|
|
273
|
+
* WebPart Configuration
|
|
274
|
+
*/
|
|
275
|
+
export interface IWebPartCfg {
|
|
276
|
+
/** The webpart id */
|
|
277
|
+
WebPartId?: string;
|
|
292
278
|
}
|
|
293
279
|
|
|
294
280
|
/**
|
|
295
|
-
*
|
|
281
|
+
* WebPart Edit Form
|
|
296
282
|
*/
|
|
297
|
-
export interface
|
|
298
|
-
/**
|
|
299
|
-
|
|
283
|
+
export interface IWebPartEditForm<IWPCfg = IWebPartCfg, IWPInfo = IWebPartInfo> {
|
|
284
|
+
/** The form action buttons displayed in the footer of the modal. */
|
|
285
|
+
actions?: Array<IButtonProps>;
|
|
300
286
|
|
|
301
|
-
/**
|
|
302
|
-
|
|
287
|
+
/** The render form event. */
|
|
288
|
+
onRenderForm?: (wpInfo?: IWPInfo) => Array<IFormControlProps> | PromiseLike<Array<IFormControlProps>> | void;
|
|
303
289
|
|
|
304
|
-
/** The
|
|
305
|
-
|
|
290
|
+
/** The save event. */
|
|
291
|
+
onSave?: (wpCfg?: IWPCfg, form?: IForm) => IWPCfg;
|
|
306
292
|
|
|
307
|
-
/**
|
|
308
|
-
|
|
293
|
+
/** True to hide the save button. */
|
|
294
|
+
showSaveButton?: boolean;
|
|
309
295
|
}
|
|
310
296
|
}
|
|
311
297
|
|
|
312
|
-
declare module 'gd-sprest-bs/
|
|
313
|
-
import {
|
|
314
|
-
import {
|
|
315
|
-
import {
|
|
316
|
-
import { IToolbarProps } from "gd-bs/src/components/toolbar/types";
|
|
317
|
-
import { Helper, Types } from "gd-sprest";
|
|
298
|
+
declare module 'gd-sprest-bs/webparts/list/types' {
|
|
299
|
+
import { IFormControlProps } from "gd-bs/src/components/form/controlTypes";
|
|
300
|
+
import { Types } from "gd-sprest";
|
|
301
|
+
import { IWebPart, IWebPartInfo, IWebPartProps, IWebPartCfg, IWebPartEditForm } from "gd-sprest-bs/webparts/base/types";
|
|
318
302
|
|
|
319
303
|
/**
|
|
320
|
-
* List
|
|
304
|
+
* ### List WebPart
|
|
305
|
+
*
|
|
306
|
+
* The list webpart should be used when targeting a list as a datasource.
|
|
307
|
+
*
|
|
308
|
+
* ```ts
|
|
309
|
+
* import { WebParts } from "gd-sprest-bs";
|
|
310
|
+
*
|
|
311
|
+
* // Create the webpart
|
|
312
|
+
* WebParts.WebPart({
|
|
313
|
+
* elementId: "my-wpList",
|
|
314
|
+
* cfgElementId: "my-wpList-cfg",
|
|
315
|
+
* onRenderItems: (wpInfo, items) => {
|
|
316
|
+
* // Render the display element
|
|
317
|
+
* wpInfo.el.innerHTML = [
|
|
318
|
+
* '<h1>List: ' + wpInfo.ListName + '</h1>',
|
|
319
|
+
* '<h5>List Items: ' + items.length + '</h5>'
|
|
320
|
+
* ].join('\n');
|
|
321
|
+
* }
|
|
322
|
+
* });
|
|
323
|
+
* ```
|
|
321
324
|
*/
|
|
322
|
-
export const
|
|
325
|
+
export const WPList: (props: IWPListProps) => IWPList;
|
|
323
326
|
|
|
324
327
|
/**
|
|
325
|
-
* List Form
|
|
328
|
+
* List WebPart Edit Form
|
|
326
329
|
*/
|
|
327
|
-
export
|
|
328
|
-
/** Method to save the form. */
|
|
329
|
-
saveForm: () => PromiseLike<Types.SP.ListItem>;
|
|
330
|
-
}
|
|
330
|
+
export const WPListEditForm: (props: IWPListEditForm) => IWPListEditForm;
|
|
331
331
|
|
|
332
332
|
/**
|
|
333
|
-
* List
|
|
333
|
+
* List WebPart
|
|
334
334
|
*/
|
|
335
|
-
export interface
|
|
336
|
-
/** The form actions. */
|
|
337
|
-
actions?: IToolbarProps;
|
|
335
|
+
export interface IWPList<IListCfg = IWPListCfg, IListInfo = IWPListInfo> extends IWebPart<IListCfg, IListInfo> { }
|
|
338
336
|
|
|
339
|
-
|
|
340
|
-
|
|
337
|
+
/**
|
|
338
|
+
* List WebPart Information
|
|
339
|
+
*/
|
|
340
|
+
export interface IWPListInfo<IListCfg = IWPListCfg> extends IWebPartInfo<IListCfg> { }
|
|
341
341
|
|
|
342
|
-
|
|
343
|
-
|
|
342
|
+
/**
|
|
343
|
+
* List WebPart Properties
|
|
344
|
+
*/
|
|
345
|
+
export interface IWPListProps<IListInfo=IWPListInfo, IListEditForm=IWPListEditForm> extends IWebPartProps<IListInfo, IListEditForm> {
|
|
346
|
+
/** The caml query. */
|
|
347
|
+
camlQuery?: string;
|
|
344
348
|
|
|
345
|
-
/** The
|
|
346
|
-
|
|
349
|
+
/** The odata query. */
|
|
350
|
+
odataQuery?: Types.IODataQuery;
|
|
347
351
|
|
|
348
|
-
/** The
|
|
349
|
-
|
|
352
|
+
/** The executing caml query event. */
|
|
353
|
+
onExecutingCAMLQuery?: (wpInfo: IListInfo, caml: string) => string;
|
|
350
354
|
|
|
351
|
-
/** The
|
|
352
|
-
|
|
355
|
+
/** The executing odata query event. */
|
|
356
|
+
onExecutingODATAQuery?: (wpInfo: IListInfo, odata: Types.IODataQuery) => Types.IODataQuery;
|
|
353
357
|
|
|
354
|
-
/** The
|
|
355
|
-
|
|
358
|
+
/** The on render items event. */
|
|
359
|
+
onRenderItems?: (wpInfo: IListInfo, items: Array<Types.SP.IListItemQuery | Types.SP.ListItem>) => void;
|
|
360
|
+
}
|
|
356
361
|
|
|
357
|
-
|
|
358
|
-
|
|
362
|
+
/**
|
|
363
|
+
* List WebPart Configuration
|
|
364
|
+
*/
|
|
365
|
+
export interface IWPListCfg extends IWebPartCfg {
|
|
366
|
+
/** The list name */
|
|
367
|
+
ListName?: string;
|
|
359
368
|
|
|
360
|
-
/** The
|
|
361
|
-
|
|
369
|
+
/** The relative web url */
|
|
370
|
+
WebUrl?: string;
|
|
371
|
+
}
|
|
362
372
|
|
|
363
|
-
|
|
364
|
-
|
|
373
|
+
/**
|
|
374
|
+
* List WebPart Edit Form
|
|
375
|
+
*/
|
|
376
|
+
export interface IWPListEditForm<IListCfg = IWPListCfg, IListInfo = IWPListInfo> extends IWebPartEditForm<IListCfg, IListInfo> {
|
|
377
|
+
/** The odata list query. */
|
|
378
|
+
listQuery?: Types.IODataQuery;
|
|
365
379
|
|
|
366
|
-
/** The list
|
|
367
|
-
|
|
380
|
+
/** The list changed event. */
|
|
381
|
+
onListChanged?: (wpInfo: IListInfo, list?: Types.SP.IListQuery | Types.SP.List) => Array<IFormControlProps> | PromiseLike<Array<IFormControlProps>> | void;
|
|
368
382
|
|
|
369
|
-
/**
|
|
370
|
-
|
|
383
|
+
/** The lists loaded event. */
|
|
384
|
+
onListsLoaded?: (wpInfo: IListInfo, lists?: Array<Types.SP.IListQuery | Types.SP.List>) => Array<Types.SP.IListQuery | Types.SP.List>;
|
|
385
|
+
|
|
386
|
+
/** The render form event. */
|
|
387
|
+
onRenderForm?: (wpInfo: IListInfo, list?: Types.SP.IListQuery | Types.SP.List) => Array<IFormControlProps> | PromiseLike<Array<IFormControlProps>> | void;
|
|
371
388
|
}
|
|
372
389
|
}
|
|
373
390
|
|
|
374
|
-
declare module 'gd-sprest-bs/
|
|
391
|
+
declare module 'gd-sprest-bs/webparts/listFields/types' {
|
|
392
|
+
import { IWPList, IWPListCfg, IWPListEditForm, IWPListInfo, IWPListProps } from "gd-sprest-bs/webparts/list/types";
|
|
375
393
|
|
|
376
394
|
/**
|
|
377
|
-
* ###
|
|
395
|
+
* ### List Fields WebPart
|
|
396
|
+
*
|
|
397
|
+
* The list fields webpart should be used when targeting a list and fields as a datasource.
|
|
378
398
|
*
|
|
379
399
|
* ```ts
|
|
380
|
-
* import {
|
|
400
|
+
* import { WebParts } from "gd-sprest-bs";
|
|
381
401
|
*
|
|
382
|
-
* // Create the
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
* //
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
393
|
-
* name: "User",
|
|
394
|
-
* type: Components.FormControlTypes.PeoplePicker
|
|
395
|
-
* value: ContextInfo.userId // Default to the current user
|
|
396
|
-
* } as Components.IFormControlPropsPeoplePicker
|
|
397
|
-
* }
|
|
398
|
-
* ]
|
|
402
|
+
* // Create the webpart
|
|
403
|
+
* WebParts.WebPart({
|
|
404
|
+
* elementId: "my-wpList",
|
|
405
|
+
* cfgElementId: "my-wpList-cfg",
|
|
406
|
+
* onRenderItems: (wpInfo, items) => {
|
|
407
|
+
* // Render the display element
|
|
408
|
+
* wpInfo.el.innerHTML = [
|
|
409
|
+
* '<h1>List: ' + wpInfo.ListName + '</h1>',
|
|
410
|
+
* '<h5>List Items: ' + items.length + '</h5>'
|
|
411
|
+
* ].join('\n');
|
|
412
|
+
* }
|
|
399
413
|
* });
|
|
400
414
|
* ```
|
|
401
415
|
*/
|
|
402
|
-
export const
|
|
403
|
-
|
|
404
|
-
import { IFormControlProps } from "gd-bs/src/components/form/controlTypes";
|
|
405
|
-
import { Types } from "gd-sprest";
|
|
416
|
+
export const WPListFields: (props: IWPListFieldsProps) => IWPListFields;
|
|
406
417
|
|
|
407
418
|
/**
|
|
408
|
-
*
|
|
419
|
+
* List Fields WebPart Edit Form
|
|
409
420
|
*/
|
|
410
|
-
export
|
|
411
|
-
/** The people picker element. */
|
|
412
|
-
el: HTMLElement;
|
|
413
|
-
|
|
414
|
-
/** Returns the selected users. */
|
|
415
|
-
getValue: () => Array<Types.SP.User | Types.SP.Group>;
|
|
416
|
-
|
|
417
|
-
/** Sets the selected users by id or people picker user object. */
|
|
418
|
-
setValue: (selectedUsers: Array<string | number | Types.IPeoplePickerUser>) => void;
|
|
419
|
-
}
|
|
421
|
+
export const WPListFieldsEditForm: (props: IWPListFieldsEditForm) => IWPListFieldsEditForm;
|
|
420
422
|
|
|
421
423
|
/**
|
|
422
|
-
*
|
|
424
|
+
* List Fields WebPart
|
|
423
425
|
*/
|
|
424
|
-
export interface
|
|
425
|
-
/** True, to include groups in the results. */
|
|
426
|
-
allowGroups?: boolean;
|
|
427
|
-
|
|
428
|
-
/** Assigns the object to the input parameter. */
|
|
429
|
-
assignTo?: (obj: IPeoplePicker) => void;
|
|
426
|
+
export interface IWPListFields<IListFieldsCfg = IWPListFieldsCfg, IListFieldsInfo = IWPListFieldsInfo> extends IWPList<IListFieldsCfg, IListFieldsInfo> { }
|
|
430
427
|
|
|
431
|
-
|
|
432
|
-
|
|
428
|
+
/**
|
|
429
|
+
* List Fields WebPart Information
|
|
430
|
+
*/
|
|
431
|
+
export interface IWPListFieldsInfo<IListFieldsCfg = IWPListFieldsCfg> extends IWPListInfo<IListFieldsCfg> { }
|
|
433
432
|
|
|
434
|
-
|
|
435
|
-
|
|
433
|
+
/**
|
|
434
|
+
* List Fields WebPart Properties
|
|
435
|
+
*/
|
|
436
|
+
export interface IWPListFieldsProps<IListFieldsInfo = IWPListFieldsInfo, IListFieldsEditForm = IWPListFieldsEditForm> extends IWPListProps<IListFieldsInfo, IListFieldsEditForm> { }
|
|
436
437
|
|
|
437
|
-
|
|
438
|
-
|
|
438
|
+
/**
|
|
439
|
+
* WebPart Configuration List Field
|
|
440
|
+
*/
|
|
441
|
+
export interface IWPListField {
|
|
442
|
+
// The internal field name
|
|
443
|
+
Name: string;
|
|
439
444
|
|
|
440
|
-
|
|
441
|
-
|
|
445
|
+
// The display name of the field
|
|
446
|
+
Title: string
|
|
447
|
+
}
|
|
442
448
|
|
|
443
|
-
|
|
444
|
-
|
|
449
|
+
/**
|
|
450
|
+
* List Fields WebPart Configuration
|
|
451
|
+
*/
|
|
452
|
+
export interface IWPListFieldsCfg extends IWPListCfg {
|
|
453
|
+
/** The selected fields */
|
|
454
|
+
Fields: Array<IWPListField>;
|
|
455
|
+
}
|
|
445
456
|
|
|
446
|
-
|
|
447
|
-
|
|
457
|
+
/**
|
|
458
|
+
* List Fields WebPart Edit Form
|
|
459
|
+
*/
|
|
460
|
+
export interface IWPListFieldsEditForm<IListFieldsCfg = IWPListFieldsCfg, IListFieldsInfo = IWPListFieldsInfo> extends IWPListEditForm<IListFieldsCfg, IListFieldsInfo> { }
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
declare module 'gd-sprest-bs/webparts/search/types' {
|
|
464
|
+
import { Types } from "gd-sprest";
|
|
465
|
+
import { IWPList, IWPListInfo, IWPListProps, IWPListCfg, IWPListEditForm } from "gd-sprest-bs/webparts/list/types";
|
|
448
466
|
|
|
449
|
-
|
|
450
|
-
|
|
467
|
+
/**
|
|
468
|
+
* ### Search WebPart
|
|
469
|
+
*
|
|
470
|
+
* The search webpart extends the list webpart, and includes a filterItems method to return items based on the inputed filter text.
|
|
471
|
+
*
|
|
472
|
+
* ```ts
|
|
473
|
+
* import { WebParts } from "gd-sprest-bs";
|
|
474
|
+
*
|
|
475
|
+
* // Create the webpart
|
|
476
|
+
* let wp = WebParts.WebPart({
|
|
477
|
+
* elementId: "my-wpSearch",
|
|
478
|
+
* cfgElementId: "my-wpSearch-cfg",
|
|
479
|
+
* onRenderItems: (wpInfo, items) => {
|
|
480
|
+
* // Render the display element
|
|
481
|
+
* wpInfo.el.innerHTML = [
|
|
482
|
+
* '<h1>List: ' + wpInfo.ListName + '</h1>',
|
|
483
|
+
* '<h5>List Items: ' + items.length + '</h5>'
|
|
484
|
+
* ].join('\n');
|
|
485
|
+
* }
|
|
486
|
+
* });
|
|
487
|
+
* ```
|
|
488
|
+
*/
|
|
489
|
+
export const WPSearch: (props: IWPListProps) => IWPSearch;
|
|
451
490
|
|
|
452
|
-
|
|
453
|
-
|
|
491
|
+
/**
|
|
492
|
+
* Search WebPart Edit Form
|
|
493
|
+
*/
|
|
494
|
+
export const WPSearchEditForm: (props: IWPSearchEditForm) => IWPSearchEditForm;
|
|
454
495
|
|
|
455
|
-
|
|
456
|
-
|
|
496
|
+
/**
|
|
497
|
+
* Search WebPart
|
|
498
|
+
*/
|
|
499
|
+
export interface IWPSearch extends IWPList<IWPSearchCfg, IWPSearchInfo> {
|
|
500
|
+
/** The filter items method. */
|
|
501
|
+
filterItems: (filterText: string) => Array<Types.SP.IListItemQuery | Types.SP.ListItem>;
|
|
502
|
+
}
|
|
457
503
|
|
|
458
|
-
|
|
459
|
-
|
|
504
|
+
/**
|
|
505
|
+
* Search WebPart Information
|
|
506
|
+
*/
|
|
507
|
+
export interface IWPSearchInfo extends IWPListInfo<IWPSearchCfg> { }
|
|
460
508
|
|
|
461
|
-
|
|
462
|
-
|
|
509
|
+
/**
|
|
510
|
+
* Search WebPart Properties
|
|
511
|
+
*/
|
|
512
|
+
export interface IWPSearchProps extends IWPListProps<IWPSearchInfo, IWPSearchEditForm> {
|
|
513
|
+
/** The internal field names to be used for search. These will be appended to the configuration fields. */
|
|
514
|
+
searchFields?: Array<{ name: string, type: string }>;
|
|
463
515
|
}
|
|
464
516
|
|
|
465
517
|
/**
|
|
466
|
-
*
|
|
518
|
+
* Search WebPart Configuration
|
|
467
519
|
*/
|
|
468
|
-
export interface
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
maxResults?: number;
|
|
472
|
-
multi?: boolean;
|
|
473
|
-
placeholder?: string;
|
|
474
|
-
searchLocal?: boolean;
|
|
475
|
-
value?: string | number | Types.IPeoplePickerUser | Array<string | number | Types.IPeoplePickerUser>;
|
|
520
|
+
export interface IWPSearchCfg extends IWPListCfg {
|
|
521
|
+
/** The searchable fields. */
|
|
522
|
+
Fields: Array<{ name: string, type: string }>;
|
|
476
523
|
}
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Search WebPart Edit Form
|
|
527
|
+
*/
|
|
528
|
+
export interface IWPSearchEditForm extends IWPListEditForm<IWPSearchCfg, IWPSearchInfo> { }
|
|
477
529
|
}
|
|
478
530
|
|
|
479
|
-
declare module 'gd-sprest-bs/webparts/
|
|
480
|
-
import {
|
|
481
|
-
import {
|
|
482
|
-
import { IWebPartInfo } from "gd-sprest-bs/webparts/base/types";
|
|
531
|
+
declare module 'gd-sprest-bs/webparts/tabs/types' {
|
|
532
|
+
import { INav } from "gd-bs/src/components/nav/types";
|
|
533
|
+
import { IWebPart, IWebPartProps } from "gd-sprest-bs/webparts/base/types";
|
|
483
534
|
|
|
484
535
|
/**
|
|
485
|
-
*
|
|
536
|
+
* ### WebPart Tabs
|
|
537
|
+
*
|
|
538
|
+
* The webpart tabs will generate tabs for each visible webpart in its zone.
|
|
539
|
+
*
|
|
540
|
+
* ```ts
|
|
541
|
+
* import { WebParts } from "gd-sprest-bs";
|
|
542
|
+
*
|
|
543
|
+
* // Create the webpart
|
|
544
|
+
* WebParts.WPTabs({ elementId: "my-tabs" });
|
|
545
|
+
* ```
|
|
486
546
|
*/
|
|
487
|
-
export const
|
|
547
|
+
export const WPTabs: (props: IWPTabsProps) => IWPTabs;
|
|
488
548
|
|
|
489
549
|
/**
|
|
490
|
-
*
|
|
550
|
+
* WebPart Tab Types
|
|
491
551
|
*/
|
|
492
|
-
export
|
|
493
|
-
/**
|
|
494
|
-
* Method to get the webpart
|
|
495
|
-
* @param wpId - The webpart id.
|
|
496
|
-
*/
|
|
497
|
-
getWebPart(wpId: string): PromiseLike<IWPInstance>;
|
|
498
|
-
|
|
499
|
-
/**
|
|
500
|
-
* Method to get the webpart id for a specified element
|
|
501
|
-
* @param el - The target element.
|
|
502
|
-
*/
|
|
503
|
-
getWebPartId(el: HTMLElement): string;
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* Method to render the edit form.
|
|
507
|
-
* @param el - The element to render the form to.
|
|
508
|
-
* @param wpCfg - The webpart configuration information.
|
|
509
|
-
* @param formControls - The form controls to render.
|
|
510
|
-
*/
|
|
511
|
-
renderEditForm: (el: HTMLElement, wpCfg: IWebPartCfg, formControls: Array<IFormControlProps>) => IForm;
|
|
512
|
-
|
|
513
|
-
/**
|
|
514
|
-
* Method to save the webpart configuration.
|
|
515
|
-
* This method may execute a postback, based on the page type.
|
|
516
|
-
* @param wpId - The webpart id.
|
|
517
|
-
* @param cfgId: The configuration element id.
|
|
518
|
-
* @param wpCfg - The webpart configuration.
|
|
519
|
-
*/
|
|
520
|
-
saveConfiguration(wpId: string, cfgId?: string, wpCfg?: any): PromiseLike<void>;
|
|
552
|
+
export const WPTabTypes: IWPTabTypes;
|
|
521
553
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
554
|
+
/**
|
|
555
|
+
* WebPart Tabs
|
|
556
|
+
*/
|
|
557
|
+
export interface IWPTabs extends IWebPart {
|
|
558
|
+
getNav(): INav;
|
|
559
|
+
getTabs(): Array<HTMLElement>;
|
|
560
|
+
}
|
|
529
561
|
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
updateWebPartContentElements(wpId: string, cfgId?: string, wpCfg?: any): boolean;
|
|
562
|
+
/**
|
|
563
|
+
* WebPart Tabs Properties
|
|
564
|
+
*/
|
|
565
|
+
export interface IWPTabsProps extends IWebPartProps {
|
|
566
|
+
onClick?: (el?: HTMLElement) => void;
|
|
567
|
+
type?: number;
|
|
537
568
|
}
|
|
538
569
|
|
|
539
570
|
/**
|
|
540
|
-
* WebPart
|
|
571
|
+
* WebPart Tab Types
|
|
541
572
|
*/
|
|
542
|
-
export
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
WebPart: any;
|
|
546
|
-
WebPartDefinition: any;
|
|
573
|
+
export type IWPTabTypes = {
|
|
574
|
+
Pillars: number;
|
|
575
|
+
Tabs: number;
|
|
547
576
|
}
|
|
548
577
|
}
|
|
549
578
|
|
|
550
|
-
declare module 'gd-sprest-bs/webparts/
|
|
551
|
-
import {
|
|
552
|
-
import {
|
|
553
|
-
import {
|
|
579
|
+
declare module 'gd-sprest-bs/webparts/taxonomy/types' {
|
|
580
|
+
import { IDropdownItem } from "gd-bs/src/components/dropdown/types"
|
|
581
|
+
import { Helper } from "gd-sprest";
|
|
582
|
+
import { IWebPart, IWebPartInfo, IWebPartProps, IWebPartCfg, IWebPartEditForm } from "gd-sprest-bs/webparts/base/types";
|
|
554
583
|
|
|
555
584
|
/**
|
|
556
|
-
* ###
|
|
585
|
+
* ### Taxonomy WebPart
|
|
557
586
|
*
|
|
558
|
-
* The
|
|
587
|
+
* The taxonomy webpart should be used when targeting the term store as a datasource.
|
|
559
588
|
*
|
|
560
589
|
* ```ts
|
|
561
590
|
* import { WebParts } from "gd-sprest-bs";
|
|
562
591
|
*
|
|
563
592
|
* // Create the webpart
|
|
564
|
-
* WebParts.
|
|
565
|
-
* elementId: "my-
|
|
566
|
-
* cfgElementId: "my-
|
|
567
|
-
*
|
|
593
|
+
* WebParts.WPTaxonomy({
|
|
594
|
+
* elementId: "my-wpTaxonomy",
|
|
595
|
+
* cfgElementId: "my-wpTaxonomy-cfg",
|
|
596
|
+
* onRenderTermSetTerms: (wpInfo, terms) => {
|
|
568
597
|
* // Render the display element
|
|
569
|
-
* wpInfo.el.innerHTML =
|
|
570
|
-
*
|
|
571
|
-
*
|
|
572
|
-
*
|
|
573
|
-
* wpInfo.el.innerHTML = '<h1>Hello Edit Mode</h1>';
|
|
598
|
+
* wpInfo.el.innerHTML = [
|
|
599
|
+
* '<h1>Term Set: ' + wpInfo.TermSetName + '</h1>',
|
|
600
|
+
* '<h5>Terms: ' + terms.length + '</h5>'
|
|
601
|
+
* ].join('\n');
|
|
574
602
|
* }
|
|
575
603
|
* });
|
|
576
604
|
* ```
|
|
577
605
|
*/
|
|
578
|
-
export const
|
|
606
|
+
export const WPTaxonomy: (props: IWPTaxonomyProps) => IWPTaxonomy;
|
|
579
607
|
|
|
580
608
|
/**
|
|
581
|
-
* WebPart
|
|
609
|
+
* Taxonomy WebPart Edit Form
|
|
582
610
|
*/
|
|
583
|
-
export
|
|
584
|
-
/** The webpart configuration. */
|
|
585
|
-
cfg: IWPCfg;
|
|
611
|
+
export const WPTaxonomyEditForm: (props: IWPTaxonomyEditForm) => IWPTaxonomyEditForm;
|
|
586
612
|
|
|
587
|
-
|
|
588
|
-
|
|
613
|
+
/**
|
|
614
|
+
* Taxonomy WebPart
|
|
615
|
+
*/
|
|
616
|
+
export interface IWPTaxonomy extends IWebPart<IWPTaxonomyCfg, IWPTaxonomyInfo> { }
|
|
589
617
|
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
618
|
+
/**
|
|
619
|
+
* Taxonomy WebPart Information
|
|
620
|
+
*/
|
|
621
|
+
export interface IWPTaxonomyInfo extends IWebPartInfo<IWPTaxonomyCfg> { }
|
|
593
622
|
|
|
594
623
|
/**
|
|
595
|
-
* WebPart
|
|
624
|
+
* Taxonomy WebPart Properties
|
|
596
625
|
*/
|
|
597
|
-
export interface
|
|
598
|
-
/** The
|
|
599
|
-
|
|
626
|
+
export interface IWPTaxonomyProps extends IWebPartProps<IWPTaxonomyInfo, IWPTaxonomyEditForm> {
|
|
627
|
+
/** The on render term set event. */
|
|
628
|
+
onRenderTermSet?: (wpInfo: IWPTaxonomyInfo, termSet: Helper.ITerm) => void;
|
|
600
629
|
|
|
601
|
-
/** The
|
|
602
|
-
|
|
630
|
+
/** The on render term sets event. */
|
|
631
|
+
onRenderTermSets?: (wpInfo: IWPTaxonomyInfo, termSets: Array<Helper.ITermSetInfo>) => void;
|
|
603
632
|
|
|
604
|
-
/** The
|
|
605
|
-
|
|
633
|
+
/** The on render term set terms event. */
|
|
634
|
+
onRenderTermSetTerms?: (wpInfo: IWPTaxonomyInfo, terms: Array<Helper.ITermInfo>) => void;
|
|
606
635
|
}
|
|
607
636
|
|
|
608
637
|
/**
|
|
609
|
-
* WebPart
|
|
638
|
+
* Taxonomy WebPart Configuration
|
|
610
639
|
*/
|
|
611
|
-
export interface
|
|
612
|
-
/** The
|
|
613
|
-
|
|
640
|
+
export interface IWPTaxonomyCfg extends IWebPartCfg {
|
|
641
|
+
/** The term group id. */
|
|
642
|
+
TermGroupId?: string;
|
|
614
643
|
|
|
615
|
-
/** The
|
|
616
|
-
|
|
644
|
+
/** The term group name. */
|
|
645
|
+
TermGroupName?: string;
|
|
617
646
|
|
|
618
|
-
/** The
|
|
619
|
-
|
|
647
|
+
/** The term set id. */
|
|
648
|
+
TermSetId?: string;
|
|
620
649
|
|
|
621
|
-
/** The
|
|
622
|
-
|
|
650
|
+
/** The term set name */
|
|
651
|
+
TermSetName?: string;
|
|
623
652
|
|
|
624
|
-
/** The
|
|
625
|
-
|
|
653
|
+
/** The term set term id. */
|
|
654
|
+
TermSetTermId?: string;
|
|
655
|
+
|
|
656
|
+
/** The term set term name */
|
|
657
|
+
TermSetTermName?: string;
|
|
626
658
|
}
|
|
627
659
|
|
|
628
660
|
/**
|
|
629
|
-
* WebPart
|
|
661
|
+
* Taxonomy WebPart Edit Form
|
|
630
662
|
*/
|
|
631
|
-
export interface
|
|
632
|
-
/** The
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
/** The class name. */
|
|
636
|
-
className?: string;
|
|
637
|
-
|
|
638
|
-
/** The target element id to render the webpart to */
|
|
639
|
-
elementId?: string;
|
|
640
|
-
|
|
641
|
-
/** The edit form */
|
|
642
|
-
editForm?: IWPEditForm;
|
|
643
|
-
|
|
644
|
-
/** The optional help link properties */
|
|
645
|
-
helpProps?: {
|
|
646
|
-
/** The link title */
|
|
647
|
-
title?: string;
|
|
663
|
+
export interface IWPTaxonomyEditForm extends IWebPartEditForm<IWPTaxonomyCfg, IWPTaxonomyInfo> {
|
|
664
|
+
/** The term group changed event. */
|
|
665
|
+
onTermGroupChanged?: (wpInfo: IWPTaxonomyInfo, termGroupInfo?: ITermGroupInfo) => void;
|
|
648
666
|
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
};
|
|
667
|
+
/** The term group loaded event. */
|
|
668
|
+
onTermGroupsLoaded?: (wpInfo: IWPTaxonomyInfo, termGroups: Array<IDropdownItem>) => Array<IDropdownItem>;
|
|
652
669
|
|
|
653
|
-
/** The
|
|
654
|
-
|
|
670
|
+
/** The term set changed event. */
|
|
671
|
+
onTermSetChanged?: (wpInfo: IWPTaxonomyInfo, termSetInfo?: ITermInfo) => void;
|
|
655
672
|
|
|
656
|
-
/** The
|
|
657
|
-
|
|
673
|
+
/** The term set loaded event. */
|
|
674
|
+
onTermSetsLoaded?: (wpInfo: IWPTaxonomyInfo, termSets?: Array<IDropdownItem>) => Array<IDropdownItem>;
|
|
658
675
|
|
|
659
|
-
/** The
|
|
660
|
-
|
|
676
|
+
/** The term set term changed event. */
|
|
677
|
+
onTermSetTermChanged?: (wpInfo: IWPTaxonomyInfo, termInfo?: ITermInfo) => void;
|
|
661
678
|
|
|
662
|
-
/** The
|
|
663
|
-
|
|
679
|
+
/** The term set terms loaded event. */
|
|
680
|
+
onTermSetTermsLoaded?: (wpInfo: IWPTaxonomyInfo, terms?: Array<IDropdownItem>) => Array<IDropdownItem>;
|
|
664
681
|
|
|
665
|
-
/**
|
|
666
|
-
|
|
682
|
+
/** Flag to display the term set terms. */
|
|
683
|
+
showTermSetTerms?: boolean;
|
|
667
684
|
}
|
|
668
685
|
|
|
669
686
|
/**
|
|
670
|
-
*
|
|
671
|
-
*/
|
|
672
|
-
export const WPCfg: (cfg: IWebPartCfg, props: IWebPartProps) => {
|
|
673
|
-
/** Method to render the edit form. */
|
|
674
|
-
renderForm?: (formControls: Array<IFormControl>) => void;
|
|
675
|
-
};
|
|
676
|
-
|
|
677
|
-
/**
|
|
678
|
-
* WebPart Configuration
|
|
687
|
+
* Term Group Info
|
|
679
688
|
*/
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
689
|
+
interface ITermGroupInfo {
|
|
690
|
+
id: string;
|
|
691
|
+
name: string;
|
|
683
692
|
}
|
|
684
693
|
|
|
685
694
|
/**
|
|
686
|
-
*
|
|
695
|
+
* Term Info
|
|
687
696
|
*/
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
/** The render form event. */
|
|
693
|
-
onRenderForm?: (wpInfo?: IWPInfo) => Array<IFormControlProps> | PromiseLike<Array<IFormControlProps>> | void;
|
|
694
|
-
|
|
695
|
-
/** The save event. */
|
|
696
|
-
onSave?: (wpCfg?: IWPCfg, form?: IForm) => IWPCfg;
|
|
697
|
-
|
|
698
|
-
/** True to hide the save button. */
|
|
699
|
-
showSaveButton?: boolean;
|
|
697
|
+
interface ITermInfo {
|
|
698
|
+
id: string;
|
|
699
|
+
name: string;
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
702
|
|
|
703
|
-
declare module 'gd-sprest-bs/
|
|
703
|
+
declare module 'gd-sprest-bs/components/datetime/types' {
|
|
704
704
|
import { IFormControlProps } from "gd-bs/src/components/form/controlTypes";
|
|
705
|
-
import { Types } from "gd-sprest";
|
|
706
|
-
import { IWebPart, IWebPartInfo, IWebPartProps, IWebPartCfg, IWebPartEditForm } from "gd-sprest-bs/webparts/base/types";
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* ### List WebPart
|
|
710
|
-
*
|
|
711
|
-
* The list webpart should be used when targeting a list as a datasource.
|
|
712
|
-
*
|
|
713
|
-
* ```ts
|
|
714
|
-
* import { WebParts } from "gd-sprest-bs";
|
|
715
|
-
*
|
|
716
|
-
* // Create the webpart
|
|
717
|
-
* WebParts.WebPart({
|
|
718
|
-
* elementId: "my-wpList",
|
|
719
|
-
* cfgElementId: "my-wpList-cfg",
|
|
720
|
-
* onRenderItems: (wpInfo, items) => {
|
|
721
|
-
* // Render the display element
|
|
722
|
-
* wpInfo.el.innerHTML = [
|
|
723
|
-
* '<h1>List: ' + wpInfo.ListName + '</h1>',
|
|
724
|
-
* '<h5>List Items: ' + items.length + '</h5>'
|
|
725
|
-
* ].join('\n');
|
|
726
|
-
* }
|
|
727
|
-
* });
|
|
728
|
-
* ```
|
|
729
|
-
*/
|
|
730
|
-
export const WPList: (props: IWPListProps) => IWPList;
|
|
731
|
-
|
|
732
|
-
/**
|
|
733
|
-
* List WebPart Edit Form
|
|
734
|
-
*/
|
|
735
|
-
export const WPListEditForm: (props: IWPListEditForm) => IWPListEditForm;
|
|
736
|
-
|
|
737
|
-
/**
|
|
738
|
-
* List WebPart
|
|
739
|
-
*/
|
|
740
|
-
export interface IWPList<IListCfg = IWPListCfg, IListInfo = IWPListInfo> extends IWebPart<IListCfg, IListInfo> { }
|
|
741
705
|
|
|
742
706
|
/**
|
|
743
|
-
*
|
|
707
|
+
* Date/Time
|
|
744
708
|
*/
|
|
745
|
-
export
|
|
709
|
+
export const DateTime: (props: IDateTimeProps) => IDateTime
|
|
746
710
|
|
|
747
711
|
/**
|
|
748
|
-
*
|
|
712
|
+
* Date/Time
|
|
749
713
|
*/
|
|
750
|
-
export interface
|
|
751
|
-
/** The
|
|
752
|
-
|
|
714
|
+
export interface IDateTime {
|
|
715
|
+
/** The date/time picker element. */
|
|
716
|
+
el: HTMLDivElement;
|
|
753
717
|
|
|
754
|
-
/** The
|
|
755
|
-
|
|
718
|
+
/** The flatpickr object. */
|
|
719
|
+
flatpickrObj: any;
|
|
756
720
|
|
|
757
|
-
/**
|
|
758
|
-
|
|
721
|
+
/** Returns the date as a Date/Time object. */
|
|
722
|
+
getDate: () => Date;
|
|
759
723
|
|
|
760
|
-
/**
|
|
761
|
-
|
|
724
|
+
/** Method to get the value. */
|
|
725
|
+
getValue: () => string;
|
|
762
726
|
|
|
763
|
-
/**
|
|
764
|
-
|
|
727
|
+
/** Method to set the value. */
|
|
728
|
+
setValue: (dt: string | Date, dtFormat?: string) => void;
|
|
765
729
|
}
|
|
766
730
|
|
|
767
731
|
/**
|
|
768
|
-
*
|
|
732
|
+
* Date/Time Props
|
|
769
733
|
*/
|
|
770
|
-
export interface
|
|
771
|
-
/**
|
|
772
|
-
|
|
734
|
+
export interface IDateTimeProps {
|
|
735
|
+
/** Assigns the object to the input parameter. */
|
|
736
|
+
assignTo?: (obj: IDateTime) => void;
|
|
773
737
|
|
|
774
|
-
/** The
|
|
775
|
-
|
|
738
|
+
/** The class name to apply to the element. */
|
|
739
|
+
className?: string;
|
|
740
|
+
|
|
741
|
+
/** The element to render the form to. */
|
|
742
|
+
el?: Element;
|
|
743
|
+
|
|
744
|
+
/** True to disable the date/time plugin */
|
|
745
|
+
disabled?: boolean;
|
|
746
|
+
|
|
747
|
+
/** The date/time label. */
|
|
748
|
+
label?: string;
|
|
749
|
+
|
|
750
|
+
/** The flatpickr options. */
|
|
751
|
+
options?: any;
|
|
752
|
+
|
|
753
|
+
/** Flag to display the time. */
|
|
754
|
+
showTime?: boolean;
|
|
755
|
+
|
|
756
|
+
/** The date/time value. */
|
|
757
|
+
value?: string;
|
|
776
758
|
}
|
|
777
759
|
|
|
778
760
|
/**
|
|
779
|
-
*
|
|
761
|
+
* Form Control Properties - DateTime
|
|
780
762
|
*/
|
|
781
|
-
export interface
|
|
782
|
-
/** The
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
/** The list changed event. */
|
|
786
|
-
onListChanged?: (wpInfo: IListInfo, list?: Types.SP.IListQuery | Types.SP.List) => Array<IFormControlProps> | PromiseLike<Array<IFormControlProps>> | void;
|
|
763
|
+
export interface IFormControlPropsDateTime extends IFormControlProps {
|
|
764
|
+
/** The flatpickr options. */
|
|
765
|
+
options?: any;
|
|
787
766
|
|
|
788
|
-
/**
|
|
789
|
-
|
|
767
|
+
/** Flag to display the time. */
|
|
768
|
+
showTime?: boolean;
|
|
790
769
|
|
|
791
|
-
/** The
|
|
792
|
-
|
|
770
|
+
/** The date/time value. */
|
|
771
|
+
value?: string;
|
|
793
772
|
}
|
|
794
773
|
}
|
|
795
774
|
|
|
796
|
-
declare module 'gd-sprest-bs/
|
|
797
|
-
import {
|
|
775
|
+
declare module 'gd-sprest-bs/components/field/types' {
|
|
776
|
+
import { Helper, Types } from "gd-sprest";
|
|
777
|
+
import { IFormControl, IFormControlProps, IFormControlValidationResult } from "gd-bs/src/components/form/controlTypes";
|
|
798
778
|
|
|
799
779
|
/**
|
|
800
|
-
*
|
|
801
|
-
*
|
|
802
|
-
* The list fields webpart should be used when targeting a list and fields as a datasource.
|
|
803
|
-
*
|
|
804
|
-
* ```ts
|
|
805
|
-
* import { WebParts } from "gd-sprest-bs";
|
|
806
|
-
*
|
|
807
|
-
* // Create the webpart
|
|
808
|
-
* WebParts.WebPart({
|
|
809
|
-
* elementId: "my-wpList",
|
|
810
|
-
* cfgElementId: "my-wpList-cfg",
|
|
811
|
-
* onRenderItems: (wpInfo, items) => {
|
|
812
|
-
* // Render the display element
|
|
813
|
-
* wpInfo.el.innerHTML = [
|
|
814
|
-
* '<h1>List: ' + wpInfo.ListName + '</h1>',
|
|
815
|
-
* '<h5>List Items: ' + items.length + '</h5>'
|
|
816
|
-
* ].join('\n');
|
|
817
|
-
* }
|
|
818
|
-
* });
|
|
819
|
-
* ```
|
|
780
|
+
* Field
|
|
820
781
|
*/
|
|
821
|
-
export const
|
|
782
|
+
export const Field: (props: IFieldProps) => IField;
|
|
822
783
|
|
|
823
784
|
/**
|
|
824
|
-
*
|
|
785
|
+
* Field
|
|
825
786
|
*/
|
|
826
|
-
export
|
|
787
|
+
export interface IField {
|
|
788
|
+
control: IFormControl;
|
|
789
|
+
controlProps: IFormControlProps;
|
|
790
|
+
getValue: () => IFieldValue;
|
|
791
|
+
isValid: () => boolean;
|
|
792
|
+
}
|
|
827
793
|
|
|
828
794
|
/**
|
|
829
|
-
*
|
|
795
|
+
* Field Properties
|
|
830
796
|
*/
|
|
831
|
-
export interface
|
|
797
|
+
export interface IFieldProps {
|
|
798
|
+
assignTo?: (obj: IField) => void;
|
|
799
|
+
controlMode?: number;
|
|
800
|
+
errorMessage?: string;
|
|
801
|
+
field: Types.SP.Field;
|
|
802
|
+
listInfo: Helper.IListFormResult;
|
|
803
|
+
lookupFilter?: string;
|
|
804
|
+
onError?: (msg: string) => void;
|
|
805
|
+
onControlRendered?: (control: IFormControl, field: Types.SP.Field) => void | Promise<IFormControl>;
|
|
806
|
+
onControlRendering?: (control: IFormControlProps, field: Types.SP.Field) => void | Promise<IFormControlProps>;
|
|
807
|
+
onValidate?: (field: Types.SP.Field, control: IFormControl, value: IFormControlValidationResult) => boolean | IFormControlValidationResult;
|
|
808
|
+
value?: any;
|
|
809
|
+
}
|
|
832
810
|
|
|
833
811
|
/**
|
|
834
|
-
*
|
|
812
|
+
* Field Value
|
|
835
813
|
*/
|
|
836
|
-
export interface
|
|
814
|
+
export interface IFieldValue {
|
|
815
|
+
name: string;
|
|
816
|
+
value: any;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
declare module 'gd-sprest-bs/components/listForm/types' {
|
|
821
|
+
import { IFormControl, IFormControlProps } from "gd-bs/src/components/form/controlTypes";
|
|
822
|
+
import { IForm, IFormRow } from "gd-bs/src/components/form/formTypes";
|
|
823
|
+
import { Helper, Types } from "gd-sprest";
|
|
837
824
|
|
|
838
825
|
/**
|
|
839
|
-
* List
|
|
826
|
+
* List Form
|
|
840
827
|
*/
|
|
841
|
-
export
|
|
828
|
+
export const ListForm: IListForm;
|
|
842
829
|
|
|
843
830
|
/**
|
|
844
|
-
*
|
|
831
|
+
* List Form
|
|
845
832
|
*/
|
|
846
|
-
export interface
|
|
847
|
-
|
|
848
|
-
|
|
833
|
+
export interface IListForm extends Helper.IListForm {
|
|
834
|
+
/**
|
|
835
|
+
* Method to render the display form template.
|
|
836
|
+
* @param props - The display form properties.
|
|
837
|
+
*/
|
|
838
|
+
renderDisplayForm(props: IListFormDisplayProps): IListFormDisplay;
|
|
849
839
|
|
|
850
|
-
|
|
851
|
-
|
|
840
|
+
/**
|
|
841
|
+
* Method to render the edit/new form.
|
|
842
|
+
* @param props - The edit/new form properties.
|
|
843
|
+
*/
|
|
844
|
+
renderEditForm(props: IListFormEditProps): IListFormEdit;
|
|
852
845
|
}
|
|
853
846
|
|
|
854
847
|
/**
|
|
855
|
-
* List
|
|
848
|
+
* List Form Attachments Properties
|
|
856
849
|
*/
|
|
857
|
-
export interface
|
|
858
|
-
/** The
|
|
859
|
-
|
|
850
|
+
export interface IListFormAttachmentsProps {
|
|
851
|
+
/** The element to render the form to. */
|
|
852
|
+
el: Element;
|
|
853
|
+
|
|
854
|
+
/** The list form information. */
|
|
855
|
+
info: Helper.IListFormResult;
|
|
856
|
+
|
|
857
|
+
/** The item attachment saved event. */
|
|
858
|
+
onSave?: (info: Helper.IListFormResult) => void;
|
|
860
859
|
}
|
|
861
860
|
|
|
862
861
|
/**
|
|
863
|
-
* List
|
|
862
|
+
* List Form Display
|
|
864
863
|
*/
|
|
865
|
-
export interface
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
import { Types } from "gd-sprest";
|
|
870
|
-
import { IWPList, IWPListInfo, IWPListProps, IWPListCfg, IWPListEditForm } from "gd-sprest-bs/webparts/list/types";
|
|
864
|
+
export interface IListFormDisplay {
|
|
865
|
+
/** The form element. */
|
|
866
|
+
el: HTMLFormElement;
|
|
867
|
+
}
|
|
871
868
|
|
|
872
869
|
/**
|
|
873
|
-
*
|
|
874
|
-
*
|
|
875
|
-
* The search webpart extends the list webpart, and includes a filterItems method to return items based on the inputed filter text.
|
|
876
|
-
*
|
|
877
|
-
* ```ts
|
|
878
|
-
* import { WebParts } from "gd-sprest-bs";
|
|
879
|
-
*
|
|
880
|
-
* // Create the webpart
|
|
881
|
-
* let wp = WebParts.WebPart({
|
|
882
|
-
* elementId: "my-wpSearch",
|
|
883
|
-
* cfgElementId: "my-wpSearch-cfg",
|
|
884
|
-
* onRenderItems: (wpInfo, items) => {
|
|
885
|
-
* // Render the display element
|
|
886
|
-
* wpInfo.el.innerHTML = [
|
|
887
|
-
* '<h1>List: ' + wpInfo.ListName + '</h1>',
|
|
888
|
-
* '<h5>List Items: ' + items.length + '</h5>'
|
|
889
|
-
* ].join('\n');
|
|
890
|
-
* }
|
|
891
|
-
* });
|
|
892
|
-
* ```
|
|
870
|
+
* List Form Display Properties
|
|
893
871
|
*/
|
|
894
|
-
export
|
|
872
|
+
export interface IListFormDisplayProps extends Helper.IListFormDisplayProps {
|
|
873
|
+
/** Assigns the object to the input parameter. */
|
|
874
|
+
assignTo?: (obj: IListFormDisplay) => void;
|
|
895
875
|
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
*/
|
|
899
|
-
export const WPSearchEditForm: (props: IWPSearchEditForm) => IWPSearchEditForm;
|
|
876
|
+
/** The form component class name. */
|
|
877
|
+
className?: string;
|
|
900
878
|
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
*/
|
|
904
|
-
export interface IWPSearch extends IWPList<IWPSearchCfg, IWPSearchInfo> {
|
|
905
|
-
/** The filter items method. */
|
|
906
|
-
filterItems: (filterText: string) => Array<Types.SP.IListItemQuery | Types.SP.ListItem>;
|
|
907
|
-
}
|
|
879
|
+
/** The form component group class name. */
|
|
880
|
+
groupClassName?: string;
|
|
908
881
|
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
*/
|
|
912
|
-
export interface IWPSearchInfo extends IWPListInfo<IWPSearchCfg> { }
|
|
882
|
+
/** The form component row class name. */
|
|
883
|
+
rowClassName?: string;
|
|
913
884
|
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
885
|
+
/** The control rendered event. */
|
|
886
|
+
onControlRendered?: (control: IFormControl, field: Types.SP.Field) => void | Promise<IFormControl>;
|
|
887
|
+
|
|
888
|
+
/** The control rendering event. */
|
|
889
|
+
onControlRendering?: (control: IFormControlProps, field: Types.SP.Field) => void | Promise<IFormControlProps>;
|
|
890
|
+
|
|
891
|
+
/** The form rendered event. */
|
|
892
|
+
onFormRendered?: (form: IForm) => void;
|
|
893
|
+
|
|
894
|
+
/** The error event. */
|
|
895
|
+
onError?: (msg?: string) => void;
|
|
896
|
+
|
|
897
|
+
/** The list form rows. */
|
|
898
|
+
template?: Array<IFormRow>;
|
|
920
899
|
}
|
|
921
900
|
|
|
922
901
|
/**
|
|
923
|
-
*
|
|
902
|
+
* List Form Edit
|
|
924
903
|
*/
|
|
925
|
-
export interface
|
|
926
|
-
/**
|
|
927
|
-
|
|
904
|
+
export interface IListFormEdit {
|
|
905
|
+
/** Appends controls to the form */
|
|
906
|
+
appendControls(controls: Array<IFormControlProps>);
|
|
907
|
+
|
|
908
|
+
/** Appends rows to the form */
|
|
909
|
+
appendRows(rows: Array<IFormRow>);
|
|
910
|
+
|
|
911
|
+
/** The form element. */
|
|
912
|
+
el: HTMLFormElement;
|
|
913
|
+
|
|
914
|
+
/** Method to get a control by field name */
|
|
915
|
+
getControl(fieldName: string): IFormControl;
|
|
916
|
+
|
|
917
|
+
/** Method to get the form values */
|
|
918
|
+
getValues(): { [key: string]: any }
|
|
919
|
+
|
|
920
|
+
/** Method to determine if the field is valid */
|
|
921
|
+
isValid(): boolean;
|
|
922
|
+
|
|
923
|
+
/** Method to save the form. */
|
|
924
|
+
save(): PromiseLike<Types.SP.ListItem>;
|
|
928
925
|
}
|
|
929
926
|
|
|
930
927
|
/**
|
|
931
|
-
*
|
|
928
|
+
* List Form Edit Properties
|
|
932
929
|
*/
|
|
933
|
-
export interface
|
|
930
|
+
export interface IListFormEditProps extends IListFormDisplayProps, Helper.IListFormEditProps {
|
|
931
|
+
/** Assigns the object to the input parameter. */
|
|
932
|
+
assignTo?: (obj: IListFormEdit) => void;
|
|
933
|
+
|
|
934
|
+
/** Use this event to filter a lookup field by OData query. */
|
|
935
|
+
onFilterLookupField?: (field: Types.SP.Field) => string | Types.IODataQuery;
|
|
936
|
+
|
|
937
|
+
/** The form saving event. */
|
|
938
|
+
onSaving?: (item: any) => void | PromiseLike<any>;
|
|
939
|
+
|
|
940
|
+
/** The form validating event. */
|
|
941
|
+
onValidate?: (field: Types.SP.Field, control: IFormControl) => boolean;
|
|
942
|
+
}
|
|
934
943
|
}
|
|
935
944
|
|
|
936
|
-
declare module 'gd-sprest-bs/
|
|
937
|
-
import {
|
|
938
|
-
import {
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
*
|
|
943
|
-
* The webpart tabs will generate tabs for each visible webpart in its zone.
|
|
944
|
-
*
|
|
945
|
-
* ```ts
|
|
946
|
-
* import { WebParts } from "gd-sprest-bs";
|
|
947
|
-
*
|
|
948
|
-
* // Create the webpart
|
|
949
|
-
* WebParts.WPTabs({ elementId: "my-tabs" });
|
|
950
|
-
* ```
|
|
951
|
-
*/
|
|
952
|
-
export const WPTabs: (props: IWPTabsProps) => IWPTabs;
|
|
945
|
+
declare module 'gd-sprest-bs/components/listFormDialog/types' {
|
|
946
|
+
import { IFormControl, IFormControlProps } from "gd-bs/src/components/form/controlTypes";
|
|
947
|
+
import { IFormRow } from "gd-bs/src/components/form/formTypes";
|
|
948
|
+
import { IModal, IModalProps } from "gd-bs/src/components/modal/types";
|
|
949
|
+
import { IToolbarProps } from "gd-bs/src/components/toolbar/types";
|
|
950
|
+
import { Helper, Types } from "gd-sprest";
|
|
953
951
|
|
|
954
952
|
/**
|
|
955
|
-
*
|
|
953
|
+
* List Form Dialog
|
|
956
954
|
*/
|
|
957
|
-
export const
|
|
955
|
+
export const ListFormDialog: (props: IListFormDialogProps) => IListFormDialog;
|
|
958
956
|
|
|
959
957
|
/**
|
|
960
|
-
*
|
|
958
|
+
* List Form Dialog
|
|
961
959
|
*/
|
|
962
|
-
export interface
|
|
963
|
-
|
|
964
|
-
|
|
960
|
+
export interface IListFormDialog extends IModal {
|
|
961
|
+
/** Method to save the form. */
|
|
962
|
+
saveForm: () => PromiseLike<Types.SP.ListItem>;
|
|
965
963
|
}
|
|
966
964
|
|
|
967
965
|
/**
|
|
968
|
-
*
|
|
966
|
+
* List Form Dialog Properties
|
|
969
967
|
*/
|
|
970
|
-
export interface
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
}
|
|
968
|
+
export interface IListFormDialogProps extends Helper.IListFormProps {
|
|
969
|
+
/** The form actions. */
|
|
970
|
+
actions?: IToolbarProps;
|
|
974
971
|
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
972
|
+
/** Assigns the object to the input parameter. */
|
|
973
|
+
assignTo?: (obj: IListFormDialog) => void;
|
|
974
|
+
|
|
975
|
+
/** The form control mode. */
|
|
976
|
+
controlMode?: number;
|
|
977
|
+
|
|
978
|
+
/** The element to render the field to. */
|
|
979
|
+
el: Element | HTMLElement;
|
|
980
|
+
|
|
981
|
+
/** The item. */
|
|
982
|
+
item?: any;
|
|
983
|
+
|
|
984
|
+
/** The modal dialog properties. */
|
|
985
|
+
modalProps?: IModalProps;
|
|
986
|
+
|
|
987
|
+
/** The control rendered event. */
|
|
988
|
+
onControlRendered?: (control: IFormControl) => void | Promise<IFormControl>;
|
|
989
|
+
|
|
990
|
+
/** The control rendering event. */
|
|
991
|
+
onControlRendering?: (control: IFormControlProps) => void | Promise<IFormControlProps>;
|
|
992
|
+
|
|
993
|
+
/** The form saving event. */
|
|
994
|
+
onSaving?: (item: any) => void | PromiseLike<any>;
|
|
995
|
+
|
|
996
|
+
/** The form saved event. */
|
|
997
|
+
onSaved?: (item?: Types.SP.ListItem) => void;
|
|
998
|
+
|
|
999
|
+
/** The list form rows. */
|
|
1000
|
+
template?: Array<IFormRow>;
|
|
1001
|
+
|
|
1002
|
+
/** True to display the modal by default. */
|
|
1003
|
+
visible?: boolean;
|
|
981
1004
|
}
|
|
982
1005
|
}
|
|
983
1006
|
|
|
984
|
-
declare module 'gd-sprest-bs/
|
|
985
|
-
import { IDropdownItem } from "gd-bs/src/components/dropdown/types"
|
|
986
|
-
import { Helper } from "gd-sprest";
|
|
987
|
-
import { IWebPart, IWebPartInfo, IWebPartProps, IWebPartCfg, IWebPartEditForm } from "gd-sprest-bs/webparts/base/types";
|
|
1007
|
+
declare module 'gd-sprest-bs/components/peoplePicker/types' {
|
|
988
1008
|
|
|
989
1009
|
/**
|
|
990
|
-
* ###
|
|
991
|
-
*
|
|
992
|
-
* The taxonomy webpart should be used when targeting the term store as a datasource.
|
|
1010
|
+
* ### People Picker
|
|
993
1011
|
*
|
|
994
1012
|
* ```ts
|
|
995
|
-
* import {
|
|
1013
|
+
* import { ContextInfo, Components } from "gd-sprest-bs";
|
|
996
1014
|
*
|
|
997
|
-
* // Create the
|
|
998
|
-
*
|
|
999
|
-
*
|
|
1000
|
-
*
|
|
1001
|
-
*
|
|
1002
|
-
* //
|
|
1003
|
-
*
|
|
1004
|
-
*
|
|
1005
|
-
*
|
|
1006
|
-
*
|
|
1007
|
-
*
|
|
1015
|
+
* // Create the panel
|
|
1016
|
+
* let el = document.querySelector("#people-picker");
|
|
1017
|
+
* let form = Components.Form({
|
|
1018
|
+
* el: el,
|
|
1019
|
+
* rows: [
|
|
1020
|
+
* // Other controls go here
|
|
1021
|
+
* {
|
|
1022
|
+
* control: {
|
|
1023
|
+
* allowGroups: false,
|
|
1024
|
+
* label: "Select User:",
|
|
1025
|
+
* multi: true,
|
|
1026
|
+
* name: "User",
|
|
1027
|
+
* type: Components.FormControlTypes.PeoplePicker
|
|
1028
|
+
* value: ContextInfo.userId // Default to the current user
|
|
1029
|
+
* } as Components.IFormControlPropsPeoplePicker
|
|
1030
|
+
* }
|
|
1031
|
+
* ]
|
|
1008
1032
|
* });
|
|
1009
1033
|
* ```
|
|
1010
1034
|
*/
|
|
1011
|
-
export const
|
|
1012
|
-
|
|
1013
|
-
/**
|
|
1014
|
-
* Taxonomy WebPart Edit Form
|
|
1015
|
-
*/
|
|
1016
|
-
export const WPTaxonomyEditForm: (props: IWPTaxonomyEditForm) => IWPTaxonomyEditForm;
|
|
1017
|
-
|
|
1018
|
-
/**
|
|
1019
|
-
* Taxonomy WebPart
|
|
1020
|
-
*/
|
|
1021
|
-
export interface IWPTaxonomy extends IWebPart<IWPTaxonomyCfg, IWPTaxonomyInfo> { }
|
|
1035
|
+
export const PeoplePicker: (props: IPeoplePickerProps) => IPeoplePicker;
|
|
1022
1036
|
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
*/
|
|
1026
|
-
export interface IWPTaxonomyInfo extends IWebPartInfo<IWPTaxonomyCfg> { }
|
|
1037
|
+
import { IFormControlProps } from "gd-bs/src/components/form/controlTypes";
|
|
1038
|
+
import { Types } from "gd-sprest";
|
|
1027
1039
|
|
|
1028
1040
|
/**
|
|
1029
|
-
*
|
|
1041
|
+
* People Picker
|
|
1030
1042
|
*/
|
|
1031
|
-
export interface
|
|
1032
|
-
/** The
|
|
1033
|
-
|
|
1043
|
+
export interface IPeoplePicker {
|
|
1044
|
+
/** The people picker element. */
|
|
1045
|
+
el: HTMLElement;
|
|
1034
1046
|
|
|
1035
|
-
/**
|
|
1036
|
-
|
|
1047
|
+
/** Returns the selected users. */
|
|
1048
|
+
getValue: () => Array<Types.SP.User | Types.SP.Group>;
|
|
1037
1049
|
|
|
1038
|
-
/**
|
|
1039
|
-
|
|
1050
|
+
/** Sets the selected users by id or people picker user object. */
|
|
1051
|
+
setValue: (selectedUsers: Array<string | number | Types.IPeoplePickerUser>) => void;
|
|
1040
1052
|
}
|
|
1041
1053
|
|
|
1042
1054
|
/**
|
|
1043
|
-
*
|
|
1055
|
+
* People Picker Properties
|
|
1044
1056
|
*/
|
|
1045
|
-
export interface
|
|
1046
|
-
/**
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
/** The term group name. */
|
|
1050
|
-
TermGroupName?: string;
|
|
1057
|
+
export interface IPeoplePickerProps {
|
|
1058
|
+
/** True, to include groups in the results. */
|
|
1059
|
+
allowGroups?: boolean;
|
|
1051
1060
|
|
|
1052
|
-
/**
|
|
1053
|
-
|
|
1061
|
+
/** Assigns the object to the input parameter. */
|
|
1062
|
+
assignTo?: (obj: IPeoplePicker) => void;
|
|
1054
1063
|
|
|
1055
|
-
/** The
|
|
1056
|
-
|
|
1064
|
+
/** The class name to apply to the element. */
|
|
1065
|
+
className?: string;
|
|
1057
1066
|
|
|
1058
|
-
/** The
|
|
1059
|
-
|
|
1067
|
+
/** The element to render the form to. */
|
|
1068
|
+
el?: Element;
|
|
1060
1069
|
|
|
1061
|
-
/** The
|
|
1062
|
-
|
|
1063
|
-
}
|
|
1070
|
+
/** The specific SharePoint group id to search within. */
|
|
1071
|
+
groupId?: number;
|
|
1064
1072
|
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
*/
|
|
1068
|
-
export interface IWPTaxonomyEditForm extends IWebPartEditForm<IWPTaxonomyCfg, IWPTaxonomyInfo> {
|
|
1069
|
-
/** The term group changed event. */
|
|
1070
|
-
onTermGroupChanged?: (wpInfo: IWPTaxonomyInfo, termGroupInfo?: ITermGroupInfo) => void;
|
|
1073
|
+
/** The label. */
|
|
1074
|
+
label?: string;
|
|
1071
1075
|
|
|
1072
|
-
/**
|
|
1073
|
-
|
|
1076
|
+
/** Limits the results to a maximum number. */
|
|
1077
|
+
maxResults?: number;
|
|
1074
1078
|
|
|
1075
|
-
/**
|
|
1076
|
-
|
|
1079
|
+
/** True to allow multiple users to be selected. */
|
|
1080
|
+
multi?: boolean;
|
|
1077
1081
|
|
|
1078
|
-
/** The
|
|
1079
|
-
|
|
1082
|
+
/** The change event. */
|
|
1083
|
+
onChange?: (obj: Types.IPeoplePickerUser | Array<Types.IPeoplePickerUser>) => void;
|
|
1080
1084
|
|
|
1081
|
-
/** The
|
|
1082
|
-
|
|
1085
|
+
/** The placeholder text. (Default value is "Search") */
|
|
1086
|
+
placeholder?: string;
|
|
1083
1087
|
|
|
1084
|
-
/**
|
|
1085
|
-
|
|
1088
|
+
/** True to allow multiple users to be selected. */
|
|
1089
|
+
readOnly?: boolean;
|
|
1086
1090
|
|
|
1087
|
-
/**
|
|
1088
|
-
|
|
1089
|
-
}
|
|
1091
|
+
/** True to search the local users first. */
|
|
1092
|
+
searchLocal?: boolean;
|
|
1090
1093
|
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
*/
|
|
1094
|
-
interface ITermGroupInfo {
|
|
1095
|
-
id: string;
|
|
1096
|
-
name: string;
|
|
1094
|
+
/** The selected users. */
|
|
1095
|
+
value?: string | number | Types.IPeoplePickerUser | Array<string | number | Types.IPeoplePickerUser>;
|
|
1097
1096
|
}
|
|
1098
1097
|
|
|
1099
1098
|
/**
|
|
1100
|
-
*
|
|
1099
|
+
* Form Control Properties - People Picker
|
|
1101
1100
|
*/
|
|
1102
|
-
interface
|
|
1103
|
-
|
|
1104
|
-
|
|
1101
|
+
export interface IFormControlPropsPeoplePicker extends IFormControlProps {
|
|
1102
|
+
allowGroups?: boolean;
|
|
1103
|
+
groupId?: number;
|
|
1104
|
+
maxResults?: number;
|
|
1105
|
+
multi?: boolean;
|
|
1106
|
+
placeholder?: string;
|
|
1107
|
+
searchLocal?: boolean;
|
|
1108
|
+
value?: string | number | Types.IPeoplePickerUser | Array<string | number | Types.IPeoplePickerUser>;
|
|
1105
1109
|
}
|
|
1106
1110
|
}
|
|
1107
1111
|
|