@crowdin/app-project-module 0.107.0-cf-0 → 0.108.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 (151) hide show
  1. package/out/index.d.ts +0 -1
  2. package/out/index.js +12 -30
  3. package/out/middlewares/crowdin-client.d.ts +1 -1
  4. package/out/middlewares/integration-credentials.d.ts +1 -1
  5. package/out/middlewares/integration-credentials.js +1 -4
  6. package/out/middlewares/render-ui-module.d.ts +3 -3
  7. package/out/middlewares/render-ui-module.js +13 -9
  8. package/out/middlewares/ui-module.d.ts +1 -1
  9. package/out/middlewares/ui-module.js +1 -10
  10. package/out/modules/about.d.ts +1 -2
  11. package/out/modules/about.js +3 -10
  12. package/out/modules/ai-prompt-provider/handlers/compile.d.ts +1 -1
  13. package/out/modules/ai-prompt-provider/index.js +2 -2
  14. package/out/modules/ai-provider/handlers/chat-completions.d.ts +1 -1
  15. package/out/modules/ai-provider/handlers/get-model-list.d.ts +1 -1
  16. package/out/modules/ai-provider/index.js +2 -2
  17. package/out/modules/ai-provider/types.d.ts +2 -2
  18. package/out/modules/ai-request-processors/handler.d.ts +1 -1
  19. package/out/modules/ai-tools/handlers/tool-calls.d.ts +1 -1
  20. package/out/modules/ai-tools/index.js +1 -1
  21. package/out/modules/api/api.js +58 -7
  22. package/out/modules/api/base.d.ts +1 -0
  23. package/out/modules/api/base.js +1 -0
  24. package/out/modules/api/components.d.ts +251 -27
  25. package/out/modules/api/components.js +251 -27
  26. package/out/modules/auth-guard/handlers/verify.d.ts +1 -1
  27. package/out/modules/auth-guard/index.js +1 -1
  28. package/out/modules/automation-action/handlers/execute.d.ts +1 -1
  29. package/out/modules/automation-action/handlers/input-schema.d.ts +1 -1
  30. package/out/modules/automation-action/handlers/output-schema.d.ts +1 -1
  31. package/out/modules/automation-action/handlers/validate-settings.d.ts +1 -1
  32. package/out/modules/automation-action/index.js +1 -1
  33. package/out/modules/context-menu/index.js +2 -2
  34. package/out/modules/custom-mt/handlers/translate.d.ts +1 -1
  35. package/out/modules/custom-mt/handlers/translate.js +8 -17
  36. package/out/modules/custom-mt/index.js +3 -3
  37. package/out/modules/custom-mt/types.d.ts +1 -2
  38. package/out/modules/custom-spell-check/handlers/get-languages-list.d.ts +1 -1
  39. package/out/modules/custom-spell-check/handlers/spell-check.d.ts +1 -1
  40. package/out/modules/custom-spell-check/index.js +4 -4
  41. package/out/modules/editor-right-panel/index.js +1 -1
  42. package/out/modules/external-qa-check/handlers/validate.d.ts +1 -1
  43. package/out/modules/external-qa-check/index.js +2 -2
  44. package/out/modules/file-processing/handlers/custom-file-format.d.ts +2 -7
  45. package/out/modules/file-processing/handlers/custom-file-format.js +19 -59
  46. package/out/modules/file-processing/handlers/file-download.d.ts +1 -1
  47. package/out/modules/file-processing/handlers/file-download.js +0 -5
  48. package/out/modules/file-processing/handlers/pre-post-process.d.ts +1 -1
  49. package/out/modules/file-processing/handlers/pre-post-process.js +14 -34
  50. package/out/modules/file-processing/handlers/translations-alignment.d.ts +1 -1
  51. package/out/modules/file-processing/index.js +2 -12
  52. package/out/modules/file-processing/util/defaults.js +6 -50
  53. package/out/modules/file-processing/util/files.js +1 -2
  54. package/out/modules/form-data-display.d.ts +1 -1
  55. package/out/modules/form-data-save.d.ts +1 -1
  56. package/out/modules/install.d.ts +1 -1
  57. package/out/modules/integration/handlers/crowdin-file-progress.d.ts +1 -1
  58. package/out/modules/integration/handlers/crowdin-files.d.ts +1 -1
  59. package/out/modules/integration/handlers/crowdin-project.d.ts +1 -1
  60. package/out/modules/integration/handlers/crowdin-update.d.ts +1 -1
  61. package/out/modules/integration/handlers/crowdin-webhook.d.ts +1 -1
  62. package/out/modules/integration/handlers/integration-data.d.ts +1 -1
  63. package/out/modules/integration/handlers/integration-login.d.ts +1 -1
  64. package/out/modules/integration/handlers/integration-logout.d.ts +1 -1
  65. package/out/modules/integration/handlers/integration-update.d.ts +1 -1
  66. package/out/modules/integration/handlers/integration-webhook.d.ts +1 -1
  67. package/out/modules/integration/handlers/invite-users.d.ts +1 -1
  68. package/out/modules/integration/handlers/job-cancel.d.ts +1 -1
  69. package/out/modules/integration/handlers/job-info-deprecated.d.ts +1 -1
  70. package/out/modules/integration/handlers/job-info.d.ts +1 -1
  71. package/out/modules/integration/handlers/job-list.d.ts +1 -1
  72. package/out/modules/integration/handlers/main.d.ts +1 -1
  73. package/out/modules/integration/handlers/main.js +1 -13
  74. package/out/modules/integration/handlers/oauth-login.d.ts +1 -1
  75. package/out/modules/integration/handlers/oauth-login.js +2 -10
  76. package/out/modules/integration/handlers/oauth-polling.d.ts +1 -1
  77. package/out/modules/integration/handlers/oauth-url.d.ts +1 -1
  78. package/out/modules/integration/handlers/settings-save.d.ts +1 -1
  79. package/out/modules/integration/handlers/settings.d.ts +1 -1
  80. package/out/modules/integration/handlers/sync-settings-save.d.ts +1 -1
  81. package/out/modules/integration/handlers/sync-settings.d.ts +1 -1
  82. package/out/modules/integration/handlers/user-errors.d.ts +1 -1
  83. package/out/modules/integration/handlers/users.d.ts +1 -1
  84. package/out/modules/integration/index.js +33 -12
  85. package/out/modules/manifest.js +12 -12
  86. package/out/modules/modal/index.js +2 -2
  87. package/out/modules/organization-menu/index.js +4 -5
  88. package/out/modules/organization-settings-menu/index.js +4 -5
  89. package/out/modules/profile-resources-menu/index.js +4 -5
  90. package/out/modules/profile-settings-menu/index.js +4 -5
  91. package/out/modules/project-menu/index.js +1 -1
  92. package/out/modules/project-menu-crowdsource/index.js +1 -1
  93. package/out/modules/project-reports/index.js +2 -3
  94. package/out/modules/project-tools/index.js +2 -3
  95. package/out/modules/status.d.ts +1 -1
  96. package/out/modules/status.js +3 -12
  97. package/out/modules/subscription-paid.d.ts +1 -1
  98. package/out/modules/uninstall.d.ts +1 -1
  99. package/out/modules/webhooks/handlers/webhook-handler.d.ts +1 -1
  100. package/out/modules/webhooks/handlers/webhook-handler.js +15 -30
  101. package/out/modules/webhooks/types.d.ts +0 -7
  102. package/out/modules/workflow-step-type/handlers/delete-step.d.ts +1 -1
  103. package/out/modules/workflow-step-type/handlers/step-settings-save.d.ts +1 -1
  104. package/out/modules/workflow-step-type/index.js +2 -2
  105. package/out/modules/workflow-step-type/types.d.ts +1 -1
  106. package/out/storage/index.js +1 -8
  107. package/out/types.d.ts +4 -41
  108. package/out/util/connection.js +15 -4
  109. package/out/util/credentials-masker.d.ts +1 -1
  110. package/out/util/handlebars.d.ts +1 -0
  111. package/out/util/handlebars.js +46 -0
  112. package/out/util/index.d.ts +1 -11
  113. package/out/util/index.js +6 -50
  114. package/out/views/about.handlebars +102 -0
  115. package/out/views/error.handlebars +54 -0
  116. package/out/views/form.handlebars +31 -0
  117. package/out/views/install.handlebars +16 -0
  118. package/out/views/login.handlebars +332 -0
  119. package/out/views/main.handlebars +2042 -0
  120. package/out/views/oauth.handlebars +11 -0
  121. package/out/views/partials/head.handlebars +53 -0
  122. package/out/views/subscription.handlebars +26 -0
  123. package/package.json +12 -25
  124. package/out/storage/d1.d.ts +0 -107
  125. package/out/storage/d1.js +0 -829
  126. package/out/util/cron.d.ts +0 -29
  127. package/out/util/cron.js +0 -87
  128. package/out/util/jsx-renderer.d.ts +0 -6
  129. package/out/util/jsx-renderer.js +0 -13
  130. package/out/util/static-files.d.ts +0 -19
  131. package/out/util/static-files.js +0 -87
  132. package/out/views/AboutPage.d.ts +0 -10
  133. package/out/views/AboutPage.js +0 -76
  134. package/out/views/ErrorPage.d.ts +0 -18
  135. package/out/views/ErrorPage.js +0 -56
  136. package/out/views/FormPage.d.ts +0 -14
  137. package/out/views/FormPage.js +0 -28
  138. package/out/views/InstallPage.d.ts +0 -10
  139. package/out/views/InstallPage.js +0 -22
  140. package/out/views/LoginPage.d.ts +0 -33
  141. package/out/views/LoginPage.js +0 -200
  142. package/out/views/MainPage.d.ts +0 -81
  143. package/out/views/MainPage.js +0 -1784
  144. package/out/views/OAuthPage.d.ts +0 -7
  145. package/out/views/OAuthPage.js +0 -17
  146. package/out/views/SubscriptionPage.d.ts +0 -7
  147. package/out/views/SubscriptionPage.js +0 -26
  148. package/out/views/index.d.ts +0 -13
  149. package/out/views/index.js +0 -25
  150. package/out/views/layout/Head.d.ts +0 -9
  151. package/out/views/layout/Head.js +0 -54
@@ -1,29 +0,0 @@
1
- import { Config, UnauthorizedConfig } from '../types';
2
- export interface Cron {
3
- /**
4
- * Schedule a task to run on a cron expression
5
- * @param expression - Cron expression (e.g., '0 * * * *' for hourly)
6
- * @param task - Async task to execute
7
- */
8
- schedule(expression: string, task: () => Promise<void>): void;
9
- }
10
- /**
11
- * Default Node.js cron handler that uses node-cron
12
- */
13
- export declare class NodeCron implements Cron {
14
- private cron;
15
- private pendingSchedules;
16
- private initialized;
17
- constructor();
18
- schedule(expression: string, task: () => Promise<void>): void;
19
- }
20
- /**
21
- * Initialize the cron instance
22
- * @param config - Client configuration
23
- */
24
- export declare function initialize(config: Config | UnauthorizedConfig): void;
25
- /**
26
- * Get the initialized cron instance
27
- * @returns The cron instance
28
- */
29
- export declare function getCron(): Cron;
package/out/util/cron.js DELETED
@@ -1,87 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getCron = exports.initialize = exports.NodeCron = void 0;
27
- const logger_1 = require("./logger");
28
- /**
29
- * Default Node.js cron handler that uses node-cron
30
- */
31
- class NodeCron {
32
- constructor() {
33
- this.pendingSchedules = [];
34
- this.initialized = false;
35
- // Dynamically import node-cron
36
- Promise.resolve().then(() => __importStar(require('node-cron'))).then((nodeCron) => {
37
- this.cron = nodeCron.default || nodeCron;
38
- this.initialized = true;
39
- // Schedule all pending tasks
40
- this.pendingSchedules.forEach(({ expression, task }) => {
41
- this.cron.schedule(expression, task);
42
- });
43
- this.pendingSchedules = [];
44
- })
45
- .catch((error) => {
46
- console.error('Failed to load node-cron:', error);
47
- throw new Error('node-cron is required for the default cron. Please install it or provide a custom cron in config.');
48
- });
49
- }
50
- schedule(expression, task) {
51
- if (this.initialized && this.cron) {
52
- this.cron.schedule(expression, task);
53
- }
54
- else {
55
- // Queue the task until node-cron is loaded
56
- this.pendingSchedules.push({ expression, task });
57
- }
58
- }
59
- }
60
- exports.NodeCron = NodeCron;
61
- let cron;
62
- /**
63
- * Initialize the cron instance
64
- * @param config - Client configuration
65
- */
66
- function initialize(config) {
67
- if (config.cron) {
68
- (0, logger_1.log)('Using custom cron implementation');
69
- cron = config.cron;
70
- }
71
- else {
72
- (0, logger_1.log)('Using default NodeCron implementation');
73
- cron = new NodeCron();
74
- }
75
- }
76
- exports.initialize = initialize;
77
- /**
78
- * Get the initialized cron instance
79
- * @returns The cron instance
80
- */
81
- function getCron() {
82
- if (!cron) {
83
- throw new Error('Cron not initialized');
84
- }
85
- return cron;
86
- }
87
- exports.getCron = getCron;
@@ -1,6 +0,0 @@
1
- import type { FC } from 'react';
2
- /**
3
- * Renders a React component to HTML string
4
- * Uses React Server-Side Rendering (renderToStaticMarkup)
5
- */
6
- export declare function renderJSX<P = any>(Component: FC<P>, props: P): string;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.renderJSX = void 0;
4
- const server_1 = require("react-dom/server");
5
- /**
6
- * Renders a React component to HTML string
7
- * Uses React Server-Side Rendering (renderToStaticMarkup)
8
- */
9
- function renderJSX(Component, props) {
10
- const element = Component(props);
11
- return '<!DOCTYPE html>' + (0, server_1.renderToStaticMarkup)(element);
12
- }
13
- exports.renderJSX = renderJSX;
@@ -1,19 +0,0 @@
1
- /**
2
- * Static Files Abstraction Layer
3
- * Dual compatibility: Node.js (Express) + Cloudflare Workers (Assets Fetcher)
4
- */
5
- /// <reference types="serve-static" />
6
- import express, { Request, Response } from 'express';
7
- import { Config, UnauthorizedConfig } from '../types';
8
- /**
9
- * Serve static directory with dual compatibility
10
- * @param config - App configuration
11
- * @param staticPath - Path to static directory
12
- */
13
- export declare function serveStatic(config: Config | UnauthorizedConfig, staticPath: string): ((req: Request, res: Response, next: Function) => Promise<void>) | import("serve-static").RequestHandler<express.Response<any, Record<string, any>>>;
14
- /**
15
- * Serve single file (e.g., logo.png, icons/star.svg) with dual compatibility
16
- * @param config - App configuration
17
- * @param filePath - Path to file
18
- */
19
- export declare function serveFile(config: Config | UnauthorizedConfig, filePath: string): (req: Request, res: Response, next: Function) => Promise<void>;
@@ -1,87 +0,0 @@
1
- "use strict";
2
- /**
3
- * Static Files Abstraction Layer
4
- * Dual compatibility: Node.js (Express) + Cloudflare Workers (Assets Fetcher)
5
- */
6
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
7
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8
- return new (P || (P = Promise))(function (resolve, reject) {
9
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
10
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
11
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
12
- step((generator = generator.apply(thisArg, _arguments || [])).next());
13
- });
14
- };
15
- var __importDefault = (this && this.__importDefault) || function (mod) {
16
- return (mod && mod.__esModule) ? mod : { "default": mod };
17
- };
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.serveFile = exports.serveStatic = void 0;
20
- const express_1 = __importDefault(require("express"));
21
- const path_1 = __importDefault(require("path"));
22
- /**
23
- * Proxy Workers Assets response to Express response
24
- */
25
- function proxyAssetsResponse(fetcher, assetPath, baseUrl, req, res, next) {
26
- return __awaiter(this, void 0, void 0, function* () {
27
- try {
28
- if (assetPath === '/') {
29
- return next();
30
- }
31
- const assetUrl = new URL(assetPath, baseUrl);
32
- const response = yield fetcher.fetch(assetUrl.toString());
33
- if (!response.ok) {
34
- return next();
35
- }
36
- const body = yield response.arrayBuffer();
37
- const contentType = response.headers.get('content-type');
38
- if (contentType) {
39
- res.setHeader('Content-Type', contentType);
40
- }
41
- res.send(Buffer.from(body));
42
- }
43
- catch (err) {
44
- next(err);
45
- }
46
- });
47
- }
48
- /**
49
- * Serve static directory with dual compatibility
50
- * @param config - App configuration
51
- * @param staticPath - Path to static directory
52
- */
53
- function serveStatic(config, staticPath) {
54
- var _a;
55
- if ((_a = config.assetsConfig) === null || _a === void 0 ? void 0 : _a.fetcher) {
56
- const assetsFetcher = config.assetsConfig.fetcher;
57
- return (req, res, next) => __awaiter(this, void 0, void 0, function* () {
58
- const assetPath = `/${staticPath}/${req.path}`.replace(/\/+/g, '/');
59
- yield proxyAssetsResponse(assetsFetcher, assetPath, config.baseUrl, req, res, next);
60
- });
61
- }
62
- const rootDir = path_1.default.dirname(__dirname);
63
- const absolutePath = path_1.default.isAbsolute(staticPath) ? staticPath : path_1.default.join(rootDir, staticPath);
64
- return express_1.default.static(absolutePath);
65
- }
66
- exports.serveStatic = serveStatic;
67
- /**
68
- * Serve single file (e.g., logo.png, icons/star.svg) with dual compatibility
69
- * @param config - App configuration
70
- * @param filePath - Path to file
71
- */
72
- function serveFile(config, filePath) {
73
- return (req, res, next) => __awaiter(this, void 0, void 0, function* () {
74
- var _a;
75
- if ((_a = config.assetsConfig) === null || _a === void 0 ? void 0 : _a.fetcher) {
76
- const assetsFetcher = config.assetsConfig.fetcher;
77
- const assetPath = filePath.startsWith('/') ? filePath : `/${filePath}`;
78
- yield proxyAssetsResponse(assetsFetcher, assetPath, config.baseUrl, req, res, next);
79
- }
80
- else {
81
- const rootDir = path_1.default.dirname(__dirname);
82
- const absolutePath = path_1.default.isAbsolute(filePath) ? filePath : path_1.default.join(rootDir, filePath);
83
- res.sendFile(absolutePath);
84
- }
85
- });
86
- }
87
- exports.serveFile = serveFile;
@@ -1,10 +0,0 @@
1
- import { FC } from 'react';
2
- interface AboutPageProps {
3
- name: string;
4
- logo: string;
5
- manifest: string;
6
- storeLink?: string;
7
- showDebugLink?: boolean;
8
- }
9
- export declare const AboutPage: FC<AboutPageProps>;
10
- export {};
@@ -1,76 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.AboutPage = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const AboutPage = ({ name, logo, manifest, storeLink, showDebugLink }) => (react_1.default.createElement("html", null,
9
- react_1.default.createElement("head", null,
10
- react_1.default.createElement("title", null, name),
11
- react_1.default.createElement("meta", { charSet: "utf-8" }),
12
- react_1.default.createElement("meta", { httpEquiv: "Content-type", content: "text/html; charset=utf-8" }),
13
- react_1.default.createElement("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }),
14
- storeLink && react_1.default.createElement("link", { rel: "canonical", href: storeLink }),
15
- react_1.default.createElement("link", { rel: "stylesheet", href: "https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css", integrity: "sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH", crossOrigin: "anonymous" }),
16
- react_1.default.createElement("link", { href: "/assets/css/about.css", media: "screen", rel: "stylesheet", type: "text/css" })),
17
- react_1.default.createElement("body", null,
18
- react_1.default.createElement("header", { id: "header", className: "navbar navbar-expand-lg fixed-top crowdin-navbar" },
19
- react_1.default.createElement("a", { itemProp: "url", className: "navbar-brand crowdin-navbar__logo", href: "https://crowdin.com", title: "Crowdin \u2014 Localization Management Platform" },
20
- react_1.default.createElement("svg", { className: "d-none d-md-block d-lg-block default-logo", width: "180", height: "54", "aria-labelledby": "crowdinLogoTitle" },
21
- react_1.default.createElement("title", { id: "crowdinLogoTitle" }, "Crowdin"),
22
- react_1.default.createElement("image", { className: "d-none d-md-block d-lg-block", href: "/assets/img/crowdin.svg", width: "180", height: "54" })),
23
- react_1.default.createElement("svg", { className: "d-block d-md-none d-lg-none default-logo", width: "173", height: "32" },
24
- react_1.default.createElement("image", { className: "d-block d-md-none d-lg-none", href: "/assets/img/crowdin_small.svg", width: "173", height: "32" }))),
25
- react_1.default.createElement("div", { className: "flex-nowrap justify-content-lg-end ml-auto my-lg-0" },
26
- react_1.default.createElement("div", { className: "pr-0 ml-2 my-2" },
27
- react_1.default.createElement("span", { className: "crowdin-navbar__nav-link contact " },
28
- react_1.default.createElement("a", { title: "Contact", href: "https://crowdin.com/contacts" }, "Contact"))))),
29
- react_1.default.createElement("div", { className: "main" },
30
- react_1.default.createElement("div", { className: "container" },
31
- react_1.default.createElement("div", { className: "row crwd__product-template__header align-items-center" },
32
- react_1.default.createElement("div", { className: "offset-lg-1 col-lg-2 product-single__photo-wrapper crwd__product-single__photo-wrapper" },
33
- react_1.default.createElement("div", { className: "product-single__photo text-center mb-3 mb-lg-0" },
34
- react_1.default.createElement("div", { className: "image-holder" },
35
- react_1.default.createElement("img", { width: "200", src: logo, alt: name, id: "FeaturedImage-product-template", className: "img-fluid lazyloaded ls-is-cached product-featured-img", style: { position: 'unset' } })))),
36
- react_1.default.createElement("div", { className: " col-lg-8 crwd__product-template__header__title-container" },
37
- react_1.default.createElement("div", { className: "product-single__meta" },
38
- react_1.default.createElement("div", { className: "section-header" },
39
- react_1.default.createElement("h1", { className: "product-single__title text-center text-lg-left" },
40
- react_1.default.createElement("span", null, name)),
41
- react_1.default.createElement("div", { className: "description" },
42
- name,
43
- " extends the default functionality available in Crowdin and Crowdin Enterprise by providing additional capabilities to enhance your localization workflows."))))),
44
- react_1.default.createElement("div", { className: "row" },
45
- react_1.default.createElement("div", { className: "offset-lg-1 col-lg-10" },
46
- react_1.default.createElement("p", null, "To install this app, you can use either of the following methods: "),
47
- react_1.default.createElement("ol", null,
48
- react_1.default.createElement("li", null,
49
- "Install it directly from the",
50
- ' ',
51
- react_1.default.createElement("a", { href: "https://store.crowdin.com/", target: "_blank" }, "Crowdin Store"),
52
- ", if available."),
53
- react_1.default.createElement("li", null, "Install it manually using the manifest URL below.")),
54
- react_1.default.createElement("p", null,
55
- "For detailed steps, follow the",
56
- ' ',
57
- react_1.default.createElement("a", { href: "https://support.crowdin.com/developer/crowdin-apps-installation/", target: "_blank" }, "App Installation")),
58
- react_1.default.createElement("div", { className: "mb-3" },
59
- react_1.default.createElement("label", { htmlFor: "manifest-url", className: "form-label" }, "Paste the following manifest URL when prompted during manual installation:"),
60
- react_1.default.createElement("div", { className: "input-group" },
61
- react_1.default.createElement("input", { type: "text", className: "form-control", id: "manifest-url", value: manifest, readOnly: true }))),
62
- storeLink && (react_1.default.createElement("div", null,
63
- "Read more about",
64
- ' ',
65
- react_1.default.createElement("a", { href: storeLink, target: "_blank", title: `${name} on Crowdin Store` }, name),
66
- ".")),
67
- showDebugLink && (react_1.default.createElement("div", { className: "mt-4 pt-3 border-top" },
68
- react_1.default.createElement("p", { className: "mb-2" },
69
- react_1.default.createElement("strong", null, "Developer Tools")),
70
- react_1.default.createElement("p", null,
71
- "Access the",
72
- ' ',
73
- react_1.default.createElement("a", { href: "/__debug", target: "_blank", title: "Open developer console in a new tab" }, "Developer Console"),
74
- ' ',
75
- "to inspect requests, debug issues, and monitor application behavior."))))))))));
76
- exports.AboutPage = AboutPage;
@@ -1,18 +0,0 @@
1
- import { FC } from 'react';
2
- interface Owner {
3
- id: number;
4
- name: string;
5
- }
6
- interface ErrorPageProps {
7
- message: string;
8
- name?: string;
9
- owners?: Owner[] | null;
10
- hideActions?: boolean;
11
- sentryData?: {
12
- dsn: string;
13
- appIdentifier: string;
14
- };
15
- code?: number;
16
- }
17
- export declare const ErrorPage: FC<ErrorPageProps>;
18
- export {};
@@ -1,56 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ErrorPage = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const Head_1 = require("./layout/Head");
9
- const ErrorPage = ({ message, name, owners, hideActions, sentryData }) => (react_1.default.createElement("html", { lang: "en" },
10
- react_1.default.createElement(Head_1.Head, { sentryData: sentryData }),
11
- react_1.default.createElement("body", null,
12
- react_1.default.createElement("div", { className: "i_w" },
13
- react_1.default.createElement("div", { className: "error-page" },
14
- react_1.default.createElement("div", null,
15
- react_1.default.createElement("div", { className: "error-page-message" },
16
- react_1.default.createElement("crowdin-h3", null, message),
17
- owners && (react_1.default.createElement(react_1.default.Fragment, null,
18
- react_1.default.createElement("crowdin-p", null, "This integration allows only one connection per project to ensure consistent configuration and prevent file import or synchronization issues."),
19
- owners.length > 1 ? (react_1.default.createElement(react_1.default.Fragment, null,
20
- react_1.default.createElement("crowdin-p", { className: "mt-2" }, "Managed by:"),
21
- react_1.default.createElement("ul", null, owners.map((owner) => (react_1.default.createElement("li", null,
22
- react_1.default.createElement("crowdin-a", { href: "#", onclick: `contactUser(${owner.id})` }, owner.name))))),
23
- react_1.default.createElement("crowdin-p", { className: "mt-2" }, "To request access, please contact one of the project members listed above."))) : (react_1.default.createElement(react_1.default.Fragment, null,
24
- react_1.default.createElement("crowdin-p", { className: "mt-2" },
25
- "Managed by:",
26
- ' ',
27
- react_1.default.createElement("crowdin-a", { href: "#", onclick: `contactUser(${owners[0].id})` }, owners[0].name)),
28
- react_1.default.createElement("crowdin-p", { className: "mt-2" }, "To request access, please contact the project member listed above.")))))),
29
- !hideActions && (react_1.default.createElement("div", { className: "error-page-action" },
30
- react_1.default.createElement("crowdin-button", { outlined: true, onclick: "integrationLogout()" }, "Log out"),
31
- react_1.default.createElement("span", null,
32
- ' ',
33
- "or",
34
- ' ',
35
- react_1.default.createElement("crowdin-a", { href: "https://crowdin.com/contacts", target: "_blank" }, "contact us"),
36
- ' ',
37
- "for help")))))),
38
- react_1.default.createElement("script", { dangerouslySetInnerHTML: {
39
- __html: `
40
- function integrationLogout() {
41
- checkOrigin()
42
- .then(queryParams => fetch(\`api/logout\${queryParams}\`, { method: 'POST' }))
43
- .then(checkResponse)
44
- .then(reloadLocation)
45
- .then(localStorage.removeItem('revised_${name}'))
46
- .catch(e => catchRejection(e, 'Looks like you are not logged in'));
47
- }
48
-
49
- function contactUser(userId) {
50
- AP.getContext(function(context) {
51
- AP.redirect(\`\${context.organization_id ? '/u' : ''}/messages/create/\${userId}\`);
52
- });
53
- }
54
- `,
55
- } }))));
56
- exports.ErrorPage = ErrorPage;
@@ -1,14 +0,0 @@
1
- import { FC } from 'react';
2
- interface FormPageProps {
3
- formGetDataUrl: string;
4
- formPostDataUrl: string;
5
- formPatchDataUrl?: string;
6
- formSchema: string;
7
- formUiSchema: string;
8
- sentryData?: {
9
- dsn: string;
10
- appIdentifier: string;
11
- };
12
- }
13
- export declare const FormPage: FC<FormPageProps>;
14
- export {};
@@ -1,28 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.FormPage = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const Head_1 = require("./layout/Head");
9
- const FormPage = ({ formGetDataUrl, formPostDataUrl, formPatchDataUrl, formSchema, formUiSchema, sentryData }) => (react_1.default.createElement("html", { lang: "en" },
10
- react_1.default.createElement(Head_1.Head, { sentryData: sentryData }),
11
- react_1.default.createElement("body", null,
12
- react_1.default.createElement("div", { className: "i_w", style: { maxWidth: '680px', position: 'relative' } },
13
- react_1.default.createElement("crowdin-card", { id: "card", "is-shadowed": true },
14
- react_1.default.createElement("div", { id: "form" }),
15
- react_1.default.createElement("div", { id: "form-loading" },
16
- react_1.default.createElement("crowdin-progress-indicator", null)))),
17
- react_1.default.createElement("crowdin-toasts", null),
18
- react_1.default.createElement("script", { dangerouslySetInnerHTML: {
19
- __html: `
20
- var formGetDataUrl = '${formGetDataUrl}';
21
- var formPostDataUrl = '${formPostDataUrl}';
22
- var formPatchDataUrl = '${formPatchDataUrl}';
23
- var formSchema = ${formSchema};
24
- var formUiSchema = ${formUiSchema};
25
- `,
26
- } }),
27
- react_1.default.createElement("script", { src: "/assets/js/form.js" }))));
28
- exports.FormPage = FormPage;
@@ -1,10 +0,0 @@
1
- import { FC } from 'react';
2
- interface InstallPageProps {
3
- name: string;
4
- sentryData?: {
5
- dsn: string;
6
- appIdentifier: string;
7
- };
8
- }
9
- export declare const InstallPage: FC<InstallPageProps>;
10
- export {};
@@ -1,22 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.InstallPage = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const Head_1 = require("./layout/Head");
9
- const InstallPage = ({ name, sentryData }) => (react_1.default.createElement("html", { lang: "en" },
10
- react_1.default.createElement(Head_1.Head, { sentryData: sentryData }),
11
- react_1.default.createElement("body", null,
12
- react_1.default.createElement("div", { className: "i_w center" },
13
- react_1.default.createElement("div", null,
14
- react_1.default.createElement("h1", null,
15
- "Looks like ",
16
- name,
17
- " is not installed yet!"),
18
- react_1.default.createElement("p", null,
19
- "Contact your organization administrator to install it. More info on",
20
- ' ',
21
- react_1.default.createElement("a", { href: "https://support.crowdin.com" }, "Link to how to install")))))));
22
- exports.InstallPage = InstallPage;
@@ -1,33 +0,0 @@
1
- import { FC } from 'react';
2
- interface LoginField {
3
- key?: string;
4
- label?: string;
5
- labelHtml?: string;
6
- helpText?: string;
7
- helpTextHtml?: string;
8
- type?: string;
9
- defaultValue?: any;
10
- dependencySettings?: string;
11
- isMulti?: boolean;
12
- isSearchable?: boolean;
13
- options?: Array<{
14
- value: string;
15
- label: string;
16
- }>;
17
- noticeType?: string;
18
- noIcon?: boolean;
19
- accept?: string;
20
- }
21
- interface LoginPageProps {
22
- name: string;
23
- loginFields: LoginField[];
24
- oauthLogin?: boolean;
25
- oauthUrl?: string;
26
- oauthMode?: string;
27
- sentryData?: {
28
- dsn: string;
29
- appIdentifier: string;
30
- };
31
- }
32
- export declare const LoginPage: FC<LoginPageProps>;
33
- export {};