identity-admin 1.22.6 → 1.22.8
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.
|
@@ -57,6 +57,7 @@ class ActionsGenerator {
|
|
|
57
57
|
return extraActionsObject;
|
|
58
58
|
}
|
|
59
59
|
static getActions(actions, currentUser) {
|
|
60
|
+
var _a;
|
|
60
61
|
var actionObject = {
|
|
61
62
|
show: { isAccessible: true },
|
|
62
63
|
new: { isAccessible: true },
|
|
@@ -79,6 +80,7 @@ class ActionsGenerator {
|
|
|
79
80
|
else if (key === 'extras') {
|
|
80
81
|
actionObject[key] = actions[key];
|
|
81
82
|
}
|
|
83
|
+
actionObject[key].reloadAfterAction = (_a = actions[key]) === null || _a === void 0 ? void 0 : _a.reloadAfterAction;
|
|
82
84
|
}
|
|
83
85
|
return actionObject;
|
|
84
86
|
}
|
|
@@ -60,6 +60,7 @@ class SchemaGenerator {
|
|
|
60
60
|
model[field].apiRoute = model[field].apiRoute ? model[field].apiRoute : schemaField.options.ref ? 'admin/' + StringUtils_1.default.lowerCaseFirstLetter(pluralize(schemaField.options.ref)) : undefined;
|
|
61
61
|
model[field].enumValues = (model[field].type === helpers_1.FieldTypes.ENUM || model[field].arrayType === helpers_1.FieldTypes.ENUM) ? model[field].enumValues ? model[field].enumValues : schemaField.enumValues : undefined;
|
|
62
62
|
model[field].value = model[field].value ? model[field].value : translation ? translation : refCheck ? StringUtils_1.default.checkRefId(field) ? StringUtils_1.default.convertCamelCaseToWord(field.slice(0, -2)) : StringUtils_1.default.convertCamelCaseToWord(field) : StringUtils_1.default.convertCamelCaseToWord(field);
|
|
63
|
+
model[field].isDraggable = model[field].isDraggable === false ? false : true;
|
|
63
64
|
});
|
|
64
65
|
if (model.virtuals) {
|
|
65
66
|
for (const extraField in model.virtuals) {
|
|
@@ -27,6 +27,11 @@ interface Action {
|
|
|
27
27
|
* You can ovveride any of these values here.
|
|
28
28
|
*/
|
|
29
29
|
isAccessible?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Specify if the page requires to be reloaded after executing the action
|
|
32
|
+
* @default Fale for show, edit, delete, and new.
|
|
33
|
+
*/
|
|
34
|
+
reloadAfterAction?: boolean;
|
|
30
35
|
/**
|
|
31
36
|
* The property that manages which admin role can use this action.
|
|
32
37
|
* This function's result alters the isAccessible value. So no need to use both properties.
|
|
@@ -205,6 +210,11 @@ export interface IFieldValue {
|
|
|
205
210
|
* @default 'Same as schema''
|
|
206
211
|
*/
|
|
207
212
|
arrayType?: FieldTypes;
|
|
213
|
+
/**
|
|
214
|
+
* Specify if the array is draggable. Only used when the field type is an array.
|
|
215
|
+
* @default 'true''
|
|
216
|
+
*/
|
|
217
|
+
isDraggable?: boolean;
|
|
208
218
|
/**
|
|
209
219
|
* Can be used only if this field is a reference to the Image collection
|
|
210
220
|
*/
|
|
@@ -315,7 +325,12 @@ interface ExtraAction {
|
|
|
315
325
|
*/
|
|
316
326
|
actionType: ActionTypes;
|
|
317
327
|
/**
|
|
318
|
-
* Guard message that appears before executing the action to confirm execution.
|
|
328
|
+
* Guard message title that appears before executing the action to confirm execution.
|
|
329
|
+
* @default 'No guard message'
|
|
330
|
+
*/
|
|
331
|
+
guardTitle?: string;
|
|
332
|
+
/**
|
|
333
|
+
* Guard message body that appears before executing the action to confirm execution.
|
|
319
334
|
* @default 'No guard message'
|
|
320
335
|
*/
|
|
321
336
|
guard?: string;
|
package/lib/types/helpers.d.ts
CHANGED
package/lib/types/helpers.js
CHANGED
|
@@ -39,6 +39,7 @@ var FieldTypes;
|
|
|
39
39
|
FieldTypes["TIMEPICKER"] = "timePicker";
|
|
40
40
|
FieldTypes["FILE"] = "File";
|
|
41
41
|
FieldTypes["LOCATION"] = "LOCATION";
|
|
42
|
+
FieldTypes["HTML"] = "HTML";
|
|
42
43
|
})(FieldTypes = exports.FieldTypes || (exports.FieldTypes = {}));
|
|
43
44
|
var FileTypes;
|
|
44
45
|
(function (FileTypes) {
|