dattatable 2.11.20 → 2.11.22
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/list.d.ts +1 -0
- package/build/common/list.js +52 -0
- package/dist/dattatable.js +594 -594
- 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 +6 -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 +5 -4
- package/docs/classes/ListConfig.html +2 -2
- 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 +13 -13
- 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/ICreateLookupData.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/IGenerateLookupDataProps.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/IItemFormSaveProps.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/IListConfig.html +2 -2
- package/docs/interfaces/IListConfigProps.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/ILookupData.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/interfaces/IValidateLookupsProps.html +2 -2
- package/docs/variables/DattaTable.html +1 -1
- package/docs/variables/ListSecurityDefaultGroups.html +1 -1
- package/package.json +2 -2
package/build/common/list.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export declare class List<T = Types.SP.ListItem> {
|
|
|
66
66
|
createItem(values: any): PromiseLike<T>;
|
|
67
67
|
deleteItem(itemId: number): PromiseLike<void>;
|
|
68
68
|
editForm(props: IItemFormEditProps): void;
|
|
69
|
+
getChanges(id: number): PromiseLike<any>;
|
|
69
70
|
getField(name: string): any;
|
|
70
71
|
getFieldById(id?: string): Types.SP.Field;
|
|
71
72
|
getItem(id: number): T;
|
package/build/common/list.js
CHANGED
|
@@ -247,6 +247,58 @@ var List = /** @class */ (function () {
|
|
|
247
247
|
// Display the form
|
|
248
248
|
_1.ItemForm.edit(props).then(null, this._onLoadFormError);
|
|
249
249
|
};
|
|
250
|
+
// Gets the changes for a list item's version history
|
|
251
|
+
List.prototype.getChanges = function (id) {
|
|
252
|
+
var _this = this;
|
|
253
|
+
// Return a promise
|
|
254
|
+
return new Promise(function (resolve, reject) {
|
|
255
|
+
var changes = {};
|
|
256
|
+
// Get the item
|
|
257
|
+
var item = _this.getItem(id);
|
|
258
|
+
if (item) {
|
|
259
|
+
// Get the versions for this item
|
|
260
|
+
item["Versions"]().execute(function (versions) {
|
|
261
|
+
// Parse the versions
|
|
262
|
+
for (var i = 0; i < versions.results.length - 1; i++) {
|
|
263
|
+
var version = versions.results[i];
|
|
264
|
+
var prevVersion = versions.results[i + 1];
|
|
265
|
+
var versionId = version.VersionLabel;
|
|
266
|
+
// Parse the keys
|
|
267
|
+
for (var key in version) {
|
|
268
|
+
// Skip functions
|
|
269
|
+
if (typeof (version[key]) === "function") {
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
// See if this is an object
|
|
273
|
+
var isEqual = true;
|
|
274
|
+
if (typeof (version[key]) === "object") {
|
|
275
|
+
// Parse the props
|
|
276
|
+
for (var prop in version[key]) {
|
|
277
|
+
// See if the sub-property doesn't match
|
|
278
|
+
if (version[key][prop] != prevVersion[key][prop]) {
|
|
279
|
+
// Set the flag
|
|
280
|
+
isEqual = false;
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
// See if they are equal
|
|
287
|
+
isEqual = version[key] == prevVersion[key];
|
|
288
|
+
}
|
|
289
|
+
// See if they aren't equal
|
|
290
|
+
if (!isEqual) {
|
|
291
|
+
// Append the change
|
|
292
|
+
changes[versionId][key] = version[key];
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
// Resolve the request
|
|
297
|
+
resolve(changes);
|
|
298
|
+
}, reject);
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
};
|
|
250
302
|
// Gets a list field by internal or title
|
|
251
303
|
List.prototype.getField = function (name) {
|
|
252
304
|
var titleField = null;
|