dattatable 2.10.31 → 2.10.33
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/build/common/documents.d.ts +2 -1
- package/build/common/documents.js +12 -6
- package/build/dashboard/filter.d.ts +2 -0
- package/build/dashboard/filter.js +3 -0
- package/build/dashboard/index.d.ts +1 -0
- package/build/dashboard/index.js +1 -0
- package/dist/dattatable.js +580 -580
- package/dist/dattatable.min.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Accordion.html +2 -2
- package/docs/classes/AuditLog.html +2 -2
- package/docs/classes/CanvasForm.html +2 -2
- package/docs/classes/Comments.html +2 -2
- package/docs/classes/Dashboard.html +4 -4
- package/docs/classes/DataTable.html +3 -3
- package/docs/classes/Documents.html +7 -6
- package/docs/classes/FilterSlideout.html +3 -2
- package/docs/classes/Footer.html +2 -2
- package/docs/classes/Header.html +2 -2
- package/docs/classes/InstallationRequired.html +2 -2
- package/docs/classes/ItemForm.html +4 -4
- package/docs/classes/List.html +4 -4
- package/docs/classes/ListSecurity.html +2 -2
- package/docs/classes/LoadingDialog.html +2 -2
- package/docs/classes/Modal.html +2 -2
- package/docs/classes/Navigation.html +3 -3
- package/docs/classes/Tiles.html +2 -2
- package/docs/classes/Timeout.html +2 -2
- package/docs/enums/ActionButtonTypes.html +2 -2
- package/docs/functions/formatBytes.html +1 -1
- package/docs/functions/formatDateValue.html +1 -1
- package/docs/functions/formatTimeValue.html +1 -1
- package/docs/functions/getContextInfo.html +1 -1
- package/docs/functions/getFileExt.html +1 -1
- package/docs/functions/waitForTheme.html +1 -1
- package/docs/interfaces/IAccordion.html +2 -2
- package/docs/interfaces/IAccordionProps.html +2 -2
- package/docs/interfaces/IAuditLogItem.html +2 -2
- package/docs/interfaces/IAuditLogItemCreation.html +2 -2
- package/docs/interfaces/IAuditLogProps.html +2 -2
- package/docs/interfaces/IAuditLogViewProps.html +2 -2
- package/docs/interfaces/ICommentsItem.html +2 -2
- package/docs/interfaces/IDashboardProps.html +2 -2
- package/docs/interfaces/IDataTable.html +2 -2
- package/docs/interfaces/IDataTableProps.html +2 -2
- package/docs/interfaces/IDocumentsProps.html +2 -2
- package/docs/interfaces/IFilterItem.html +2 -2
- package/docs/interfaces/IFilterProps.html +3 -2
- package/docs/interfaces/IFooterProps.html +2 -2
- package/docs/interfaces/IHeaderProps.html +2 -2
- package/docs/interfaces/IInstallProps.html +2 -2
- package/docs/interfaces/IItemFormCreateProps.html +2 -2
- package/docs/interfaces/IItemFormEditProps.html +2 -2
- package/docs/interfaces/IItemFormTab.html +2 -2
- package/docs/interfaces/IItemFormTabInfo.html +2 -2
- package/docs/interfaces/IItemFormViewProps.html +2 -2
- package/docs/interfaces/IListProps.html +2 -2
- package/docs/interfaces/IListSecurity.html +2 -2
- package/docs/interfaces/IListSecurityItem.html +2 -2
- package/docs/interfaces/IShowDialogProps.html +2 -2
- package/docs/interfaces/ITiles.html +2 -2
- package/docs/interfaces/ITilesProps.html +2 -2
- package/docs/variables/DattaTable.html +1 -1
- package/docs/variables/ListSecurityDefaultGroups.html +1 -1
- package/package.json +2 -2
|
@@ -113,9 +113,10 @@ export declare class Documents {
|
|
|
113
113
|
private renderTable;
|
|
114
114
|
private uploadFile;
|
|
115
115
|
/** Public Methods */
|
|
116
|
+
static download(fileUrl: string, webUrl?: string): void;
|
|
116
117
|
generateActionButton(btnType: number, file: Types.SP.File): HTMLElement;
|
|
117
118
|
static isWopi(filename: string): boolean;
|
|
118
|
-
static open(fileUrl: string, edit?: boolean): void;
|
|
119
|
+
static open(fileUrl: string, edit?: boolean, webUrl?: string): void;
|
|
119
120
|
refresh(): void;
|
|
120
121
|
search(value: string): void;
|
|
121
122
|
}
|
|
@@ -649,8 +649,8 @@ var Documents = /** @class */ (function () {
|
|
|
649
649
|
type: gd_sprest_bs_1.Components.ButtonTypes.OutlineSecondary,
|
|
650
650
|
onClick: function () {
|
|
651
651
|
if (_this.CanView) {
|
|
652
|
-
//
|
|
653
|
-
|
|
652
|
+
// Download the document
|
|
653
|
+
Documents.download(file.ServerRelativeUrl, _this._props.webUrl);
|
|
654
654
|
}
|
|
655
655
|
}
|
|
656
656
|
},
|
|
@@ -668,7 +668,7 @@ var Documents = /** @class */ (function () {
|
|
|
668
668
|
onClick: function () {
|
|
669
669
|
if (isWopi && _this.CanEdit) {
|
|
670
670
|
// Open the file in a new tab
|
|
671
|
-
Documents.open(file.ServerRelativeUrl, true);
|
|
671
|
+
Documents.open(file.ServerRelativeUrl, true, _this._props.webUrl);
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
674
|
},
|
|
@@ -800,7 +800,7 @@ var Documents = /** @class */ (function () {
|
|
|
800
800
|
onClick: function () {
|
|
801
801
|
if (_this.CanView) {
|
|
802
802
|
// Open the file
|
|
803
|
-
Documents.open(file.ServerRelativeUrl);
|
|
803
|
+
Documents.open(file.ServerRelativeUrl, false, _this._props.webUrl);
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
806
|
},
|
|
@@ -1152,6 +1152,11 @@ var Documents = /** @class */ (function () {
|
|
|
1152
1152
|
});
|
|
1153
1153
|
};
|
|
1154
1154
|
/** Public Methods */
|
|
1155
|
+
// Downloads the document
|
|
1156
|
+
Documents.download = function (fileUrl, webUrl) {
|
|
1157
|
+
if (webUrl === void 0) { webUrl = gd_sprest_bs_1.ContextInfo.webServerRelativeUrl; }
|
|
1158
|
+
window.open(webUrl + "/_layouts/15/download.aspx?SourceUrl=" + fileUrl, "_blank");
|
|
1159
|
+
};
|
|
1155
1160
|
// Generates an action button
|
|
1156
1161
|
Documents.prototype.generateActionButton = function (btnType, file) {
|
|
1157
1162
|
// Return the button
|
|
@@ -1184,14 +1189,15 @@ var Documents = /** @class */ (function () {
|
|
|
1184
1189
|
}
|
|
1185
1190
|
};
|
|
1186
1191
|
// Opens the document
|
|
1187
|
-
Documents.open = function (fileUrl, edit) {
|
|
1192
|
+
Documents.open = function (fileUrl, edit, webUrl) {
|
|
1188
1193
|
if (edit === void 0) { edit = false; }
|
|
1194
|
+
if (webUrl === void 0) { webUrl = gd_sprest_bs_1.ContextInfo.webServerRelativeUrl; }
|
|
1189
1195
|
var fileData = fileUrl.split('/');
|
|
1190
1196
|
var fileName = fileData[fileData.length - 1];
|
|
1191
1197
|
// See if this is an office doc
|
|
1192
1198
|
if (this.isWopi(fileName)) {
|
|
1193
1199
|
// Open the document
|
|
1194
|
-
window.open(
|
|
1200
|
+
window.open(webUrl + "/_layouts/15/WopiFrame.aspx?sourcedoc=" + fileUrl + "&action=" + (edit ? "edit" : "view"), "_blank");
|
|
1195
1201
|
}
|
|
1196
1202
|
else {
|
|
1197
1203
|
// Open the document
|
|
@@ -17,6 +17,7 @@ export interface IFilterProps {
|
|
|
17
17
|
onClear?: () => void;
|
|
18
18
|
onFilter?: (value: string | string[], item?: Components.ICheckboxGroupItem) => void;
|
|
19
19
|
onRendered?: (el: HTMLElement) => void;
|
|
20
|
+
onShowFilter?: () => void;
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
23
|
* Filter Slideout
|
|
@@ -28,6 +29,7 @@ export declare class FilterSlideout {
|
|
|
28
29
|
private _items;
|
|
29
30
|
private _onClear;
|
|
30
31
|
private _onFilter;
|
|
32
|
+
private _onShowFilter;
|
|
31
33
|
constructor(props: IFilterProps);
|
|
32
34
|
private generateFilters;
|
|
33
35
|
private generateItem;
|
|
@@ -17,6 +17,7 @@ var FilterSlideout = /** @class */ (function () {
|
|
|
17
17
|
this._filters = props.filters || [];
|
|
18
18
|
this._onClear = props.onClear;
|
|
19
19
|
this._onFilter = props.onFilter;
|
|
20
|
+
this._onShowFilter = props.onShowFilter;
|
|
20
21
|
// Initialize the variables
|
|
21
22
|
this._cbs = [];
|
|
22
23
|
this._items = [];
|
|
@@ -152,6 +153,8 @@ var FilterSlideout = /** @class */ (function () {
|
|
|
152
153
|
// Set the header and body
|
|
153
154
|
canvas_1.CanvasForm.setHeader('<h5 class="m-0">Filters</h5>');
|
|
154
155
|
canvas_1.CanvasForm.setBody(this._el || "<p>Loading the Filters...</p>");
|
|
156
|
+
// Call the event
|
|
157
|
+
this._onShowFilter ? this._onShowFilter() : null;
|
|
155
158
|
// Show the filters
|
|
156
159
|
canvas_1.CanvasForm.show();
|
|
157
160
|
};
|
package/build/dashboard/index.js
CHANGED
|
@@ -119,6 +119,7 @@ var Dashboard = /** @class */ (function () {
|
|
|
119
119
|
filters: this._props.filters ? this._props.filters.items : [],
|
|
120
120
|
onClear: this._props.filters ? this._props.filters.onClear : null,
|
|
121
121
|
onRendered: this._props.filters ? this._props.filters.onRendered : null,
|
|
122
|
+
onShowFilter: this._props.filters ? this._props.filters.onShowFilter : null,
|
|
122
123
|
onFilter: this.IsAccordion || this.IsTiles ? function (value, item) {
|
|
123
124
|
var values = typeof (value) === "string" ? [value] : value;
|
|
124
125
|
// See if this is an accordion
|