@localazy/strapi-plugin 1.3.0 → 1.6.0

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.
Files changed (69) hide show
  1. package/README.md +30 -0
  2. package/dist/_chunks/{FetchIdentity-BJGoZPpM.mjs → FetchIdentity-Bm7bc5bS.mjs} +36 -44
  3. package/dist/_chunks/{FetchIdentity-CtBRO-Cn.js → FetchIdentity-CcEjakiz.js} +25 -33
  4. package/dist/_chunks/{LanguagesSelector-DJxgCwgM.mjs → LanguagesSelector-B1rwN7-Y.mjs} +4 -3
  5. package/dist/_chunks/{LanguagesSelector-CNaKrS-m.js → LanguagesSelector-DejYCwBl.js} +4 -3
  6. package/dist/_chunks/{LocalazyApp-CJRpsTKr.mjs → LocalazyApp-C4kbsnQh.mjs} +148 -35
  7. package/dist/_chunks/{LocalazyApp-B1qCCEPe.js → LocalazyApp-jPO7Yr1S.js} +154 -41
  8. package/dist/_chunks/{LocalazyContentTransferSetup-CLAWn95U.mjs → LocalazyContentTransferSetup-C1wDD9hA.mjs} +58 -22
  9. package/dist/_chunks/{LocalazyContentTransferSetup-CCxiLHdG.js → LocalazyContentTransferSetup-DZh4ZdSi.js} +63 -27
  10. package/dist/_chunks/{LocalazyGlobalSettings-BJ5qfFfK.js → LocalazyGlobalSettings-D76it6rn.js} +57 -26
  11. package/dist/_chunks/{LocalazyGlobalSettings-Z-4Ykc_J.mjs → LocalazyGlobalSettings-DOW5rjLn.mjs} +56 -25
  12. package/dist/_chunks/{LocalazyPanel-CL_mzzfD.mjs → LocalazyPanel-C_Z4W49T.mjs} +12 -6
  13. package/dist/_chunks/{LocalazyPanel-DE3TtHOQ.js → LocalazyPanel-D2LQpqii.js} +14 -8
  14. package/dist/_chunks/{LocalazyStatusColumn-R5n6q_cx.mjs → LocalazyStatusColumn-C_ZCd_s7.mjs} +10 -4
  15. package/dist/_chunks/{LocalazyStatusColumn-BMLcklG-.js → LocalazyStatusColumn-Dy6N4_X6.js} +10 -4
  16. package/dist/_chunks/{RequireLocalazyAuth-WKKFdQlR.js → RequireLocalazyAuth-BVwF0bRC.js} +31 -4
  17. package/dist/_chunks/{RequireLocalazyAuth-Dzsu6UNS.mjs → RequireLocalazyAuth-DNhTZZ_6.mjs} +32 -5
  18. package/dist/_chunks/{entry-exclusion-service-DxqTlZFR.mjs → entry-exclusion-service-CF_yNCly.mjs} +1 -1
  19. package/dist/_chunks/{entry-exclusion-service-CggmAKxq.js → entry-exclusion-service-CH3ZoJQN.js} +1 -1
  20. package/dist/_chunks/{has-model-changed-FMGVcFHU.mjs → has-model-changed-CVJEuGxM.mjs} +2 -2
  21. package/dist/_chunks/{has-model-changed-BR53L6pA.js → has-model-changed-DdYbyv0v.js} +2 -2
  22. package/dist/_chunks/{i18n-QelOdIB2.mjs → i18n-76ox2llT.mjs} +9 -2
  23. package/dist/_chunks/{i18n-CAsbU4pi.js → i18n-C5ucROBh.js} +9 -2
  24. package/dist/_chunks/{index-BmxGKspv.js → index-CEGaWWh3.js} +33 -11
  25. package/dist/_chunks/{index-BK7lmZSN.js → index-CTkxoioB.js} +1 -0
  26. package/dist/_chunks/{index-toauQlIK.mjs → index-DP2ugzc_.mjs} +34 -12
  27. package/dist/_chunks/{index-CHjIMO9T.mjs → index-shryj0jT.mjs} +19 -18
  28. package/dist/_chunks/{strapi-api-base-CT9lknwW.js → strapi-api-base-CCUuu7EY.js} +1 -1
  29. package/dist/_chunks/{strapi-api-base-BflplVsH.mjs → strapi-api-base-IiMEtDoH.mjs} +1 -1
  30. package/dist/admin/index.js +1 -1
  31. package/dist/admin/index.mjs +1 -1
  32. package/dist/admin/src/components/LocalazyStatusColumn.d.ts +1 -1
  33. package/dist/admin/src/constants/permissions.d.ts +29 -0
  34. package/dist/admin/src/modules/@common/components/LanguagesSelector.d.ts +1 -0
  35. package/dist/admin/src/modules/activity-logs/locale/en.d.ts +4 -0
  36. package/dist/admin/src/modules/activity-logs/services/debug-bundle-service.d.ts +10 -0
  37. package/dist/admin/src/modules/login/locale/en.d.ts +1 -0
  38. package/dist/admin/src/modules/plugin-settings/components/Tree.d.ts +1 -0
  39. package/dist/admin/src/modules/plugin-settings/components/TreeItem.d.ts +1 -0
  40. package/dist/admin/src/modules/plugin-settings/components/WebhookSetup.d.ts +4 -1
  41. package/dist/admin/src/modules/plugin-settings/locale/en.d.ts +2 -0
  42. package/dist/admin/src/modules/plugin-settings/services/plugin-settings-service.d.ts +4 -0
  43. package/dist/server/index.js +665 -38
  44. package/dist/server/index.mjs +665 -39
  45. package/dist/server/src/bootstrap.d.ts +1 -1
  46. package/dist/server/src/constants/permissions.d.ts +38 -0
  47. package/dist/server/src/controllers/debug-bundle-controller.d.ts +7 -0
  48. package/dist/server/src/controllers/index.d.ts +6 -0
  49. package/dist/server/src/controllers/plugin-settings-controller.d.ts +1 -0
  50. package/dist/server/src/core/index.d.ts +5 -1
  51. package/dist/server/src/db/model/activity-logs.d.ts +10 -0
  52. package/dist/server/src/index.d.ts +64 -8
  53. package/dist/server/src/routes/activity-logs-routes.d.ts +20 -3
  54. package/dist/server/src/routes/debug-bundle-routes.d.ts +14 -0
  55. package/dist/server/src/routes/entry-exclusion-routes.d.ts +20 -3
  56. package/dist/server/src/routes/index.d.ts +52 -6
  57. package/dist/server/src/routes/localazy-auth-routes.d.ts +6 -1
  58. package/dist/server/src/routes/localazy-project-routes.d.ts +20 -3
  59. package/dist/server/src/routes/localazy-transfer-routes.d.ts +6 -1
  60. package/dist/server/src/routes/localazy-user-routes.d.ts +20 -3
  61. package/dist/server/src/routes/plugin-settings-routes.d.ts +20 -3
  62. package/dist/server/src/routes/strapi-routes.d.ts +20 -3
  63. package/dist/server/src/services/activity-logs-service.d.ts +3 -1
  64. package/dist/server/src/services/index.d.ts +5 -1
  65. package/dist/server/src/services/localazy-transfer-download-service.d.ts +2 -1
  66. package/dist/server/src/services/plugin-settings-service.d.ts +4 -0
  67. package/dist/server/src/utils/build-debug-bundle.d.ts +68 -0
  68. package/dist/server/src/utils/sanitize-debug-bundle.d.ts +25 -0
  69. package/package.json +2 -1
@@ -51084,24 +51084,25 @@ export {
51084
51084
  Box as B,
51085
51085
  CheckboxImpl as C,
51086
51086
  Dialog as D,
51087
- PreviousLink as E,
51087
+ ForwardRef$4N as E,
51088
51088
  Field as F,
51089
51089
  Grid as G,
51090
- PageLink as H,
51091
- Dots as I,
51092
- lodashExports as J,
51093
- ForwardRef$j as K,
51090
+ PreviousLink as H,
51091
+ PageLink as I,
51092
+ Dots as J,
51093
+ lodashExports as K,
51094
51094
  Loader as L,
51095
51095
  MultiSelect as M,
51096
51096
  NextLink as N,
51097
- DatePicker$1 as O,
51097
+ ForwardRef$j as O,
51098
51098
  Pagination as P,
51099
- Tabs as Q,
51100
- ForwardRef$57 as R,
51099
+ DatePicker$1 as Q,
51100
+ Tabs as R,
51101
51101
  SingleSelect as S,
51102
51102
  Typography as T,
51103
- darkTheme as U,
51104
- lightTheme as V,
51103
+ ForwardRef$57 as U,
51104
+ darkTheme as V,
51105
+ lightTheme as W,
51105
51106
  Toggle as a,
51106
51107
  MultiSelectOption as b,
51107
51108
  Flex as c,
@@ -51120,12 +51121,12 @@ export {
51120
51121
  ForwardRef$d as p,
51121
51122
  ForwardRef$3P as q,
51122
51123
  ForwardRef$4j as r,
51123
- SubNav as s,
51124
- SubNavHeader as t,
51125
- SubNavSections as u,
51126
- SubNavSection as v,
51127
- SubNavLink as w,
51128
- ForwardRef$L as x,
51129
- ForwardRef$4L as y,
51130
- ForwardRef$4N as z
51124
+ TooltipImpl as s,
51125
+ SubNav as t,
51126
+ SubNavHeader as u,
51127
+ SubNavSections as v,
51128
+ SubNavSection as w,
51129
+ SubNavLink as x,
51130
+ ForwardRef$L as y,
51131
+ ForwardRef$4L as z
51131
51132
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const admin = require("@strapi/strapi/admin");
3
- const index = require("./index-BmxGKspv.js");
3
+ const index = require("./index-CEGaWWh3.js");
4
4
  const BASE_PLUGIN_PATH = `/${index.PLUGIN_ID}`;
5
5
  const LOCALAZY_HEADER = { "X-Localazy-Initiated-By": "strapi-plugin-localazy" };
6
6
  const withPluginHeader = (config) => ({
@@ -1,5 +1,5 @@
1
1
  import { getFetchClient } from "@strapi/strapi/admin";
2
- import { P as PLUGIN_ID } from "./index-toauQlIK.mjs";
2
+ import { a as PLUGIN_ID } from "./index-DP2ugzc_.mjs";
3
3
  const BASE_PLUGIN_PATH = `/${PLUGIN_ID}`;
4
4
  const LOCALAZY_HEADER = { "X-Localazy-Initiated-By": "strapi-plugin-localazy" };
5
5
  const withPluginHeader = (config) => ({
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
- const index = require("../_chunks/index-BmxGKspv.js");
2
+ const index = require("../_chunks/index-CEGaWWh3.js");
3
3
  require("react");
4
4
  module.exports = index.index;
@@ -1,4 +1,4 @@
1
- import { i } from "../_chunks/index-toauQlIK.mjs";
1
+ import { i } from "../_chunks/index-DP2ugzc_.mjs";
2
2
  import "react";
3
3
  export {
4
4
  i as default
@@ -1,3 +1,3 @@
1
1
  import '../i18n';
2
- declare const LocalazyStatusColumn: ({ data, model }: any) => import("react/jsx-runtime").JSX.Element;
2
+ declare const LocalazyStatusColumn: ({ data, model }: any) => import("react/jsx-runtime").JSX.Element | null;
3
3
  export default LocalazyStatusColumn;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Mirror of `server/src/constants/permissions.ts`. Admin code can't import from
3
+ * `server/`, so any rename must be applied in both files.
4
+ *
5
+ * `useRBAC` derives the boolean it returns under `allowedActions` from the LAST
6
+ * dotted segment of each UID, lowercased and prefixed with `can`:
7
+ *
8
+ * plugin::localazy.read → canRead
9
+ * plugin::localazy.transfer → canTransfer
10
+ * plugin::localazy.settings.read → canRead (collides with READ above!)
11
+ * plugin::localazy.settings.update → canUpdate
12
+ *
13
+ * Because `settings.read` and `read` both collapse to `canRead`, never pass
14
+ * both into the same `useRBAC` call — issue separate calls per distinct UID
15
+ * you need to check (one call returns one `canX` boolean per unique segment).
16
+ */
17
+ export declare const PERMISSION_UIDS: {
18
+ readonly READ: `plugin::${string}.read`;
19
+ readonly TRANSFER: `plugin::${string}.transfer`;
20
+ readonly SETTINGS_READ: `plugin::${string}.settings.read`;
21
+ readonly SETTINGS_UPDATE: `plugin::${string}.settings.update`;
22
+ };
23
+ export type PermissionUid = (typeof PERMISSION_UIDS)[keyof typeof PERMISSION_UIDS];
24
+ type PermissionDescriptor = {
25
+ action: PermissionUid;
26
+ subject: null;
27
+ };
28
+ export declare const PERMISSIONS: Record<keyof typeof PERMISSION_UIDS, PermissionDescriptor[]>;
29
+ export {};
@@ -6,6 +6,7 @@ interface LanguageSelectorProps {
6
6
  projectLanguages: any[];
7
7
  preselectedLanguages: any[];
8
8
  onChange: (values: any) => void;
9
+ disabled?: boolean;
9
10
  }
10
11
  declare const LanguagesSelector: React.FC<LanguageSelectorProps>;
11
12
  export { LanguagesSelector };
@@ -29,5 +29,9 @@ declare const _default: {
29
29
  date_from: string;
30
30
  date_to: string;
31
31
  retention_info: string;
32
+ download_bundle: string;
33
+ download_bundle_warning: string;
34
+ download_bundle_success: string;
35
+ download_bundle_error: string;
32
36
  };
33
37
  export default _default;
@@ -0,0 +1,10 @@
1
+ export type BrowserInfo = {
2
+ userAgent?: string;
3
+ language?: string;
4
+ viewport?: {
5
+ width: number;
6
+ height: number;
7
+ };
8
+ consoleErrors?: string[];
9
+ };
10
+ export declare const downloadDebugBundle: (sessionId: string, token: string | null, browserInfo: BrowserInfo) => Promise<void>;
@@ -4,5 +4,6 @@ declare const _default: {
4
4
  you_have_to_own_account_for_the_plugin_to_work_properly: string;
5
5
  read_the_documentation: string;
6
6
  logout_from_localazy: string;
7
+ requires_settings_update_permission: string;
7
8
  };
8
9
  export default _default;
@@ -3,6 +3,7 @@ interface TreeProps {
3
3
  objects: any[];
4
4
  onTreeItemClick: (key: string[], currentValue: boolean) => void;
5
5
  initiallyExpanded: boolean;
6
+ disabled?: boolean;
6
7
  }
7
8
  declare const Tree: React.FC<TreeProps>;
8
9
  export { Tree };
@@ -5,6 +5,7 @@ interface TreeItemProps {
5
5
  children?: any;
6
6
  passedKey: string;
7
7
  onTreeItemClick: (key: any, currentValue: any) => void;
8
+ disabled?: boolean;
8
9
  }
9
10
  declare const TreeItem: React.FC<TreeItemProps>;
10
11
  export { TreeItem };
@@ -1,2 +1,5 @@
1
- declare function WebhookSetup(): import("react/jsx-runtime").JSX.Element;
1
+ interface WebhookSetupProps {
2
+ disabled?: boolean;
3
+ }
4
+ declare function WebhookSetup({ disabled }?: WebhookSetupProps): import("react/jsx-runtime").JSX.Element;
2
5
  export { WebhookSetup };
@@ -23,6 +23,8 @@ declare const _default: {
23
23
  webhook_author: string;
24
24
  webhook_author_info: string;
25
25
  webhook_author_placeholder: string;
26
+ webhook_author_permission_required: string;
27
+ webhook_author_unknown_user: string;
26
28
  webhook_languages: string;
27
29
  webhook_languages_info: string;
28
30
  webhook_languages_placeholder: string;
@@ -3,5 +3,9 @@ export default class PluginSettingsService {
3
3
  static updateContentTransferSetup(data: any): Promise<any>;
4
4
  static getPluginSettings(): Promise<any>;
5
5
  static updatePluginSettings(data: any): Promise<any>;
6
+ static updatePluginSettingsUiPrefs(data: {
7
+ defaultRoute?: string;
8
+ activityLogsSort?: any;
9
+ }): Promise<any>;
6
10
  static getSyncCursor(): Promise<any>;
7
11
  }