dattatable 2.11.60 → 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.
- package/build/common/installRequired.d.ts +2 -1
- package/build/common/installRequired.js +18 -4
- package/build/dashboard/table.js +10 -7
- package/dist/dattatable.js +616 -605
- 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 +4 -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 +17 -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 +3 -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 +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
|
|
190
|
-
|
|
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
|
package/build/dashboard/table.js
CHANGED
|
@@ -34,13 +34,16 @@ var DataTable = /** @class */ (function () {
|
|
|
34
34
|
break;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
//
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
//
|
|
43
|
-
column.onRenderCell
|
|
37
|
+
// See if the row item was found, otherwise it wasn't rendered from the addRows function
|
|
38
|
+
if (rowItem) {
|
|
39
|
+
// Parse the columns
|
|
40
|
+
for (var i = 0; i < _this._props.columns.length; i++) {
|
|
41
|
+
var column = _this._props.columns[i];
|
|
42
|
+
// See if an event exists
|
|
43
|
+
if (column.onRenderCell) {
|
|
44
|
+
// Call it
|
|
45
|
+
column.onRenderCell(row.children[i], column, rowItem || data, dataIndex);
|
|
46
|
+
}
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
49
|
},
|