dattatable 2.9.95 → 2.9.98

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.
Files changed (64) hide show
  1. package/build/common/list.d.ts +2 -0
  2. package/build/common/list.js +29 -0
  3. package/build/dashboard/index.d.ts +1 -0
  4. package/build/dashboard/tiles.d.ts +1 -0
  5. package/build/dashboard/tiles.js +2 -1
  6. package/dist/dattatable.js +568 -568
  7. package/dist/dattatable.min.js +1 -1
  8. package/docs/assets/search.js +1 -1
  9. package/docs/classes/Accordion.html +2 -2
  10. package/docs/classes/AuditLog.html +2 -2
  11. package/docs/classes/CanvasForm.html +2 -2
  12. package/docs/classes/Comments.html +2 -2
  13. package/docs/classes/Dashboard.html +4 -4
  14. package/docs/classes/DataTable.html +3 -3
  15. package/docs/classes/Documents.html +6 -6
  16. package/docs/classes/FilterSlideout.html +2 -2
  17. package/docs/classes/Footer.html +2 -2
  18. package/docs/classes/Header.html +2 -2
  19. package/docs/classes/InstallationRequired.html +2 -2
  20. package/docs/classes/ItemForm.html +4 -4
  21. package/docs/classes/List.html +5 -4
  22. package/docs/classes/ListSecurity.html +2 -2
  23. package/docs/classes/LoadingDialog.html +2 -2
  24. package/docs/classes/Modal.html +2 -2
  25. package/docs/classes/Navigation.html +3 -3
  26. package/docs/classes/Tiles.html +2 -2
  27. package/docs/classes/Timeout.html +2 -2
  28. package/docs/enums/ActionButtonTypes.html +2 -2
  29. package/docs/functions/formatBytes.html +1 -1
  30. package/docs/functions/formatDateValue.html +1 -1
  31. package/docs/functions/formatTimeValue.html +1 -1
  32. package/docs/functions/getContextInfo.html +1 -1
  33. package/docs/functions/getFileExt.html +1 -1
  34. package/docs/functions/waitForTheme.html +1 -1
  35. package/docs/interfaces/IAccordion.html +2 -2
  36. package/docs/interfaces/IAccordionProps.html +2 -2
  37. package/docs/interfaces/IAuditLogItem.html +2 -2
  38. package/docs/interfaces/IAuditLogItemCreation.html +2 -2
  39. package/docs/interfaces/IAuditLogProps.html +2 -2
  40. package/docs/interfaces/IAuditLogViewProps.html +2 -2
  41. package/docs/interfaces/ICommentsItem.html +2 -2
  42. package/docs/interfaces/IDashboardProps.html +2 -2
  43. package/docs/interfaces/IDataTable.html +2 -2
  44. package/docs/interfaces/IDataTableProps.html +2 -2
  45. package/docs/interfaces/IDocumentsProps.html +2 -2
  46. package/docs/interfaces/IFilterItem.html +2 -2
  47. package/docs/interfaces/IFilterProps.html +2 -2
  48. package/docs/interfaces/IFooterProps.html +2 -2
  49. package/docs/interfaces/IHeaderProps.html +2 -2
  50. package/docs/interfaces/IInstallProps.html +2 -2
  51. package/docs/interfaces/IItemFormCreateProps.html +2 -2
  52. package/docs/interfaces/IItemFormEditProps.html +2 -2
  53. package/docs/interfaces/IItemFormTab.html +2 -2
  54. package/docs/interfaces/IItemFormTabInfo.html +2 -2
  55. package/docs/interfaces/IItemFormViewProps.html +2 -2
  56. package/docs/interfaces/IListProps.html +3 -2
  57. package/docs/interfaces/IListSecurity.html +2 -2
  58. package/docs/interfaces/IListSecurityItem.html +2 -2
  59. package/docs/interfaces/IShowDialogProps.html +2 -2
  60. package/docs/interfaces/ITiles.html +2 -2
  61. package/docs/interfaces/ITilesProps.html +3 -2
  62. package/docs/variables/DattaTable.html +1 -1
  63. package/docs/variables/ListSecurityDefaultGroups.html +1 -1
  64. package/package.json +2 -2
@@ -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) => void;
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?;
@@ -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
+ _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
+ _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
+ _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
+ _this._onItemLoading(items.results[i]);
440
+ }
441
+ }
413
442
  // Save the items
414
443
  _this._items = items.results;
415
444
  // Resolve the request
@@ -86,6 +86,7 @@ export interface IDashboardProps {
86
86
  onBodyRendered?: (el?: HTMLElement, item?: any) => void;
87
87
  onCardRendered?: (el?: HTMLElement, item?: any) => void;
88
88
  onCardRendering?: (item?: Components.ICardProps) => void;
89
+ onColumnRendered?: (el?: HTMLElement, item?: any) => void;
89
90
  onFooterRendered?: (el?: HTMLElement, item?: any) => void;
90
91
  onHeaderRendered?: (el?: HTMLElement, item?: any) => void;
91
92
  onPaginationRendered?: (el?: HTMLElement) => void;
@@ -13,6 +13,7 @@ export interface ITilesProps {
13
13
  onBodyRendered?: (el?: HTMLElement, item?: any) => void;
14
14
  onCardRendered?: (el?: HTMLElement, item?: any) => void;
15
15
  onCardRendering?: (item?: Components.ICardProps) => void;
16
+ onColumnRendered?: (el?: HTMLElement, item?: any) => void;
16
17
  onFooterRendered?: (el?: HTMLElement, item?: any) => void;
17
18
  onHeaderRendered?: (el?: HTMLElement, item?: any) => void;
18
19
  onPaginationRendered?: (el?: HTMLElement) => void;
@@ -171,7 +171,8 @@ var Tiles = /** @class */ (function () {
171
171
  this._tiles = gd_sprest_bs_1.Components.CardGroup({
172
172
  el: this._props.el,
173
173
  cards: cards,
174
- colSize: this._props.colSize
174
+ colSize: this._props.colSize || 4,
175
+ onColRender: this._props.onColumnRendered
175
176
  });
176
177
  };
177
178
  // Updates the visibility of the tiles