@localazy/strapi-plugin 1.1.0 → 1.1.2
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/dist/_chunks/{FetchIdentity-DfV1OWMB.js → FetchIdentity-CevvxeEj.js} +73 -46
- package/dist/_chunks/{FetchIdentity-lkoWjYjn.mjs → FetchIdentity-DeThazz9.mjs} +43 -16
- package/dist/_chunks/{LanguagesSelector-BmWfSZq6.js → LanguagesSelector-BExpl4Vx.js} +15 -3
- package/dist/_chunks/{LanguagesSelector-vSZvVGUT.mjs → LanguagesSelector-D62gLZsM.mjs} +15 -3
- package/dist/_chunks/{LocalazyApp-st8mwIbM.mjs → LocalazyApp-Czkb4s5J.mjs} +791 -61
- package/dist/_chunks/{LocalazyApp-BUfYt7UL.js → LocalazyApp-DIcO748C.js} +791 -59
- package/dist/_chunks/{LocalazyContentTransferSetup-BjLBgqFO.js → LocalazyContentTransferSetup-DAyZdwi9.js} +13 -10
- package/dist/_chunks/{LocalazyContentTransferSetup-D2YvBYs_.mjs → LocalazyContentTransferSetup-Dx0Z6DXc.mjs} +13 -10
- package/dist/_chunks/{LocalazyGlobalSettings-DHCU2_RH.mjs → LocalazyGlobalSettings-DWMBqlN4.mjs} +149 -12
- package/dist/_chunks/{LocalazyGlobalSettings-Do5tOyhB.js → LocalazyGlobalSettings-DjrXGVxl.js} +148 -11
- package/dist/_chunks/{LocalazyPanel-CulgT97p.mjs → LocalazyPanel-B-0HBTL_.mjs} +4 -4
- package/dist/_chunks/{LocalazyPanel-BDxUI_RH.js → LocalazyPanel-nBOpQo5B.js} +4 -4
- package/dist/_chunks/{LocalazyStatusColumn-DoTWD2eL.mjs → LocalazyStatusColumn-CpO3yccG.mjs} +9 -7
- package/dist/_chunks/{LocalazyStatusColumn-Dpwoc5Ig.js → LocalazyStatusColumn-cGsUDMlX.js} +9 -7
- package/dist/_chunks/{RequireLocalazyAuth-BzM7C6Yw.js → RequireLocalazyAuth-56K8HUNR.js} +4 -4
- package/dist/_chunks/{RequireLocalazyAuth-CqHrZ1Ah.mjs → RequireLocalazyAuth-Dh-mAMcg.mjs} +4 -4
- package/dist/_chunks/{entry-exclusion-service-DWFMKgkA.mjs → entry-exclusion-service-Dm5_iP7I.mjs} +1 -1
- package/dist/_chunks/{entry-exclusion-service-Cvu8PQUI.js → entry-exclusion-service-Rf4Tr0zW.js} +1 -1
- package/dist/_chunks/{has-model-changed-CWdMNRB1.mjs → has-model-changed-6p1lR-Ho.mjs} +2 -2
- package/dist/_chunks/{has-model-changed-D1f6is8z.js → has-model-changed-CGyDQARr.js} +2 -2
- package/dist/_chunks/{i18n-DaBjUC3Y.js → i18n-CAsbU4pi.js} +62 -4
- package/dist/_chunks/{i18n-Bga-GG_Z.mjs → i18n-QelOdIB2.mjs} +62 -4
- package/dist/_chunks/{index-BSNW1ypR.js → index-BK7lmZSN.js} +57 -19
- package/dist/_chunks/{index-CtvR-R3c.mjs → index-Bpf1Mw2A.mjs} +8 -8
- package/dist/_chunks/{index-BgPI2yQD.js → index-BsQ_ie4C.js} +8 -8
- package/dist/_chunks/{index-BIHAiJnE.mjs → index-CHjIMO9T.mjs} +78 -40
- package/dist/_chunks/{strapi-api-base-CturxOqD.mjs → strapi-api-base-Bem_CGuz.mjs} +2 -2
- package/dist/_chunks/{strapi-api-base-CN6q5tPh.js → strapi-api-base-W_bUTSlY.js} +2 -2
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/components/PluginErrorBoundary.d.ts +5 -0
- package/dist/admin/src/modules/@common/locale/en.d.ts +4 -0
- package/dist/admin/src/modules/@common/services/project-service.d.ts +9 -0
- package/dist/admin/src/modules/@common/styles/heading-fix.d.ts +7 -0
- package/dist/admin/src/modules/@common/utils/export-json.d.ts +1 -0
- package/dist/admin/src/modules/@common/utils/redirect-to-plugin-route.d.ts +1 -0
- package/dist/admin/src/modules/activity-logs/components/HighlightMatch.d.ts +6 -0
- package/dist/admin/src/modules/activity-logs/components/SessionMetadata.d.ts +7 -0
- package/dist/admin/src/modules/activity-logs/components/SessionsTable.d.ts +17 -0
- package/dist/admin/src/modules/activity-logs/components/SortableHeader.d.ts +10 -0
- package/dist/admin/src/modules/activity-logs/components/StatusLabel.d.ts +6 -0
- package/dist/admin/src/modules/activity-logs/hooks/use-debounced-search.d.ts +6 -0
- package/dist/admin/src/modules/activity-logs/locale/en.d.ts +33 -0
- package/dist/admin/src/modules/activity-logs/models/activity-logs.d.ts +19 -0
- package/dist/admin/src/modules/activity-logs/services/activity-logs-service.d.ts +6 -0
- package/dist/admin/src/modules/activity-logs/utils/export-logs.d.ts +1 -0
- package/dist/admin/src/modules/activity-logs/utils/format-utils.d.ts +4 -0
- package/dist/admin/src/modules/plugin-settings/components/WebhookSetup.d.ts +2 -0
- package/dist/admin/src/modules/plugin-settings/locale/en.d.ts +21 -0
- package/dist/admin/src/pages/ActivityLogDetail.d.ts +7 -0
- package/dist/admin/src/pages/ActivityLogs.d.ts +7 -0
- package/dist/server/index.js +395 -49
- package/dist/server/index.mjs +395 -49
- package/dist/server/src/controllers/activity-logs-controller.d.ts +10 -0
- package/dist/server/src/controllers/index.d.ts +12 -1
- package/dist/server/src/controllers/localazy-project-controller.d.ts +4 -1
- package/dist/server/src/core/index.d.ts +13 -0
- package/dist/server/src/db/model/activity-logs.d.ts +20 -0
- package/dist/server/src/db/model/plugin-settings.d.ts +14 -0
- package/dist/server/src/index.d.ts +27 -1
- package/dist/server/src/routes/activity-logs-routes.d.ts +9 -0
- package/dist/server/src/services/activity-logs-service.d.ts +17 -0
- package/dist/server/src/services/index.d.ts +15 -0
- package/dist/server/src/services/localazy-pubapi-service.d.ts +2 -0
- package/package.json +4 -3
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const index = require("./index-BK7lmZSN.js");
|
|
4
5
|
const React = require("react");
|
|
5
|
-
const RequireLocalazyAuth = require("./RequireLocalazyAuth-
|
|
6
|
-
const FetchIdentity = require("./FetchIdentity-
|
|
6
|
+
const RequireLocalazyAuth = require("./RequireLocalazyAuth-56K8HUNR.js");
|
|
7
|
+
const FetchIdentity = require("./FetchIdentity-CevvxeEj.js");
|
|
7
8
|
const admin = require("@strapi/strapi/admin");
|
|
8
|
-
const
|
|
9
|
-
const hasModelChanged = require("./has-model-changed-D1f6is8z.js");
|
|
9
|
+
const hasModelChanged = require("./has-model-changed-CGyDQARr.js");
|
|
10
10
|
const useTranslation = require("./useTranslation-BdIl-aLe.js");
|
|
11
11
|
const styled = require("styled-components");
|
|
12
12
|
const index$1 = require("./index-1he9s_bs.js");
|
|
13
|
-
require("./i18n-
|
|
13
|
+
require("./i18n-CAsbU4pi.js");
|
|
14
14
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
15
15
|
const styled__default = /* @__PURE__ */ _interopDefault(styled);
|
|
16
16
|
const getFilteredModelsSchemas = (models) => {
|
|
@@ -1082,7 +1082,7 @@ const ContentTransferSetup = () => {
|
|
|
1082
1082
|
setHasUnsavedChanges(localHasModelChanged);
|
|
1083
1083
|
setIsLoading(false);
|
|
1084
1084
|
}
|
|
1085
|
-
fetchData();
|
|
1085
|
+
void fetchData();
|
|
1086
1086
|
}, []);
|
|
1087
1087
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1088
1088
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1098,7 +1098,7 @@ const ContentTransferSetup = () => {
|
|
|
1098
1098
|
startIcon: /* @__PURE__ */ jsxRuntime.jsx(index.ForwardRef$4z, {}),
|
|
1099
1099
|
disabled: !hasUnsavedChanges,
|
|
1100
1100
|
onClick: () => {
|
|
1101
|
-
saveContentTransferSetup(formModel);
|
|
1101
|
+
void saveContentTransferSetup(formModel);
|
|
1102
1102
|
},
|
|
1103
1103
|
children: t("plugin_settings.save")
|
|
1104
1104
|
}
|
|
@@ -1157,8 +1157,11 @@ const ContentTransferSetup = () => {
|
|
|
1157
1157
|
] })
|
|
1158
1158
|
] });
|
|
1159
1159
|
};
|
|
1160
|
-
const LocalazyContentTransferSetup = () => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1161
|
-
/* @__PURE__ */ jsxRuntime.jsx(FetchIdentity.
|
|
1162
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1160
|
+
const LocalazyContentTransferSetup = () => /* @__PURE__ */ jsxRuntime.jsxs(index.DesignSystemProvider, { theme: FetchIdentity.getDefaultTheme(), children: [
|
|
1161
|
+
/* @__PURE__ */ jsxRuntime.jsx(FetchIdentity.HeadingFixGlobalStyle, {}),
|
|
1162
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FetchIdentity.LocalazyIdentityProvider, { children: [
|
|
1163
|
+
/* @__PURE__ */ jsxRuntime.jsx(FetchIdentity.FetchIdentity, {}),
|
|
1164
|
+
/* @__PURE__ */ jsxRuntime.jsx(RequireLocalazyAuth.RequireLocalazyAuth, { children: /* @__PURE__ */ jsxRuntime.jsx(ContentTransferSetup, {}) })
|
|
1165
|
+
] })
|
|
1163
1166
|
] });
|
|
1164
1167
|
exports.default = LocalazyContentTransferSetup;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { C as CheckboxImpl, B as Box, m as Accordion, c as Flex, n as SwitchImpl, T as Typography, e as Button, d as ForwardRef$4z, A as Alert, j as Divider, l as DesignSystemProvider } from "./index-CHjIMO9T.mjs";
|
|
2
3
|
import { forwardRef, useState, useEffect } from "react";
|
|
3
|
-
import { i as isEqual, R as RequireLocalazyAuth } from "./RequireLocalazyAuth-
|
|
4
|
-
import { s as set,
|
|
4
|
+
import { i as isEqual, R as RequireLocalazyAuth } from "./RequireLocalazyAuth-Dh-mAMcg.mjs";
|
|
5
|
+
import { s as set, n as keys, o as isArrayLike, p as arrayEach, l as isArray, q as isObject, P as PluginSettingsService, c as cloneDeep, g as getDefaultTheme, H as HeadingFixGlobalStyle, L as LocalazyIdentityProvider, F as FetchIdentity } from "./FetchIdentity-DeThazz9.mjs";
|
|
5
6
|
import { Layouts } from "@strapi/strapi/admin";
|
|
6
|
-
import {
|
|
7
|
-
import { S as SUPPORTED_CONTENT_TYPE_FIELDS, a as SUPPORTED_CUSTOM_FIELD_PLUGINS, g as getContentTransferSetupKeysSets, b as get, f as findModelValueByKey, c as StrapiModelService, d as getModelsTree, h as hasModelChanged } from "./has-model-changed-CWdMNRB1.mjs";
|
|
7
|
+
import { S as SUPPORTED_CONTENT_TYPE_FIELDS, a as SUPPORTED_CUSTOM_FIELD_PLUGINS, g as getContentTransferSetupKeysSets, b as get, f as findModelValueByKey, c as StrapiModelService, d as getModelsTree, h as hasModelChanged } from "./has-model-changed-6p1lR-Ho.mjs";
|
|
8
8
|
import { u as useTranslation } from "./useTranslation-CZQ4lU1m.mjs";
|
|
9
9
|
import styled from "styled-components";
|
|
10
10
|
import { Trans } from "./index-BIbKC7-V.mjs";
|
|
11
|
-
import "./i18n-
|
|
11
|
+
import "./i18n-QelOdIB2.mjs";
|
|
12
12
|
const getFilteredModelsSchemas = (models) => {
|
|
13
13
|
if (!models) {
|
|
14
14
|
return [];
|
|
@@ -1078,7 +1078,7 @@ const ContentTransferSetup = () => {
|
|
|
1078
1078
|
setHasUnsavedChanges(localHasModelChanged);
|
|
1079
1079
|
setIsLoading(false);
|
|
1080
1080
|
}
|
|
1081
|
-
fetchData();
|
|
1081
|
+
void fetchData();
|
|
1082
1082
|
}, []);
|
|
1083
1083
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1084
1084
|
/* @__PURE__ */ jsx(
|
|
@@ -1094,7 +1094,7 @@ const ContentTransferSetup = () => {
|
|
|
1094
1094
|
startIcon: /* @__PURE__ */ jsx(ForwardRef$4z, {}),
|
|
1095
1095
|
disabled: !hasUnsavedChanges,
|
|
1096
1096
|
onClick: () => {
|
|
1097
|
-
saveContentTransferSetup(formModel);
|
|
1097
|
+
void saveContentTransferSetup(formModel);
|
|
1098
1098
|
},
|
|
1099
1099
|
children: t("plugin_settings.save")
|
|
1100
1100
|
}
|
|
@@ -1153,9 +1153,12 @@ const ContentTransferSetup = () => {
|
|
|
1153
1153
|
] })
|
|
1154
1154
|
] });
|
|
1155
1155
|
};
|
|
1156
|
-
const LocalazyContentTransferSetup = () => /* @__PURE__ */ jsxs(
|
|
1157
|
-
/* @__PURE__ */ jsx(
|
|
1158
|
-
/* @__PURE__ */
|
|
1156
|
+
const LocalazyContentTransferSetup = () => /* @__PURE__ */ jsxs(DesignSystemProvider, { theme: getDefaultTheme(), children: [
|
|
1157
|
+
/* @__PURE__ */ jsx(HeadingFixGlobalStyle, {}),
|
|
1158
|
+
/* @__PURE__ */ jsxs(LocalazyIdentityProvider, { children: [
|
|
1159
|
+
/* @__PURE__ */ jsx(FetchIdentity, {}),
|
|
1160
|
+
/* @__PURE__ */ jsx(RequireLocalazyAuth, { children: /* @__PURE__ */ jsx(ContentTransferSetup, {}) })
|
|
1161
|
+
] })
|
|
1159
1162
|
] });
|
|
1160
1163
|
export {
|
|
1161
1164
|
LocalazyContentTransferSetup as default
|
package/dist/_chunks/{LocalazyGlobalSettings-DHCU2_RH.mjs → LocalazyGlobalSettings-DWMBqlN4.mjs}
RENAMED
|
@@ -1,13 +1,136 @@
|
|
|
1
|
-
import { jsxs,
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { c as Flex, L as Loader, T as Typography, B as Box, A as Alert, d as ForwardRef$4z, e as Button, f as ForwardRef$3, g as Link, h as ForwardRef$2l, D as Dialog, F as Field, i as ForwardRef$2x, a as Toggle, M as MultiSelect, b as MultiSelectOption, j as Divider, S as SingleSelect, k as SingleSelectOption, l as DesignSystemProvider } from "./index-CHjIMO9T.mjs";
|
|
2
3
|
import { useState, useEffect } from "react";
|
|
3
|
-
import { P as PluginSettingsService$1, c as cloneDeep, s as set, L as LocalazyIdentityProvider, F as FetchIdentity } from "./FetchIdentity-
|
|
4
|
+
import { P as PluginSettingsService$1, c as cloneDeep, s as set, g as getDefaultTheme, H as HeadingFixGlobalStyle, L as LocalazyIdentityProvider, F as FetchIdentity } from "./FetchIdentity-DeThazz9.mjs";
|
|
4
5
|
import { Layouts } from "@strapi/strapi/admin";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { L as LanguagesSelector, P as ProjectService } from "./LanguagesSelector-vSZvVGUT.mjs";
|
|
8
|
-
import { c as createStrapiApiAxiosInstance } from "./strapi-api-base-CturxOqD.mjs";
|
|
9
|
-
import "./i18n-Bga-GG_Z.mjs";
|
|
6
|
+
import { i as isEqual, R as RequireLocalazyAuth } from "./RequireLocalazyAuth-Dh-mAMcg.mjs";
|
|
7
|
+
import { P as ProjectService, L as LanguagesSelector } from "./LanguagesSelector-D62gLZsM.mjs";
|
|
10
8
|
import { u as useTranslation } from "./useTranslation-CZQ4lU1m.mjs";
|
|
9
|
+
import { c as createStrapiApiAxiosInstance } from "./strapi-api-base-Bem_CGuz.mjs";
|
|
10
|
+
import "./i18n-QelOdIB2.mjs";
|
|
11
|
+
const WEBHOOK_PATH = "/api/localazy/public/transfer/download";
|
|
12
|
+
const LOCALAZY_DOCS_URL = "https://localazy.com/docs/general/webhooks";
|
|
13
|
+
function WebhookSetup() {
|
|
14
|
+
const { t } = useTranslation();
|
|
15
|
+
const [state, setState] = useState("loading");
|
|
16
|
+
const [configuredUrl, setConfiguredUrl] = useState("");
|
|
17
|
+
const [isLocalUrl, setIsLocalUrl] = useState(false);
|
|
18
|
+
const [showModal, setShowModal] = useState(false);
|
|
19
|
+
const [webhookUrl, setWebhookUrl] = useState("");
|
|
20
|
+
const [isSaving, setIsSaving] = useState(false);
|
|
21
|
+
const [error, setError] = useState("");
|
|
22
|
+
const [showSuccess, setShowSuccess] = useState(false);
|
|
23
|
+
const checkStatus = async () => {
|
|
24
|
+
try {
|
|
25
|
+
const [statusResult, strapiUrlResult] = await Promise.all([
|
|
26
|
+
ProjectService.getWebhookStatus(),
|
|
27
|
+
ProjectService.getStrapiUrl()
|
|
28
|
+
]);
|
|
29
|
+
setWebhookUrl(`${strapiUrlResult.url}${WEBHOOK_PATH}`);
|
|
30
|
+
setIsLocalUrl(strapiUrlResult.isLocal || false);
|
|
31
|
+
if (statusResult.status === "configured" && statusResult.url) {
|
|
32
|
+
setState("configured");
|
|
33
|
+
setConfiguredUrl(statusResult.url);
|
|
34
|
+
} else {
|
|
35
|
+
setState("not_configured");
|
|
36
|
+
}
|
|
37
|
+
} catch {
|
|
38
|
+
setState("not_configured");
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
void checkStatus();
|
|
43
|
+
}, []);
|
|
44
|
+
const handleSetup = async () => {
|
|
45
|
+
setIsSaving(true);
|
|
46
|
+
setError("");
|
|
47
|
+
try {
|
|
48
|
+
await ProjectService.setupWebhook(webhookUrl);
|
|
49
|
+
setState("configured");
|
|
50
|
+
setConfiguredUrl(webhookUrl);
|
|
51
|
+
setShowModal(false);
|
|
52
|
+
setShowSuccess(true);
|
|
53
|
+
setTimeout(() => setShowSuccess(false), 5e3);
|
|
54
|
+
} catch {
|
|
55
|
+
setError(t("plugin_settings.webhook_setup_error"));
|
|
56
|
+
} finally {
|
|
57
|
+
setIsSaving(false);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
if (state === "loading") {
|
|
61
|
+
return /* @__PURE__ */ jsxs(Flex, { alignItems: "center", gap: 2, children: [
|
|
62
|
+
/* @__PURE__ */ jsx(Loader, { small: true }),
|
|
63
|
+
/* @__PURE__ */ jsx(Typography, { textColor: "neutral600", variant: "omega", children: t("plugin_settings.webhook_setup_loading") })
|
|
64
|
+
] });
|
|
65
|
+
}
|
|
66
|
+
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
67
|
+
showSuccess && /* @__PURE__ */ jsx(Box, { marginTop: 4, marginBottom: 4, children: /* @__PURE__ */ jsx(Alert, { onClose: () => setShowSuccess(false), closeLabel: t("plugin_settings.close"), variant: "success", children: t("plugin_settings.webhook_setup_success") }) }),
|
|
68
|
+
state === "configured" && /* @__PURE__ */ jsxs(Box, { children: [
|
|
69
|
+
/* @__PURE__ */ jsxs(Flex, { alignItems: "center", gap: 2, children: [
|
|
70
|
+
/* @__PURE__ */ jsx(ForwardRef$4z, { fill: "success600", width: 16, height: 16 }),
|
|
71
|
+
/* @__PURE__ */ jsx(Typography, { textColor: "success600", variant: "omega", fontWeight: "semiBold", children: t("plugin_settings.webhook_setup_already_configured") })
|
|
72
|
+
] }),
|
|
73
|
+
/* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Typography, { textColor: "neutral500", variant: "pi", children: configuredUrl }) }),
|
|
74
|
+
/* @__PURE__ */ jsx(Box, { marginTop: 3, children: /* @__PURE__ */ jsx(Button, { variant: "tertiary", onClick: () => setShowModal(true), children: t("plugin_settings.webhook_setup_reconfigure") }) })
|
|
75
|
+
] }),
|
|
76
|
+
state === "not_configured" && /* @__PURE__ */ jsxs(Box, { children: [
|
|
77
|
+
/* @__PURE__ */ jsxs(Flex, { alignItems: "center", gap: 2, marginBottom: 2, children: [
|
|
78
|
+
/* @__PURE__ */ jsx(ForwardRef$3, { fill: "warning600", width: 16, height: 16 }),
|
|
79
|
+
/* @__PURE__ */ jsx(Typography, { textColor: "neutral800", variant: "omega", fontWeight: "semiBold", children: t("plugin_settings.webhook_setup_not_configured") })
|
|
80
|
+
] }),
|
|
81
|
+
/* @__PURE__ */ jsx(Typography, { textColor: "neutral600", variant: "pi", children: t("plugin_settings.webhook_setup_description") }),
|
|
82
|
+
/* @__PURE__ */ jsxs(Flex, { gap: 3, marginTop: 3, alignItems: "center", children: [
|
|
83
|
+
/* @__PURE__ */ jsx(Button, { onClick: () => setShowModal(true), children: t("plugin_settings.webhook_setup_button") }),
|
|
84
|
+
/* @__PURE__ */ jsx(Link, { href: LOCALAZY_DOCS_URL, isExternal: true, startIcon: /* @__PURE__ */ jsx(ForwardRef$2l, {}), children: t("plugin_settings.webhook_setup_docs_link") })
|
|
85
|
+
] })
|
|
86
|
+
] }),
|
|
87
|
+
/* @__PURE__ */ jsx(Dialog.Root, { open: showModal, onOpenChange: setShowModal, children: /* @__PURE__ */ jsxs(Dialog.Content, { children: [
|
|
88
|
+
/* @__PURE__ */ jsx(Dialog.Header, { children: t("plugin_settings.webhook_setup_modal_title") }),
|
|
89
|
+
/* @__PURE__ */ jsx(Dialog.Body, { children: /* @__PURE__ */ jsxs(Box, { children: [
|
|
90
|
+
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", textColor: "neutral800", children: t("plugin_settings.webhook_setup_step1_title") }),
|
|
91
|
+
/* @__PURE__ */ jsx(Box, { marginTop: 1, marginBottom: 4, children: /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", children: t("plugin_settings.webhook_setup_step1_description") }) }),
|
|
92
|
+
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", textColor: "neutral800", children: t("plugin_settings.webhook_setup_step2_title") }),
|
|
93
|
+
/* @__PURE__ */ jsx(Box, { marginTop: 2, marginBottom: 1, children: /* @__PURE__ */ jsxs(Field.Root, { hint: t("plugin_settings.webhook_setup_url_hint"), children: [
|
|
94
|
+
/* @__PURE__ */ jsx(
|
|
95
|
+
Field.Input,
|
|
96
|
+
{
|
|
97
|
+
value: webhookUrl,
|
|
98
|
+
onChange: (e) => setWebhookUrl(e.target.value)
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ jsx(Field.Hint, {})
|
|
102
|
+
] }) }),
|
|
103
|
+
/* @__PURE__ */ jsxs(Box, { marginTop: 3, marginBottom: 4, children: [
|
|
104
|
+
isLocalUrl && /* @__PURE__ */ jsxs(Flex, { gap: 2, marginBottom: 3, padding: 3, background: "warning100", hasRadius: true, children: [
|
|
105
|
+
/* @__PURE__ */ jsx(ForwardRef$3, { fill: "warning600", width: 16, height: 16, style: { flexShrink: 0 } }),
|
|
106
|
+
/* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "warning800", children: t("plugin_settings.webhook_setup_local_warning") })
|
|
107
|
+
] }),
|
|
108
|
+
/* @__PURE__ */ jsxs(Flex, { gap: 2, padding: 3, background: "primary100", hasRadius: true, children: [
|
|
109
|
+
/* @__PURE__ */ jsx(ForwardRef$2x, { fill: "primary600", width: 16, height: 16, style: { flexShrink: 0 } }),
|
|
110
|
+
/* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "primary800", children: t("plugin_settings.webhook_setup_ngrok_hint") })
|
|
111
|
+
] })
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", textColor: "neutral800", children: t("plugin_settings.webhook_setup_step3_title") }),
|
|
114
|
+
/* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", children: t("plugin_settings.webhook_setup_step3_description") }) }),
|
|
115
|
+
error && /* @__PURE__ */ jsx(Box, { marginTop: 4, children: /* @__PURE__ */ jsx(Alert, { onClose: () => setError(""), closeLabel: t("plugin_settings.close"), variant: "danger", children: error }) })
|
|
116
|
+
] }) }),
|
|
117
|
+
/* @__PURE__ */ jsxs(Dialog.Footer, { children: [
|
|
118
|
+
/* @__PURE__ */ jsx(Dialog.Cancel, { children: /* @__PURE__ */ jsx(Button, { variant: "tertiary", children: t("plugin_settings.cancel") }) }),
|
|
119
|
+
/* @__PURE__ */ jsx(
|
|
120
|
+
Button,
|
|
121
|
+
{
|
|
122
|
+
onClick: () => {
|
|
123
|
+
void handleSetup();
|
|
124
|
+
},
|
|
125
|
+
loading: isSaving,
|
|
126
|
+
disabled: !webhookUrl,
|
|
127
|
+
children: t("plugin_settings.webhook_setup_confirm")
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
] })
|
|
131
|
+
] }) })
|
|
132
|
+
] });
|
|
133
|
+
}
|
|
11
134
|
class PluginSettingsService {
|
|
12
135
|
static async getAdminPanelUsers() {
|
|
13
136
|
try {
|
|
@@ -72,7 +195,7 @@ const GlobalSettings = () => {
|
|
|
72
195
|
setUsers(users2);
|
|
73
196
|
setIsLoading(false);
|
|
74
197
|
}
|
|
75
|
-
fetchData();
|
|
198
|
+
void fetchData();
|
|
76
199
|
}, []);
|
|
77
200
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
78
201
|
/* @__PURE__ */ jsx(
|
|
@@ -88,7 +211,7 @@ const GlobalSettings = () => {
|
|
|
88
211
|
startIcon: /* @__PURE__ */ jsx(ForwardRef$4z, {}),
|
|
89
212
|
disabled: !hasUnsavedChanges,
|
|
90
213
|
onClick: () => {
|
|
91
|
-
saveGlobalSettings(formModel);
|
|
214
|
+
void saveGlobalSettings(formModel);
|
|
92
215
|
},
|
|
93
216
|
children: t("plugin_settings.save")
|
|
94
217
|
}
|
|
@@ -180,6 +303,17 @@ const GlobalSettings = () => {
|
|
|
180
303
|
/* @__PURE__ */ jsx(Typography, { variant: "delta", textColor: "neutral800", children: t("plugin_settings.download_settings") }),
|
|
181
304
|
/* @__PURE__ */ jsx("br", {}),
|
|
182
305
|
/* @__PURE__ */ jsx("br", {}),
|
|
306
|
+
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", textColor: "neutral800", children: t("plugin_settings.webhook_setup_title") }),
|
|
307
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
308
|
+
/* @__PURE__ */ jsx(WebhookSetup, {}),
|
|
309
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
310
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
311
|
+
/* @__PURE__ */ jsx(Divider, {}),
|
|
312
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
313
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
314
|
+
/* @__PURE__ */ jsx(Typography, { variant: "omega", fontWeight: "semiBold", textColor: "neutral800", children: t("plugin_settings.webhook_behavior_title") }),
|
|
315
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
316
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
183
317
|
/* @__PURE__ */ jsxs(Field.Root, { hint: t("plugin_settings.processing_of_download_webhook_info"), children: [
|
|
184
318
|
/* @__PURE__ */ jsx(Field.Label, { children: t("plugin_settings.processing_of_download_webhook") }),
|
|
185
319
|
/* @__PURE__ */ jsx(
|
|
@@ -246,9 +380,12 @@ const GlobalSettings = () => {
|
|
|
246
380
|
] })
|
|
247
381
|
] });
|
|
248
382
|
};
|
|
249
|
-
const LocalazyGlobalSettings = () => /* @__PURE__ */ jsxs(
|
|
250
|
-
/* @__PURE__ */ jsx(
|
|
251
|
-
/* @__PURE__ */
|
|
383
|
+
const LocalazyGlobalSettings = () => /* @__PURE__ */ jsxs(DesignSystemProvider, { theme: getDefaultTheme(), children: [
|
|
384
|
+
/* @__PURE__ */ jsx(HeadingFixGlobalStyle, {}),
|
|
385
|
+
/* @__PURE__ */ jsxs(LocalazyIdentityProvider, { children: [
|
|
386
|
+
/* @__PURE__ */ jsx(FetchIdentity, {}),
|
|
387
|
+
/* @__PURE__ */ jsx(RequireLocalazyAuth, { children: /* @__PURE__ */ jsx(GlobalSettings, {}) })
|
|
388
|
+
] })
|
|
252
389
|
] });
|
|
253
390
|
export {
|
|
254
391
|
LocalazyGlobalSettings as default
|
package/dist/_chunks/{LocalazyGlobalSettings-Do5tOyhB.js → LocalazyGlobalSettings-DjrXGVxl.js}
RENAMED
|
@@ -1,15 +1,138 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const index = require("./index-BK7lmZSN.js");
|
|
4
5
|
const React = require("react");
|
|
5
|
-
const FetchIdentity = require("./FetchIdentity-
|
|
6
|
+
const FetchIdentity = require("./FetchIdentity-CevvxeEj.js");
|
|
6
7
|
const admin = require("@strapi/strapi/admin");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const LanguagesSelector = require("./LanguagesSelector-BmWfSZq6.js");
|
|
10
|
-
const strapiApiBase = require("./strapi-api-base-CN6q5tPh.js");
|
|
11
|
-
require("./i18n-DaBjUC3Y.js");
|
|
8
|
+
const RequireLocalazyAuth = require("./RequireLocalazyAuth-56K8HUNR.js");
|
|
9
|
+
const LanguagesSelector = require("./LanguagesSelector-BExpl4Vx.js");
|
|
12
10
|
const useTranslation = require("./useTranslation-BdIl-aLe.js");
|
|
11
|
+
const strapiApiBase = require("./strapi-api-base-W_bUTSlY.js");
|
|
12
|
+
require("./i18n-CAsbU4pi.js");
|
|
13
|
+
const WEBHOOK_PATH = "/api/localazy/public/transfer/download";
|
|
14
|
+
const LOCALAZY_DOCS_URL = "https://localazy.com/docs/general/webhooks";
|
|
15
|
+
function WebhookSetup() {
|
|
16
|
+
const { t } = useTranslation.useTranslation();
|
|
17
|
+
const [state, setState] = React.useState("loading");
|
|
18
|
+
const [configuredUrl, setConfiguredUrl] = React.useState("");
|
|
19
|
+
const [isLocalUrl, setIsLocalUrl] = React.useState(false);
|
|
20
|
+
const [showModal, setShowModal] = React.useState(false);
|
|
21
|
+
const [webhookUrl, setWebhookUrl] = React.useState("");
|
|
22
|
+
const [isSaving, setIsSaving] = React.useState(false);
|
|
23
|
+
const [error, setError] = React.useState("");
|
|
24
|
+
const [showSuccess, setShowSuccess] = React.useState(false);
|
|
25
|
+
const checkStatus = async () => {
|
|
26
|
+
try {
|
|
27
|
+
const [statusResult, strapiUrlResult] = await Promise.all([
|
|
28
|
+
LanguagesSelector.ProjectService.getWebhookStatus(),
|
|
29
|
+
LanguagesSelector.ProjectService.getStrapiUrl()
|
|
30
|
+
]);
|
|
31
|
+
setWebhookUrl(`${strapiUrlResult.url}${WEBHOOK_PATH}`);
|
|
32
|
+
setIsLocalUrl(strapiUrlResult.isLocal || false);
|
|
33
|
+
if (statusResult.status === "configured" && statusResult.url) {
|
|
34
|
+
setState("configured");
|
|
35
|
+
setConfiguredUrl(statusResult.url);
|
|
36
|
+
} else {
|
|
37
|
+
setState("not_configured");
|
|
38
|
+
}
|
|
39
|
+
} catch {
|
|
40
|
+
setState("not_configured");
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
React.useEffect(() => {
|
|
44
|
+
void checkStatus();
|
|
45
|
+
}, []);
|
|
46
|
+
const handleSetup = async () => {
|
|
47
|
+
setIsSaving(true);
|
|
48
|
+
setError("");
|
|
49
|
+
try {
|
|
50
|
+
await LanguagesSelector.ProjectService.setupWebhook(webhookUrl);
|
|
51
|
+
setState("configured");
|
|
52
|
+
setConfiguredUrl(webhookUrl);
|
|
53
|
+
setShowModal(false);
|
|
54
|
+
setShowSuccess(true);
|
|
55
|
+
setTimeout(() => setShowSuccess(false), 5e3);
|
|
56
|
+
} catch {
|
|
57
|
+
setError(t("plugin_settings.webhook_setup_error"));
|
|
58
|
+
} finally {
|
|
59
|
+
setIsSaving(false);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
if (state === "loading") {
|
|
63
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(index.Flex, { alignItems: "center", gap: 2, children: [
|
|
64
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Loader, { small: true }),
|
|
65
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Typography, { textColor: "neutral600", variant: "omega", children: t("plugin_settings.webhook_setup_loading") })
|
|
66
|
+
] });
|
|
67
|
+
}
|
|
68
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(index.Box, { children: [
|
|
69
|
+
showSuccess && /* @__PURE__ */ jsxRuntime.jsx(index.Box, { marginTop: 4, marginBottom: 4, children: /* @__PURE__ */ jsxRuntime.jsx(index.Alert, { onClose: () => setShowSuccess(false), closeLabel: t("plugin_settings.close"), variant: "success", children: t("plugin_settings.webhook_setup_success") }) }),
|
|
70
|
+
state === "configured" && /* @__PURE__ */ jsxRuntime.jsxs(index.Box, { children: [
|
|
71
|
+
/* @__PURE__ */ jsxRuntime.jsxs(index.Flex, { alignItems: "center", gap: 2, children: [
|
|
72
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.ForwardRef$4z, { fill: "success600", width: 16, height: 16 }),
|
|
73
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Typography, { textColor: "success600", variant: "omega", fontWeight: "semiBold", children: t("plugin_settings.webhook_setup_already_configured") })
|
|
74
|
+
] }),
|
|
75
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Box, { marginTop: 1, children: /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { textColor: "neutral500", variant: "pi", children: configuredUrl }) }),
|
|
76
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Box, { marginTop: 3, children: /* @__PURE__ */ jsxRuntime.jsx(index.Button, { variant: "tertiary", onClick: () => setShowModal(true), children: t("plugin_settings.webhook_setup_reconfigure") }) })
|
|
77
|
+
] }),
|
|
78
|
+
state === "not_configured" && /* @__PURE__ */ jsxRuntime.jsxs(index.Box, { children: [
|
|
79
|
+
/* @__PURE__ */ jsxRuntime.jsxs(index.Flex, { alignItems: "center", gap: 2, marginBottom: 2, children: [
|
|
80
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.ForwardRef$3, { fill: "warning600", width: 16, height: 16 }),
|
|
81
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Typography, { textColor: "neutral800", variant: "omega", fontWeight: "semiBold", children: t("plugin_settings.webhook_setup_not_configured") })
|
|
82
|
+
] }),
|
|
83
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Typography, { textColor: "neutral600", variant: "pi", children: t("plugin_settings.webhook_setup_description") }),
|
|
84
|
+
/* @__PURE__ */ jsxRuntime.jsxs(index.Flex, { gap: 3, marginTop: 3, alignItems: "center", children: [
|
|
85
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Button, { onClick: () => setShowModal(true), children: t("plugin_settings.webhook_setup_button") }),
|
|
86
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Link, { href: LOCALAZY_DOCS_URL, isExternal: true, startIcon: /* @__PURE__ */ jsxRuntime.jsx(index.ForwardRef$2l, {}), children: t("plugin_settings.webhook_setup_docs_link") })
|
|
87
|
+
] })
|
|
88
|
+
] }),
|
|
89
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Dialog.Root, { open: showModal, onOpenChange: setShowModal, children: /* @__PURE__ */ jsxRuntime.jsxs(index.Dialog.Content, { children: [
|
|
90
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Dialog.Header, { children: t("plugin_settings.webhook_setup_modal_title") }),
|
|
91
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Dialog.Body, { children: /* @__PURE__ */ jsxRuntime.jsxs(index.Box, { children: [
|
|
92
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "omega", fontWeight: "semiBold", textColor: "neutral800", children: t("plugin_settings.webhook_setup_step1_title") }),
|
|
93
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Box, { marginTop: 1, marginBottom: 4, children: /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "pi", textColor: "neutral600", children: t("plugin_settings.webhook_setup_step1_description") }) }),
|
|
94
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "omega", fontWeight: "semiBold", textColor: "neutral800", children: t("plugin_settings.webhook_setup_step2_title") }),
|
|
95
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Box, { marginTop: 2, marginBottom: 1, children: /* @__PURE__ */ jsxRuntime.jsxs(index.Field.Root, { hint: t("plugin_settings.webhook_setup_url_hint"), children: [
|
|
96
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
97
|
+
index.Field.Input,
|
|
98
|
+
{
|
|
99
|
+
value: webhookUrl,
|
|
100
|
+
onChange: (e) => setWebhookUrl(e.target.value)
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Field.Hint, {})
|
|
104
|
+
] }) }),
|
|
105
|
+
/* @__PURE__ */ jsxRuntime.jsxs(index.Box, { marginTop: 3, marginBottom: 4, children: [
|
|
106
|
+
isLocalUrl && /* @__PURE__ */ jsxRuntime.jsxs(index.Flex, { gap: 2, marginBottom: 3, padding: 3, background: "warning100", hasRadius: true, children: [
|
|
107
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.ForwardRef$3, { fill: "warning600", width: 16, height: 16, style: { flexShrink: 0 } }),
|
|
108
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "pi", textColor: "warning800", children: t("plugin_settings.webhook_setup_local_warning") })
|
|
109
|
+
] }),
|
|
110
|
+
/* @__PURE__ */ jsxRuntime.jsxs(index.Flex, { gap: 2, padding: 3, background: "primary100", hasRadius: true, children: [
|
|
111
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.ForwardRef$2x, { fill: "primary600", width: 16, height: 16, style: { flexShrink: 0 } }),
|
|
112
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "pi", textColor: "primary800", children: t("plugin_settings.webhook_setup_ngrok_hint") })
|
|
113
|
+
] })
|
|
114
|
+
] }),
|
|
115
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "omega", fontWeight: "semiBold", textColor: "neutral800", children: t("plugin_settings.webhook_setup_step3_title") }),
|
|
116
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Box, { marginTop: 1, children: /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "pi", textColor: "neutral600", children: t("plugin_settings.webhook_setup_step3_description") }) }),
|
|
117
|
+
error && /* @__PURE__ */ jsxRuntime.jsx(index.Box, { marginTop: 4, children: /* @__PURE__ */ jsxRuntime.jsx(index.Alert, { onClose: () => setError(""), closeLabel: t("plugin_settings.close"), variant: "danger", children: error }) })
|
|
118
|
+
] }) }),
|
|
119
|
+
/* @__PURE__ */ jsxRuntime.jsxs(index.Dialog.Footer, { children: [
|
|
120
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Dialog.Cancel, { children: /* @__PURE__ */ jsxRuntime.jsx(index.Button, { variant: "tertiary", children: t("plugin_settings.cancel") }) }),
|
|
121
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
122
|
+
index.Button,
|
|
123
|
+
{
|
|
124
|
+
onClick: () => {
|
|
125
|
+
void handleSetup();
|
|
126
|
+
},
|
|
127
|
+
loading: isSaving,
|
|
128
|
+
disabled: !webhookUrl,
|
|
129
|
+
children: t("plugin_settings.webhook_setup_confirm")
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
] })
|
|
133
|
+
] }) })
|
|
134
|
+
] });
|
|
135
|
+
}
|
|
13
136
|
class PluginSettingsService {
|
|
14
137
|
static async getAdminPanelUsers() {
|
|
15
138
|
try {
|
|
@@ -74,7 +197,7 @@ const GlobalSettings = () => {
|
|
|
74
197
|
setUsers(users2);
|
|
75
198
|
setIsLoading(false);
|
|
76
199
|
}
|
|
77
|
-
fetchData();
|
|
200
|
+
void fetchData();
|
|
78
201
|
}, []);
|
|
79
202
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
80
203
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -90,7 +213,7 @@ const GlobalSettings = () => {
|
|
|
90
213
|
startIcon: /* @__PURE__ */ jsxRuntime.jsx(index.ForwardRef$4z, {}),
|
|
91
214
|
disabled: !hasUnsavedChanges,
|
|
92
215
|
onClick: () => {
|
|
93
|
-
saveGlobalSettings(formModel);
|
|
216
|
+
void saveGlobalSettings(formModel);
|
|
94
217
|
},
|
|
95
218
|
children: t("plugin_settings.save")
|
|
96
219
|
}
|
|
@@ -182,6 +305,17 @@ const GlobalSettings = () => {
|
|
|
182
305
|
/* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "delta", textColor: "neutral800", children: t("plugin_settings.download_settings") }),
|
|
183
306
|
/* @__PURE__ */ jsxRuntime.jsx("br", {}),
|
|
184
307
|
/* @__PURE__ */ jsxRuntime.jsx("br", {}),
|
|
308
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "omega", fontWeight: "semiBold", textColor: "neutral800", children: t("plugin_settings.webhook_setup_title") }),
|
|
309
|
+
/* @__PURE__ */ jsxRuntime.jsx("br", {}),
|
|
310
|
+
/* @__PURE__ */ jsxRuntime.jsx(WebhookSetup, {}),
|
|
311
|
+
/* @__PURE__ */ jsxRuntime.jsx("br", {}),
|
|
312
|
+
/* @__PURE__ */ jsxRuntime.jsx("br", {}),
|
|
313
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Divider, {}),
|
|
314
|
+
/* @__PURE__ */ jsxRuntime.jsx("br", {}),
|
|
315
|
+
/* @__PURE__ */ jsxRuntime.jsx("br", {}),
|
|
316
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "omega", fontWeight: "semiBold", textColor: "neutral800", children: t("plugin_settings.webhook_behavior_title") }),
|
|
317
|
+
/* @__PURE__ */ jsxRuntime.jsx("br", {}),
|
|
318
|
+
/* @__PURE__ */ jsxRuntime.jsx("br", {}),
|
|
185
319
|
/* @__PURE__ */ jsxRuntime.jsxs(index.Field.Root, { hint: t("plugin_settings.processing_of_download_webhook_info"), children: [
|
|
186
320
|
/* @__PURE__ */ jsxRuntime.jsx(index.Field.Label, { children: t("plugin_settings.processing_of_download_webhook") }),
|
|
187
321
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -248,8 +382,11 @@ const GlobalSettings = () => {
|
|
|
248
382
|
] })
|
|
249
383
|
] });
|
|
250
384
|
};
|
|
251
|
-
const LocalazyGlobalSettings = () => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
252
|
-
/* @__PURE__ */ jsxRuntime.jsx(FetchIdentity.
|
|
253
|
-
/* @__PURE__ */ jsxRuntime.
|
|
385
|
+
const LocalazyGlobalSettings = () => /* @__PURE__ */ jsxRuntime.jsxs(index.DesignSystemProvider, { theme: FetchIdentity.getDefaultTheme(), children: [
|
|
386
|
+
/* @__PURE__ */ jsxRuntime.jsx(FetchIdentity.HeadingFixGlobalStyle, {}),
|
|
387
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FetchIdentity.LocalazyIdentityProvider, { children: [
|
|
388
|
+
/* @__PURE__ */ jsxRuntime.jsx(FetchIdentity.FetchIdentity, {}),
|
|
389
|
+
/* @__PURE__ */ jsxRuntime.jsx(RequireLocalazyAuth.RequireLocalazyAuth, { children: /* @__PURE__ */ jsxRuntime.jsx(GlobalSettings, {}) })
|
|
390
|
+
] })
|
|
254
391
|
] });
|
|
255
392
|
exports.default = LocalazyGlobalSettings;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
3
|
import { useLocation } from "react-router-dom";
|
|
4
|
-
import { T as Typography, a as Toggle } from "./index-
|
|
5
|
-
import EntryExclusionService from "./entry-exclusion-service-
|
|
6
|
-
import "./i18n-
|
|
4
|
+
import { T as Typography, a as Toggle } from "./index-CHjIMO9T.mjs";
|
|
5
|
+
import EntryExclusionService from "./entry-exclusion-service-Dm5_iP7I.mjs";
|
|
6
|
+
import "./i18n-QelOdIB2.mjs";
|
|
7
7
|
import { u as useTranslation } from "./useTranslation-CZQ4lU1m.mjs";
|
|
8
8
|
const LocalazyPanel = () => {
|
|
9
9
|
const { t } = useTranslation();
|
|
@@ -44,7 +44,7 @@ const LocalazyPanel = () => {
|
|
|
44
44
|
setIsLoading(false);
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
loadExclusionState();
|
|
47
|
+
void loadExclusionState();
|
|
48
48
|
}, [contentType, documentId]);
|
|
49
49
|
const handleToggleChange = async (event) => {
|
|
50
50
|
const { checked } = event.target;
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const reactRouterDom = require("react-router-dom");
|
|
6
|
-
const index = require("./index-
|
|
7
|
-
const entryExclusionService = require("./entry-exclusion-service-
|
|
8
|
-
require("./i18n-
|
|
6
|
+
const index = require("./index-BK7lmZSN.js");
|
|
7
|
+
const entryExclusionService = require("./entry-exclusion-service-Rf4Tr0zW.js");
|
|
8
|
+
require("./i18n-CAsbU4pi.js");
|
|
9
9
|
const useTranslation = require("./useTranslation-BdIl-aLe.js");
|
|
10
10
|
const LocalazyPanel = () => {
|
|
11
11
|
const { t } = useTranslation.useTranslation();
|
|
@@ -46,7 +46,7 @@ const LocalazyPanel = () => {
|
|
|
46
46
|
setIsLoading(false);
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
loadExclusionState();
|
|
49
|
+
void loadExclusionState();
|
|
50
50
|
}, [contentType, documentId]);
|
|
51
51
|
const handleToggleChange = async (event) => {
|
|
52
52
|
const { checked } = event.target;
|
package/dist/_chunks/{LocalazyStatusColumn-DoTWD2eL.mjs → LocalazyStatusColumn-CpO3yccG.mjs}
RENAMED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
|
-
import
|
|
4
|
-
import "./
|
|
3
|
+
import { useTheme } from "styled-components";
|
|
4
|
+
import EntryExclusionService from "./entry-exclusion-service-Dm5_iP7I.mjs";
|
|
5
|
+
import "./i18n-QelOdIB2.mjs";
|
|
5
6
|
import { u as useTranslation } from "./useTranslation-CZQ4lU1m.mjs";
|
|
6
7
|
const LocalazyStatusColumn = ({ data, model }) => {
|
|
7
8
|
const { t } = useTranslation();
|
|
9
|
+
const theme = useTheme();
|
|
8
10
|
const [isExcluded, setIsExcluded] = useState(null);
|
|
9
11
|
const [isLoading, setIsLoading] = useState(true);
|
|
10
12
|
useEffect(() => {
|
|
@@ -23,13 +25,13 @@ const LocalazyStatusColumn = ({ data, model }) => {
|
|
|
23
25
|
setIsLoading(false);
|
|
24
26
|
}
|
|
25
27
|
};
|
|
26
|
-
checkStatus();
|
|
28
|
+
void checkStatus();
|
|
27
29
|
}, [data?.documentId, model]);
|
|
28
30
|
if (isLoading) {
|
|
29
|
-
return /* @__PURE__ */ jsx("span", { style: { color:
|
|
31
|
+
return /* @__PURE__ */ jsx("span", { style: { color: theme.colors.neutral600, fontSize: "12px" }, children: "..." });
|
|
30
32
|
}
|
|
31
33
|
if (isExcluded === null) {
|
|
32
|
-
return /* @__PURE__ */ jsx("span", { style: { color:
|
|
34
|
+
return /* @__PURE__ */ jsx("span", { style: { color: theme.colors.neutral600, fontSize: "12px" }, children: "-" });
|
|
33
35
|
}
|
|
34
36
|
return /* @__PURE__ */ jsx(
|
|
35
37
|
"span",
|
|
@@ -39,8 +41,8 @@ const LocalazyStatusColumn = ({ data, model }) => {
|
|
|
39
41
|
borderRadius: "4px",
|
|
40
42
|
fontSize: "12px",
|
|
41
43
|
fontWeight: "bold",
|
|
42
|
-
backgroundColor: isExcluded ?
|
|
43
|
-
color:
|
|
44
|
+
backgroundColor: isExcluded ? theme.colors.danger600 : theme.colors.success600,
|
|
45
|
+
color: theme.colors.neutral0
|
|
44
46
|
},
|
|
45
47
|
children: isExcluded ? t("plugin_settings.status_excluded") : t("plugin_settings.status_included")
|
|
46
48
|
}
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
|
-
const
|
|
6
|
-
require("./
|
|
5
|
+
const styled = require("styled-components");
|
|
6
|
+
const entryExclusionService = require("./entry-exclusion-service-Rf4Tr0zW.js");
|
|
7
|
+
require("./i18n-CAsbU4pi.js");
|
|
7
8
|
const useTranslation = require("./useTranslation-BdIl-aLe.js");
|
|
8
9
|
const LocalazyStatusColumn = ({ data, model }) => {
|
|
9
10
|
const { t } = useTranslation.useTranslation();
|
|
11
|
+
const theme = styled.useTheme();
|
|
10
12
|
const [isExcluded, setIsExcluded] = React.useState(null);
|
|
11
13
|
const [isLoading, setIsLoading] = React.useState(true);
|
|
12
14
|
React.useEffect(() => {
|
|
@@ -25,13 +27,13 @@ const LocalazyStatusColumn = ({ data, model }) => {
|
|
|
25
27
|
setIsLoading(false);
|
|
26
28
|
}
|
|
27
29
|
};
|
|
28
|
-
checkStatus();
|
|
30
|
+
void checkStatus();
|
|
29
31
|
}, [data?.documentId, model]);
|
|
30
32
|
if (isLoading) {
|
|
31
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color:
|
|
33
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: theme.colors.neutral600, fontSize: "12px" }, children: "..." });
|
|
32
34
|
}
|
|
33
35
|
if (isExcluded === null) {
|
|
34
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color:
|
|
36
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: theme.colors.neutral600, fontSize: "12px" }, children: "-" });
|
|
35
37
|
}
|
|
36
38
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
37
39
|
"span",
|
|
@@ -41,8 +43,8 @@ const LocalazyStatusColumn = ({ data, model }) => {
|
|
|
41
43
|
borderRadius: "4px",
|
|
42
44
|
fontSize: "12px",
|
|
43
45
|
fontWeight: "bold",
|
|
44
|
-
backgroundColor: isExcluded ?
|
|
45
|
-
color:
|
|
46
|
+
backgroundColor: isExcluded ? theme.colors.danger600 : theme.colors.success600,
|
|
47
|
+
color: theme.colors.neutral0
|
|
46
48
|
},
|
|
47
49
|
children: isExcluded ? t("plugin_settings.status_excluded") : t("plugin_settings.status_included")
|
|
48
50
|
}
|