dattatable 2.9.97 → 2.9.99
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 +2 -0
- package/build/common/list.js +29 -0
- package/dist/dattatable.js +568 -568
- 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/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 +3 -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
package/build/common/list.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export interface IListProps<T = Types.SP.ListItem> {
|
|
|
8
8
|
viewName?: string;
|
|
9
9
|
onInitError?: (...args: any[]) => void;
|
|
10
10
|
onInitialized?: () => void;
|
|
11
|
+
onItemLoading?: (item?: T) => T;
|
|
11
12
|
onItemsLoaded?: (items?: T[]) => void;
|
|
12
13
|
onLoadFormError?: (...args: any[]) => void;
|
|
13
14
|
onRefreshItems?: (items?: T[]) => void | PromiseLike<any>;
|
|
@@ -51,6 +52,7 @@ export declare class List<T = Types.SP.ListItem> {
|
|
|
51
52
|
/** Private Properties */
|
|
52
53
|
private _onInitError;
|
|
53
54
|
private _onInitialized?;
|
|
55
|
+
private _onItemLoading?;
|
|
54
56
|
private _onItemsLoaded?;
|
|
55
57
|
private _onLoadFormError;
|
|
56
58
|
private _onRefreshItems?;
|
package/build/common/list.js
CHANGED
|
@@ -40,6 +40,8 @@ var List = /** @class */ (function () {
|
|
|
40
40
|
this._onInitError = null;
|
|
41
41
|
// Event triggered when the component is initialized
|
|
42
42
|
this._onInitialized = null;
|
|
43
|
+
// Items loading event
|
|
44
|
+
this._onItemLoading = null;
|
|
43
45
|
// Items loaded event
|
|
44
46
|
this._onItemsLoaded = null;
|
|
45
47
|
// Error event when loading a form
|
|
@@ -56,6 +58,7 @@ var List = /** @class */ (function () {
|
|
|
56
58
|
this._odata = props.itemQuery;
|
|
57
59
|
this._onInitError = props.onInitError;
|
|
58
60
|
this._onInitialized = props.onInitialized;
|
|
61
|
+
this._onItemLoading = props.onItemLoading;
|
|
59
62
|
this._onItemsLoaded = props.onItemsLoaded;
|
|
60
63
|
this._onLoadFormError = props.onLoadFormError;
|
|
61
64
|
this._onRefreshItems = props.onRefreshItems;
|
|
@@ -305,6 +308,8 @@ var List = /** @class */ (function () {
|
|
|
305
308
|
var item = _this._items[i];
|
|
306
309
|
// See if this is the item
|
|
307
310
|
if (itemId == item.Id) {
|
|
311
|
+
// Call the event
|
|
312
|
+
newItem = _this._onItemLoading ? _this._onItemLoading(newItem) : null;
|
|
308
313
|
// Replace the item
|
|
309
314
|
_this._items[i] = newItem;
|
|
310
315
|
// Set the flag and break from the loop
|
|
@@ -357,6 +362,14 @@ var List = /** @class */ (function () {
|
|
|
357
362
|
}
|
|
358
363
|
// Query the items
|
|
359
364
|
(0, gd_sprest_bs_1.Web)(_this.WebUrl, { requestDigest: _this._requestDigest }).Lists(_this.ListName).getItemsByQuery(_this.CAMLQuery).execute(function (items) {
|
|
365
|
+
// See if the event exists
|
|
366
|
+
if (_this._onItemLoading) {
|
|
367
|
+
// Parse the items
|
|
368
|
+
for (var i = 0; i < items.results.length; i++) {
|
|
369
|
+
// Call the event
|
|
370
|
+
items.results[i] = _this._onItemLoading(items.results[i]);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
360
373
|
// Save the items
|
|
361
374
|
_this._items = items.results;
|
|
362
375
|
// Resolve the request
|
|
@@ -384,6 +397,14 @@ var List = /** @class */ (function () {
|
|
|
384
397
|
}
|
|
385
398
|
// Query the items
|
|
386
399
|
(0, gd_sprest_bs_1.Web)(_this.WebUrl, { requestDigest: _this._requestDigest }).Lists(_this.ListName).Items().query(query).execute(function (items) {
|
|
400
|
+
// See if the event exists
|
|
401
|
+
if (_this._onItemLoading) {
|
|
402
|
+
// Parse the items
|
|
403
|
+
for (var i = 0; i < items.results.length; i++) {
|
|
404
|
+
// Call the event
|
|
405
|
+
items.results[i] = _this._onItemLoading(items.results[i]);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
387
408
|
// Save the items
|
|
388
409
|
_this._items = items.results;
|
|
389
410
|
// Resolve the request
|
|
@@ -410,6 +431,14 @@ var List = /** @class */ (function () {
|
|
|
410
431
|
}
|
|
411
432
|
// Query the items
|
|
412
433
|
(0, gd_sprest_bs_1.Web)(_this.WebUrl, { requestDigest: _this._requestDigest }).Lists(_this.ListName).getItems(_this.ViewXml).execute(function (items) {
|
|
434
|
+
// See if the event exists
|
|
435
|
+
if (_this._onItemLoading) {
|
|
436
|
+
// Parse the items
|
|
437
|
+
for (var i = 0; i < items.results.length; i++) {
|
|
438
|
+
// Call the event
|
|
439
|
+
items.results[i] = _this._onItemLoading(items.results[i]);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
413
442
|
// Save the items
|
|
414
443
|
_this._items = items.results;
|
|
415
444
|
// Resolve the request
|