dattatable 2.10.30 → 2.10.32
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/common/list.js +6 -2
- 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 +2 -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 +2 -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
|
package/build/common/list.js
CHANGED
|
@@ -215,6 +215,7 @@ var List = /** @class */ (function () {
|
|
|
215
215
|
};
|
|
216
216
|
// Deletes the item and removes it from the internal items array
|
|
217
217
|
List.prototype.deleteItem = function (itemId) {
|
|
218
|
+
var _this = this;
|
|
218
219
|
// Parse the items
|
|
219
220
|
for (var i = 0; i < this.Items.length; i++) {
|
|
220
221
|
var item = this.Items[i];
|
|
@@ -225,8 +226,11 @@ var List = /** @class */ (function () {
|
|
|
225
226
|
break;
|
|
226
227
|
}
|
|
227
228
|
}
|
|
228
|
-
//
|
|
229
|
-
return
|
|
229
|
+
// Return a promise
|
|
230
|
+
return new Promise(function (resolve, reject) {
|
|
231
|
+
// Delete the item
|
|
232
|
+
_this.ListInfo.Items(itemId).delete().execute(resolve, reject);
|
|
233
|
+
});
|
|
230
234
|
};
|
|
231
235
|
// Displays the edit form
|
|
232
236
|
List.prototype.editForm = function (props) {
|