dattatable 2.11.61 → 2.11.62

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 (69) hide show
  1. package/build/common/installRequired.d.ts +2 -1
  2. package/build/common/installRequired.js +18 -4
  3. package/dist/dattatable.js +616 -605
  4. package/dist/dattatable.min.js +1 -1
  5. package/docs/assets/search.js +1 -1
  6. package/docs/classes/Accordion.html +2 -2
  7. package/docs/classes/AuditLog.html +2 -2
  8. package/docs/classes/CanvasForm.html +2 -2
  9. package/docs/classes/Comments.html +2 -2
  10. package/docs/classes/Dashboard.html +4 -4
  11. package/docs/classes/DataTable.html +3 -3
  12. package/docs/classes/Documents.html +6 -6
  13. package/docs/classes/FilterSlideout.html +2 -2
  14. package/docs/classes/Footer.html +2 -2
  15. package/docs/classes/Header.html +2 -2
  16. package/docs/classes/InstallationRequired.html +2 -2
  17. package/docs/classes/ItemForm.html +4 -4
  18. package/docs/classes/List.html +4 -4
  19. package/docs/classes/ListConfig.html +2 -2
  20. package/docs/classes/ListSecurity.html +2 -2
  21. package/docs/classes/LoadingDialog.html +2 -2
  22. package/docs/classes/Modal.html +2 -2
  23. package/docs/classes/Navigation.html +3 -3
  24. package/docs/classes/Tiles.html +2 -2
  25. package/docs/classes/Timeout.html +2 -2
  26. package/docs/enums/ActionButtonTypes.html +2 -2
  27. package/docs/functions/formatBytes.html +1 -1
  28. package/docs/functions/formatDateValue.html +1 -1
  29. package/docs/functions/formatTimeValue.html +1 -1
  30. package/docs/functions/getContextInfo.html +1 -1
  31. package/docs/functions/getFileExt.html +1 -1
  32. package/docs/functions/waitForTheme.html +1 -1
  33. package/docs/interfaces/IAccordion.html +2 -2
  34. package/docs/interfaces/IAccordionProps.html +2 -2
  35. package/docs/interfaces/IAuditLogItem.html +17 -13
  36. package/docs/interfaces/IAuditLogItemCreation.html +2 -2
  37. package/docs/interfaces/IAuditLogProps.html +2 -2
  38. package/docs/interfaces/IAuditLogViewProps.html +2 -2
  39. package/docs/interfaces/ICommentsItem.html +2 -2
  40. package/docs/interfaces/ICreateLookupData.html +2 -2
  41. package/docs/interfaces/IDashboardProps.html +2 -2
  42. package/docs/interfaces/IDataTable.html +2 -2
  43. package/docs/interfaces/IDataTableProps.html +2 -2
  44. package/docs/interfaces/IDocumentsProps.html +2 -2
  45. package/docs/interfaces/IFilterItem.html +2 -2
  46. package/docs/interfaces/IFilterProps.html +2 -2
  47. package/docs/interfaces/IFooterProps.html +2 -2
  48. package/docs/interfaces/IGenerateLookupDataProps.html +2 -2
  49. package/docs/interfaces/IHeaderProps.html +2 -2
  50. package/docs/interfaces/IInstallProps.html +3 -2
  51. package/docs/interfaces/IItemFormCreateProps.html +2 -2
  52. package/docs/interfaces/IItemFormEditProps.html +2 -2
  53. package/docs/interfaces/IItemFormSaveProps.html +2 -2
  54. package/docs/interfaces/IItemFormTab.html +2 -2
  55. package/docs/interfaces/IItemFormTabInfo.html +2 -2
  56. package/docs/interfaces/IItemFormViewProps.html +2 -2
  57. package/docs/interfaces/IListConfig.html +2 -2
  58. package/docs/interfaces/IListConfigProps.html +2 -2
  59. package/docs/interfaces/IListProps.html +2 -2
  60. package/docs/interfaces/IListSecurity.html +2 -2
  61. package/docs/interfaces/IListSecurityItem.html +2 -2
  62. package/docs/interfaces/ILookupData.html +2 -2
  63. package/docs/interfaces/IShowDialogProps.html +2 -2
  64. package/docs/interfaces/ITiles.html +2 -2
  65. package/docs/interfaces/ITilesProps.html +2 -2
  66. package/docs/interfaces/IValidateLookupsProps.html +2 -2
  67. package/docs/variables/DattaTable.html +1 -1
  68. package/docs/variables/ListSecurityDefaultGroups.html +1 -1
  69. package/package.json +1 -1
@@ -1,7 +1,8 @@
1
- import { Components, Helper } from "gd-sprest-bs";
1
+ import { Components, Helper, Types } from "gd-sprest-bs";
2
2
  export interface IInstallProps {
3
3
  cfg: Helper.ISPConfig | Helper.ISPConfig[];
4
4
  onCompleted?: () => any;
5
+ onHasPermissions?: (permissions?: Types.SP.BasePermissions) => boolean | PromiseLike<boolean>;
5
6
  onError?: (cfg: Helper.ISPConfig) => void;
6
7
  }
7
8
  export interface IShowDialogProps {
@@ -174,7 +174,7 @@ var InstallationRequired = /** @class */ (function () {
174
174
  });
175
175
  };
176
176
  // Determines if the user is an owner or admin
177
- InstallationRequired.checkUserPermissions = function () {
177
+ InstallationRequired.checkUserPermissions = function (onHasPermissions) {
178
178
  var _this = this;
179
179
  // Return a promise
180
180
  return new Promise(function (resolve) {
@@ -186,8 +186,22 @@ var InstallationRequired = /** @class */ (function () {
186
186
  (0, gd_sprest_bs_1.Web)(_this._webUrl).getUserEffectivePermissions(user.LoginName).execute(
187
187
  // Success
188
188
  function (permissions) {
189
- // See if the user has manage web rights
190
- resolve(gd_sprest_bs_1.Helper.hasPermissions(permissions.GetUserEffectivePermissions, gd_sprest_bs_1.SPTypes.BasePermissionTypes.ManageLists));
189
+ // See if there is an event
190
+ if (onHasPermissions) {
191
+ // Call the event
192
+ var callback = onHasPermissions(permissions.GetUserEffectivePermissions);
193
+ if (typeof (callback) === "boolean") {
194
+ resolve(callback);
195
+ }
196
+ else {
197
+ // Wait for the promise to complete and resolve the request
198
+ callback === null || callback === void 0 ? void 0 : callback.then(resolve);
199
+ }
200
+ }
201
+ else {
202
+ // See if the user has manage web rights
203
+ resolve(gd_sprest_bs_1.Helper.hasPermissions(permissions.GetUserEffectivePermissions, gd_sprest_bs_1.SPTypes.BasePermissionTypes.ManageLists));
204
+ }
191
205
  },
192
206
  // Error
193
207
  function () {
@@ -212,7 +226,7 @@ var InstallationRequired = /** @class */ (function () {
212
226
  // Return a promise
213
227
  return new Promise(function (resolve, reject) {
214
228
  // Check the user permissions
215
- _this.checkUserPermissions().then(function (hasPermissions) {
229
+ _this.checkUserPermissions(props.onHasPermissions).then(function (hasPermissions) {
216
230
  // See if they are not an owner or admin
217
231
  if (!hasPermissions) {
218
232
  // Reject the request