dattatable 2.9.33 → 2.9.35
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 +1 -0
- package/build/common/installRequired.js +74 -34
- package/dist/dattatable.js +452 -452
- package/dist/dattatable.min.js +1 -1
- package/docs/assets/search.js +1 -1
- 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 +3 -2
- package/docs/classes/ItemForm.html +4 -4
- package/docs/classes/List.html +4 -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/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/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 +2 -2
- package/docs/interfaces/IListSecurity.html +2 -2
- package/docs/interfaces/IListSecurityItem.html +2 -2
- package/docs/interfaces/IShowDialogProps.html +2 -2
- package/docs/variables/DattaTable.html +1 -1
- package/docs/variables/ListSecurityDefaultGroups.html +1 -1
- package/package.json +2 -2
- package/pnpm-lock.yaml +7 -7
|
@@ -22,6 +22,7 @@ export declare class InstallationRequired {
|
|
|
22
22
|
private static _customActionsExist;
|
|
23
23
|
static get CustomActionsExist(): boolean;
|
|
24
24
|
private static checkCustomActions;
|
|
25
|
+
private static isOwnerOrAdmin;
|
|
25
26
|
private static _listsExist;
|
|
26
27
|
static get ListsExist(): boolean;
|
|
27
28
|
private static checkLists;
|
|
@@ -107,6 +107,37 @@ var InstallationRequired = /** @class */ (function () {
|
|
|
107
107
|
});
|
|
108
108
|
});
|
|
109
109
|
};
|
|
110
|
+
// Determines if the user is an owner or admin
|
|
111
|
+
InstallationRequired.isOwnerOrAdmin = function () {
|
|
112
|
+
// Return a promise
|
|
113
|
+
return new Promise(function (resolve) {
|
|
114
|
+
// Get the current user
|
|
115
|
+
(0, gd_sprest_bs_1.Web)().CurrentUser().execute(function (user) {
|
|
116
|
+
// See if they are an admin
|
|
117
|
+
if (user.IsSiteAdmin) {
|
|
118
|
+
// Resolve the request
|
|
119
|
+
resolve(true);
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
// See if the user is part of the owner's group
|
|
123
|
+
(0, gd_sprest_bs_1.Web)().AssociatedOwnerGroup().Users().getById(user.Id).execute(
|
|
124
|
+
// Is an owner
|
|
125
|
+
function () {
|
|
126
|
+
// Resolve the request
|
|
127
|
+
resolve(true);
|
|
128
|
+
},
|
|
129
|
+
// Not an owner
|
|
130
|
+
function () {
|
|
131
|
+
// Resolve the request
|
|
132
|
+
resolve(false);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}, function () {
|
|
136
|
+
// Resolve the request
|
|
137
|
+
resolve(false);
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
};
|
|
110
141
|
Object.defineProperty(InstallationRequired, "ListsExist", {
|
|
111
142
|
get: function () { return this._listsExist; },
|
|
112
143
|
enumerable: false,
|
|
@@ -181,44 +212,53 @@ var InstallationRequired = /** @class */ (function () {
|
|
|
181
212
|
// Clear the report
|
|
182
213
|
this._report = [];
|
|
183
214
|
// Return a promise
|
|
184
|
-
return new Promise(function (resolve) {
|
|
185
|
-
// Ensure this is an
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
//
|
|
208
|
-
|
|
215
|
+
return new Promise(function (resolve, reject) {
|
|
216
|
+
// Ensure this is an admin or owner
|
|
217
|
+
_this.isOwnerOrAdmin().then(function (hasPermissions) {
|
|
218
|
+
// See if they are not an owner or admin
|
|
219
|
+
if (!hasPermissions) {
|
|
220
|
+
// Reject the request
|
|
221
|
+
reject();
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
// Ensure this is an array
|
|
225
|
+
var cfgs = typeof (_this._cfg.length) === "number" ? _this._cfg : [_this._cfg];
|
|
226
|
+
// Parse the configurations
|
|
227
|
+
gd_sprest_bs_1.Helper.Executor(cfgs, function (cfg) {
|
|
228
|
+
// Return a promise
|
|
229
|
+
return new Promise(function (resolve) {
|
|
230
|
+
var numbOfErrors = _this._report.length;
|
|
231
|
+
// Check the configuration
|
|
232
|
+
Promise.all([
|
|
233
|
+
// Check the custom actions
|
|
234
|
+
_this.checkCustomActions(cfg),
|
|
235
|
+
// Check the lists
|
|
236
|
+
_this.checkLists(cfg)
|
|
237
|
+
]).then(function () {
|
|
238
|
+
// See if there are errors
|
|
239
|
+
if (_this._report.length > numbOfErrors) {
|
|
240
|
+
// Execute the event
|
|
241
|
+
props.onError ? props.onError(cfg) : null;
|
|
242
|
+
}
|
|
243
|
+
// Execute the event and see if a promise was returned
|
|
244
|
+
var returnVal = props.onCompleted ? props.onCompleted() : null;
|
|
245
|
+
if (returnVal && typeof (returnVal["then"]) === "function") {
|
|
246
|
+
// Wait for the request to complete
|
|
247
|
+
returnVal.then(function () {
|
|
248
|
+
// Resolve the request
|
|
249
|
+
resolve(_this._report.length > 0);
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
209
253
|
// Resolve the request
|
|
210
254
|
resolve(_this._report.length > 0);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
214
|
-
// Resolve the request
|
|
215
|
-
resolve(_this._report.length > 0);
|
|
216
|
-
}
|
|
255
|
+
}
|
|
256
|
+
});
|
|
217
257
|
});
|
|
258
|
+
}).then(function () {
|
|
259
|
+
// Resolve the request
|
|
260
|
+
resolve(_this._report.length > 0);
|
|
218
261
|
});
|
|
219
|
-
}).then(function () {
|
|
220
|
-
// Resolve the request
|
|
221
|
-
resolve(_this._report.length > 0);
|
|
222
262
|
});
|
|
223
263
|
});
|
|
224
264
|
};
|