@crowdin/app-project-module 3.2.2 → 3.4.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 (34) hide show
  1. package/out/middlewares/integration-access-denied.d.ts +6 -2
  2. package/out/middlewares/integration-access-denied.js +25 -11
  3. package/out/modules/about.js +2 -10
  4. package/out/modules/api/api.js +7 -0
  5. package/out/modules/api/components.d.ts +6 -1
  6. package/out/modules/api/components.js +6 -1
  7. package/out/modules/integration/handlers/crowdin-update.js +33 -6
  8. package/out/modules/integration/handlers/integration-update.js +1 -1
  9. package/out/modules/integration/handlers/job-list.d.ts +8 -2
  10. package/out/modules/integration/handlers/job-list.js +30 -11
  11. package/out/modules/integration/handlers/main.js +15 -5
  12. package/out/modules/integration/types.d.ts +8 -0
  13. package/out/modules/integration/util/types.d.ts +2 -0
  14. package/out/static/css/styles.css +1 -1
  15. package/out/static/img/crowdin_small.svg +8 -7
  16. package/out/static/ui/about.bundle.js +11 -1
  17. package/out/static/ui/about.bundle.js.map +1 -1
  18. package/out/static/ui/error.bundle.js +8 -8
  19. package/out/static/ui/error.bundle.js.map +1 -1
  20. package/out/static/ui/form.bundle.js.map +1 -1
  21. package/out/static/ui/login.bundle.js +4 -4
  22. package/out/static/ui/login.bundle.js.map +1 -1
  23. package/out/static/ui/main.bundle.js +750 -687
  24. package/out/static/ui/main.bundle.js.map +1 -1
  25. package/out/static/ui/subscription.bundle.js +1 -1
  26. package/out/static/ui/subscription.bundle.js.map +1 -1
  27. package/out/storage/drizzle/index.js +6 -1
  28. package/out/util/index.d.ts +1 -0
  29. package/out/util/index.js +16 -1
  30. package/out/util/logo.d.ts +4 -0
  31. package/out/util/logo.js +47 -0
  32. package/out/util/static-files.d.ts +4 -1
  33. package/out/util/static-files.js +26 -4
  34. package/package.json +2 -1
@@ -18711,6 +18711,11 @@
18711
18711
  toast(message);
18712
18712
  }
18713
18713
  }
18714
+ function contactUser(userId) {
18715
+ AP.getContext(function (context) {
18716
+ AP.redirect(`${context.organization_id ? '/u' : ''}/messages/create/${userId}`);
18717
+ });
18718
+ }
18714
18719
  function reloadLocation() {
18715
18720
  ensureInitialized();
18716
18721
  window.location.href =
@@ -22513,7 +22518,7 @@
22513
22518
  };
22514
22519
  function AppAlert({ title, variant = 'info', hideIcon = false, className, children, dangerouslySetInnerHTML, ...props }) {
22515
22520
  const Icon = variantIcons[variant];
22516
- return (jsxRuntimeExports.jsxs(Alert, { variant: variant === 'destructive' ? 'destructive' : 'default', className: cn(variantStyles[variant], className), ...props, children: [!hideIcon && jsxRuntimeExports.jsx(Icon, {}), title && jsxRuntimeExports.jsx(AlertTitle, { children: title }), dangerouslySetInnerHTML ? (jsxRuntimeExports.jsx(AlertDescription, { dangerouslySetInnerHTML: dangerouslySetInnerHTML })) : (jsxRuntimeExports.jsx(AlertDescription, { children: children }))] }));
22521
+ return (jsxRuntimeExports.jsxs(Alert, { variant: variant === 'destructive' ? 'destructive' : 'default', className: cn(variantStyles[variant], className), ...props, children: [!hideIcon && jsxRuntimeExports.jsx(Icon, {}), title && jsxRuntimeExports.jsx(AlertTitle, { children: title }), dangerouslySetInnerHTML ? (jsxRuntimeExports.jsx(AlertDescription, { className: "html-content block", dangerouslySetInnerHTML: dangerouslySetInnerHTML })) : (jsxRuntimeExports.jsx(AlertDescription, { children: children }))] }));
22517
22522
  }
22518
22523
 
22519
22524
  var __defProp$1 = Object.defineProperty;
@@ -22752,14 +22757,9 @@
22752
22757
  .then(checkResponse)
22753
22758
  .then(reloadLocation)
22754
22759
  .then(() => localStorage.removeItem(`revised_${name}`))
22755
- .catch((e) => catchRejection(e, 'Looks like you are not logged in'));
22756
- }
22757
- function contactUser(userId) {
22758
- AP.getContext(function (context) {
22759
- AP.redirect(`${context.organization_id ? '/u' : ''}/messages/create/${userId}`);
22760
- });
22760
+ .catch((e) => catchRejection(e, "Can't disconnect the integration"));
22761
22761
  }
22762
- return (jsxRuntimeExports.jsxs("div", { className: "mx-auto max-w-[1420px] px-6 py-4", children: [jsxRuntimeExports.jsx("div", { className: "flex min-h-[500px] items-center justify-center", children: jsxRuntimeExports.jsxs("div", { children: [jsxRuntimeExports.jsxs("div", { className: "mb-6", children: [jsxRuntimeExports.jsx("h3", { className: "m-0 text-2xl font-semibold text-foreground", children: message }), owners && (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("p", { className: "text-sm leading-relaxed text-foreground", children: "This integration allows only one connection per project to ensure consistent configuration and prevent file import or synchronization issues." }), owners.length > 1 ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("p", { className: "mt-4 text-sm", children: "Managed by:" }), jsxRuntimeExports.jsx("ul", { children: owners.map((owner) => (jsxRuntimeExports.jsx("li", { children: jsxRuntimeExports.jsx("a", { href: "#", className: "text-primary underline-offset-4 hover:underline", onClick: () => contactUser(owner.id), children: owner.name }) }, owner.id))) }), jsxRuntimeExports.jsx("p", { className: "mt-4 text-sm", children: "To request access, please contact one of the project members listed above." })] })) : (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs("p", { className: "mt-4 text-sm", children: ["Managed by:", ' ', jsxRuntimeExports.jsx("a", { href: "#", className: "text-primary underline-offset-4 hover:underline", onClick: () => contactUser(owners[0].id), children: owners[0].name })] }), jsxRuntimeExports.jsx("p", { className: "mt-4 text-sm", children: "To request access, please contact the project member listed above." })] }))] }))] }), allowLogout && hideActions ? (jsxRuntimeExports.jsx(Card, { children: jsxRuntimeExports.jsxs(CardContent, { className: "grid gap-4", children: [jsxRuntimeExports.jsx(AppAlert, { variant: "warning", children: "Deleting the integration will disconnect it and reset its settings for this project." }), jsxRuntimeExports.jsx(Button, { variant: "outline", onClick: () => integrationLogout(), children: "Delete Integration" })] }) })) : (!hideActions && (jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntimeExports.jsx(Button, { variant: "outline", onClick: () => integrationLogout(), children: "Log out" }), jsxRuntimeExports.jsxs("span", { children: [' ', "or", ' ', jsxRuntimeExports.jsx("a", { className: "text-primary underline-offset-4 hover:underline", href: "https://crowdin.com/contacts", target: "_blank", rel: "noreferrer", children: "contact us" }), ' ', "for help"] })] })))] }) }), jsxRuntimeExports.jsx(Toaster, {})] }));
22762
+ return (jsxRuntimeExports.jsxs("div", { className: "mx-auto max-w-[1420px] px-6 py-4", children: [jsxRuntimeExports.jsx("div", { className: "flex min-h-[500px] items-center justify-center", children: jsxRuntimeExports.jsxs("div", { children: [jsxRuntimeExports.jsxs("div", { className: "mb-6", children: [jsxRuntimeExports.jsx("h3", { className: "m-0 text-2xl font-semibold text-foreground", children: message }), owners && (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("p", { className: "text-sm leading-relaxed text-foreground", children: "This integration allows only one connection per project to ensure consistent configuration and prevent file import or synchronization issues." }), owners.length > 1 ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx("p", { className: "mt-4 text-sm", children: "Managed by:" }), jsxRuntimeExports.jsx("ul", { children: owners.map((owner) => (jsxRuntimeExports.jsx("li", { children: jsxRuntimeExports.jsx("a", { href: "#", className: "text-primary underline-offset-4 hover:underline", onClick: () => contactUser(owner.id), children: owner.name }) }, owner.id))) }), jsxRuntimeExports.jsx("p", { className: "mt-4 text-sm", children: "To request access, please contact one of the project members listed above." })] })) : (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs("p", { className: "mt-4 text-sm", children: ["Managed by:", ' ', jsxRuntimeExports.jsx("a", { href: "#", className: "text-primary underline-offset-4 hover:underline", onClick: () => contactUser(owners[0].id), children: owners[0].name })] }), jsxRuntimeExports.jsx("p", { className: "mt-4 text-sm", children: "To request access, please contact the project member listed above." })] }))] }))] }), allowLogout && hideActions ? (jsxRuntimeExports.jsx(Card, { children: jsxRuntimeExports.jsxs(CardContent, { className: "grid gap-4", children: [jsxRuntimeExports.jsx(AppAlert, { variant: "warning", children: "Deleting the integration will disconnect it and reset its settings for this project." }), jsxRuntimeExports.jsx(Button, { variant: "outline", onClick: () => integrationLogout(), children: "Delete Integration" })] }) })) : (!hideActions && (jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntimeExports.jsx(Button, { variant: "outline", onClick: () => integrationLogout(), children: "Disconnect" }), jsxRuntimeExports.jsxs("span", { children: [' ', "or", ' ', jsxRuntimeExports.jsx("a", { className: "text-primary underline-offset-4 hover:underline", href: "https://crowdin.com/contacts", target: "_blank", rel: "noreferrer", children: "contact us" }), ' ', "for help"] })] })))] }) }), jsxRuntimeExports.jsx(Toaster, {})] }));
22763
22763
  };
22764
22764
 
22765
22765
  initializeCrowdinIframeContext();