dattatable 2.9.33 → 2.9.34
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 -0
- package/build/common/installRequired.js +84 -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 +4 -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,10 +22,12 @@ 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;
|
|
28
29
|
static requiresInstall(props: IInstallProps): PromiseLike<boolean>;
|
|
29
30
|
static showDialog(props?: IShowDialogProps): void;
|
|
30
31
|
private static showErrorDialog;
|
|
32
|
+
private static showNoAccessDialog;
|
|
31
33
|
}
|
|
@@ -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,55 @@ 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
|
+
// Show the dialog
|
|
221
|
+
_this.showNoAccessDialog();
|
|
222
|
+
// Reject the request
|
|
223
|
+
reject();
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
// Ensure this is an array
|
|
227
|
+
var cfgs = typeof (_this._cfg.length) === "number" ? _this._cfg : [_this._cfg];
|
|
228
|
+
// Parse the configurations
|
|
229
|
+
gd_sprest_bs_1.Helper.Executor(cfgs, function (cfg) {
|
|
230
|
+
// Return a promise
|
|
231
|
+
return new Promise(function (resolve) {
|
|
232
|
+
var numbOfErrors = _this._report.length;
|
|
233
|
+
// Check the configuration
|
|
234
|
+
Promise.all([
|
|
235
|
+
// Check the custom actions
|
|
236
|
+
_this.checkCustomActions(cfg),
|
|
237
|
+
// Check the lists
|
|
238
|
+
_this.checkLists(cfg)
|
|
239
|
+
]).then(function () {
|
|
240
|
+
// See if there are errors
|
|
241
|
+
if (_this._report.length > numbOfErrors) {
|
|
242
|
+
// Execute the event
|
|
243
|
+
props.onError ? props.onError(cfg) : null;
|
|
244
|
+
}
|
|
245
|
+
// Execute the event and see if a promise was returned
|
|
246
|
+
var returnVal = props.onCompleted ? props.onCompleted() : null;
|
|
247
|
+
if (returnVal && typeof (returnVal["then"]) === "function") {
|
|
248
|
+
// Wait for the request to complete
|
|
249
|
+
returnVal.then(function () {
|
|
250
|
+
// Resolve the request
|
|
251
|
+
resolve(_this._report.length > 0);
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
209
255
|
// Resolve the request
|
|
210
256
|
resolve(_this._report.length > 0);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
214
|
-
// Resolve the request
|
|
215
|
-
resolve(_this._report.length > 0);
|
|
216
|
-
}
|
|
257
|
+
}
|
|
258
|
+
});
|
|
217
259
|
});
|
|
260
|
+
}).then(function () {
|
|
261
|
+
// Resolve the request
|
|
262
|
+
resolve(_this._report.length > 0);
|
|
218
263
|
});
|
|
219
|
-
}).then(function () {
|
|
220
|
-
// Resolve the request
|
|
221
|
-
resolve(_this._report.length > 0);
|
|
222
264
|
});
|
|
223
265
|
});
|
|
224
266
|
};
|
|
@@ -331,6 +373,14 @@ var InstallationRequired = /** @class */ (function () {
|
|
|
331
373
|
// Show the dialog
|
|
332
374
|
modal_1.Modal.show();
|
|
333
375
|
};
|
|
376
|
+
InstallationRequired.showNoAccessDialog = function () {
|
|
377
|
+
// Set the header
|
|
378
|
+
modal_1.Modal.setHeader("Access Denied");
|
|
379
|
+
// Set the body
|
|
380
|
+
modal_1.Modal.setBody("The component has not been configured or you do not have permissions to view the application. Please contact your administrator for additional help.");
|
|
381
|
+
// Show the dialog
|
|
382
|
+
modal_1.Modal.show();
|
|
383
|
+
};
|
|
334
384
|
InstallationRequired._cfg = null;
|
|
335
385
|
InstallationRequired._report = null;
|
|
336
386
|
// Custom Actions exists
|