identity-admin 1.28.12 → 1.28.14
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.
|
@@ -72,7 +72,7 @@ class ActionsGenerator {
|
|
|
72
72
|
return extraActionsObject;
|
|
73
73
|
}
|
|
74
74
|
static getActions(actions, currentUser, configuration) {
|
|
75
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
75
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
76
76
|
var actionObject = {
|
|
77
77
|
show: {
|
|
78
78
|
isAccessible: ((_a = configuration === null || configuration === void 0 ? void 0 : configuration.actions) === null || _a === void 0 ? void 0 : _a.show) === false ? false : true,
|
|
@@ -81,15 +81,18 @@ class ActionsGenerator {
|
|
|
81
81
|
new: {
|
|
82
82
|
isAccessible: ((_b = configuration === null || configuration === void 0 ? void 0 : configuration.actions) === null || _b === void 0 ? void 0 : _b.new) === false ? false : true,
|
|
83
83
|
},
|
|
84
|
+
duplicate: {
|
|
85
|
+
isAccessible: ((_c = configuration === null || configuration === void 0 ? void 0 : configuration.actions) === null || _c === void 0 ? void 0 : _c.new) === false ? false : true,
|
|
86
|
+
},
|
|
84
87
|
edit: {
|
|
85
|
-
isAccessible: ((
|
|
88
|
+
isAccessible: ((_d = configuration === null || configuration === void 0 ? void 0 : configuration.actions) === null || _d === void 0 ? void 0 : _d.edit) === false ? false : true,
|
|
86
89
|
isMainAction: true
|
|
87
90
|
},
|
|
88
91
|
delete: {
|
|
89
|
-
isAccessible: ((
|
|
92
|
+
isAccessible: ((_e = configuration === null || configuration === void 0 ? void 0 : configuration.actions) === null || _e === void 0 ? void 0 : _e.delete) === false ? false : true,
|
|
90
93
|
},
|
|
91
94
|
bulkDelete: {
|
|
92
|
-
isAccessible: ((
|
|
95
|
+
isAccessible: ((_f = configuration === null || configuration === void 0 ? void 0 : configuration.actions) === null || _f === void 0 ? void 0 : _f.bulkDelete) === true ? true : false,
|
|
93
96
|
},
|
|
94
97
|
};
|
|
95
98
|
if (!actions || Object.keys(actions).length === 0) {
|
|
@@ -107,9 +110,9 @@ class ActionsGenerator {
|
|
|
107
110
|
else if (key === "extras") {
|
|
108
111
|
actionObject[key] = actions[key];
|
|
109
112
|
}
|
|
110
|
-
actionObject[key].reloadAfterAction = (
|
|
113
|
+
actionObject[key].reloadAfterAction = (_g = actions[key]) === null || _g === void 0 ? void 0 : _g.reloadAfterAction;
|
|
111
114
|
actionObject[key].isMainAction =
|
|
112
|
-
(
|
|
115
|
+
(_h = actions[key].isMainAction) !== null && _h !== void 0 ? _h : (key === "edit" || key === "show");
|
|
113
116
|
}
|
|
114
117
|
return actionObject;
|
|
115
118
|
}
|
|
@@ -120,6 +123,11 @@ class ActionsGenerator {
|
|
|
120
123
|
? translation
|
|
121
124
|
: (0, i18n_1.__)({ phrase: "actions_new", locale: i18n_1.default.getLocale() });
|
|
122
125
|
break;
|
|
126
|
+
case "duplicate":
|
|
127
|
+
actionObject.value = translation
|
|
128
|
+
? translation
|
|
129
|
+
: (0, i18n_1.__)({ phrase: "actions_duplicate", locale: i18n_1.default.getLocale() });
|
|
130
|
+
break;
|
|
123
131
|
case "edit":
|
|
124
132
|
actionObject.value = translation
|
|
125
133
|
? translation
|
|
@@ -13,6 +13,8 @@ class LocalizedStringHelper {
|
|
|
13
13
|
continue;
|
|
14
14
|
}
|
|
15
15
|
const castedModelObject = modelObject;
|
|
16
|
+
if (recordParams.isDuplicateRecord)
|
|
17
|
+
return recordParams;
|
|
16
18
|
if (castedModelObject[key].type && castedModelObject[key].type === helpers_1.FieldTypes.LOCALIZEDSTRING && recordParams[key]) {
|
|
17
19
|
recordParams[key] = this.getArrayOfLanguages(recordParams[key]);
|
|
18
20
|
}
|
|
@@ -53,6 +53,8 @@ class ResourcesHelper {
|
|
|
53
53
|
static prepareProperties(properties, modelName, model, resource) {
|
|
54
54
|
var preparedProperties = [];
|
|
55
55
|
properties.forEach((key) => {
|
|
56
|
+
if (!key)
|
|
57
|
+
return;
|
|
56
58
|
if (model[key]) {
|
|
57
59
|
// const refCheck = model[key].type === FieldTypes.REFERENCE
|
|
58
60
|
// var path = undefined
|
package/lib/locales/en.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"actions_edit": "Edit",
|
|
3
3
|
"actions_delete": "Delete",
|
|
4
|
+
"actions_duplicate": "Duplicate",
|
|
4
5
|
"actions_delete_confirmMessage_title": "Do you really want to delete this record?",
|
|
5
6
|
"actions_delete_confirmMessage_body": "If you clicked yes, this record will be permanently deleted.",
|
|
6
7
|
"actions_bulkDelete_confirmMessage_title": "Do you really want to delete these records?",
|
|
@@ -376,6 +376,11 @@ export interface IFieldValue {
|
|
|
376
376
|
* @default undefined
|
|
377
377
|
*/
|
|
378
378
|
relatedFields?: string[];
|
|
379
|
+
/**
|
|
380
|
+
* Used to add the disableImageOptimization option in the field. Only used when the type of the field is image
|
|
381
|
+
* @default false
|
|
382
|
+
*/
|
|
383
|
+
disableImageOptimization?: boolean;
|
|
379
384
|
/**
|
|
380
385
|
* Only used if the field type is REFERENCE. Used to filter the list of referenced items.
|
|
381
386
|
*/
|