@localazy/strapi-plugin 0.1.13-rc.2 → 0.1.13-rc.3
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.
|
@@ -200,14 +200,16 @@ function GlobalSettings() {
|
|
|
200
200
|
<Option value="updated">{t("plugin_settings.editing_data_entry")}</Option>
|
|
201
201
|
</Select>
|
|
202
202
|
{/* Deprecate source keys on deletion */}
|
|
203
|
-
<
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
203
|
+
<div style={{ display: "none" }}>
|
|
204
|
+
<br /><br />
|
|
205
|
+
<ToggleInput
|
|
206
|
+
label={t("plugin_settings.deprecate_source_keys_on_delete")}
|
|
207
|
+
hint={t("plugin_settings.deprecate_source_keys_on_delete_info")}
|
|
208
|
+
offLabel={t("plugin_settings.off")}
|
|
209
|
+
onLabel={t("plugin_settings.on")}
|
|
210
|
+
checked={typeof formModel?.upload?.allowDeprecate === "boolean" ? formModel.upload.allowDeprecate : false}
|
|
211
|
+
onChange={e => patchFormModel("upload.allowDeprecate", e.target.checked)} />
|
|
212
|
+
</div>
|
|
211
213
|
<br /><br />
|
|
212
214
|
<Divider />
|
|
213
215
|
{/* Download Settings */}
|
package/package.json
CHANGED
package/server/bootstrap.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
const deepPopulateHook = require('./lifecycles/deep-populate-hook');
|
|
4
4
|
const uploadEventEntryToLocalazyHook = require('./lifecycles/upload-event-entry-to-localazy-hook');
|
|
5
|
-
const deprecateEventEntryInLocalazyHook = require('./lifecycles/deprecate-event-entry-in-localazy-hook');
|
|
6
5
|
const RequestInitiatorHelper = require('./utils/request-initiator-helper');
|
|
7
6
|
|
|
8
7
|
module.exports = ({ strapi }) => {
|
|
@@ -35,24 +34,6 @@ module.exports = ({ strapi }) => {
|
|
|
35
34
|
break;
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
|
-
case 'beforeDeleteMany':
|
|
39
|
-
case 'beforeDelete': {
|
|
40
|
-
try {
|
|
41
|
-
if (requestInitiatorHelper.isInitiatedByLocalazyWebhook() || requestInitiatorHelper.isInitiatedByLocalazyPluginUI()) {
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// have to await here
|
|
46
|
-
const result = await deprecateEventEntryInLocalazyHook(event);
|
|
47
|
-
if (typeof result !== 'undefined') {
|
|
48
|
-
strapi.log.info(`${action} hook result: ${JSON.stringify(result)}`);
|
|
49
|
-
}
|
|
50
|
-
} catch (e) {
|
|
51
|
-
strapi.log.error(e);
|
|
52
|
-
} finally {
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
37
|
default:
|
|
57
38
|
break;
|
|
58
39
|
}
|