@translationstudio/translationstudio-strapi-extension 1.1.0 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/_chunks/{App-jiozoQyG.mjs → App-Cq1SRR-L.mjs} +148 -82
- package/dist/_chunks/{App-rdXR_woe.js → App-DkdbSZwI.js} +146 -80
- package/dist/admin/index.js +7 -13
- package/dist/admin/index.mjs +7 -13
- package/dist/server/index.js +330 -220
- package/dist/server/index.mjs +330 -220
- package/dist/server/src/controllers/controller.d.ts +2 -0
- package/dist/server/src/controllers/index.d.ts +2 -0
- package/dist/server/src/index.d.ts +5 -0
- package/dist/server/src/services/functions/exportData/jsonToHtml.d.ts +6 -2
- package/dist/server/src/services/functions/importData/htmlToJson.d.ts +1 -2
- package/dist/server/src/services/functions/importData/parseInlineElements.d.ts +21 -1
- package/dist/server/src/services/functions/importData/processComponentFields.d.ts +1 -1
- package/dist/server/src/services/functions/importData/updateEntry.d.ts +1 -1
- package/dist/server/src/services/index.d.ts +3 -0
- package/dist/server/src/services/service.d.ts +5 -2
- package/package.json +5 -5
|
@@ -10,6 +10,8 @@ declare const controller: ({ strapi }: {
|
|
|
10
10
|
getLanguageOptions(ctx: any): Promise<void>;
|
|
11
11
|
requestTranslation(ctx: any): Promise<void>;
|
|
12
12
|
exportData(ctx: any): Promise<void>;
|
|
13
|
+
setDevelopmentUrl(ctx: any): Promise<void>;
|
|
14
|
+
getDevelopmentUrl(ctx: any): Promise<void>;
|
|
13
15
|
importData(ctx: any): Promise<void>;
|
|
14
16
|
ping(ctx: any): Promise<void>;
|
|
15
17
|
getLanguages(ctx: any): Promise<void>;
|
|
@@ -10,6 +10,8 @@ declare const _default: {
|
|
|
10
10
|
getLanguageOptions(ctx: any): Promise<void>;
|
|
11
11
|
requestTranslation(ctx: any): Promise<void>;
|
|
12
12
|
exportData(ctx: any): Promise<void>;
|
|
13
|
+
setDevelopmentUrl(ctx: any): Promise<void>;
|
|
14
|
+
getDevelopmentUrl(ctx: any): Promise<void>;
|
|
13
15
|
importData(ctx: any): Promise<void>;
|
|
14
16
|
ping(ctx: any): Promise<void>;
|
|
15
17
|
getLanguages(ctx: any): Promise<void>;
|
|
@@ -24,6 +24,8 @@ declare const _default: {
|
|
|
24
24
|
getLanguageOptions(ctx: any): Promise<void>;
|
|
25
25
|
requestTranslation(ctx: any): Promise<void>;
|
|
26
26
|
exportData(ctx: any): Promise<void>;
|
|
27
|
+
setDevelopmentUrl(ctx: any): Promise<void>;
|
|
28
|
+
getDevelopmentUrl(ctx: any): Promise<void>;
|
|
27
29
|
importData(ctx: any): Promise<void>;
|
|
28
30
|
ping(ctx: any): Promise<void>;
|
|
29
31
|
getLanguages(ctx: any): Promise<void>;
|
|
@@ -55,9 +57,12 @@ declare const _default: {
|
|
|
55
57
|
getLicense(): Promise<{
|
|
56
58
|
license: unknown;
|
|
57
59
|
}>;
|
|
60
|
+
getTranslationstudioUrl(): Promise<string>;
|
|
58
61
|
setLicense(license: string): Promise<{
|
|
59
62
|
success: boolean;
|
|
60
63
|
}>;
|
|
64
|
+
setDevelopmentUrl(url: string): Promise<boolean>;
|
|
65
|
+
getDevelopmentUrl(): Promise<string>;
|
|
61
66
|
getToken(): Promise<{
|
|
62
67
|
token: unknown;
|
|
63
68
|
}>;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Converts a richtext JSON structure to HTML
|
|
3
|
+
* @param {any} json - The JSON representation of richtext content
|
|
4
|
+
* @returns {string} - The converted HTML string
|
|
5
|
+
*/
|
|
6
|
+
export default function jsonToHtml(json: any): string;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default htmlToJson;
|
|
1
|
+
export default function htmlToJson(html: string): any[];
|
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Parses HTML and markdown-formatted text into a structured format for richtext fields
|
|
3
|
+
* @param {string} text - The HTML/markdown text to parse
|
|
4
|
+
* @returns {ContentNode[]} - Array of structured text elements
|
|
5
|
+
*/
|
|
6
|
+
interface TextNode {
|
|
7
|
+
type: 'text';
|
|
8
|
+
text: string;
|
|
9
|
+
bold?: boolean;
|
|
10
|
+
italic?: boolean;
|
|
11
|
+
underline?: boolean;
|
|
12
|
+
code?: boolean;
|
|
13
|
+
strikethrough?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface LinkNode {
|
|
16
|
+
type: 'link';
|
|
17
|
+
url: string;
|
|
18
|
+
children: TextNode[];
|
|
19
|
+
}
|
|
20
|
+
type ContentNode = TextNode | LinkNode;
|
|
21
|
+
declare function parseInlineElements(text: string): ContentNode[];
|
|
2
22
|
export default parseInlineElements;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TranslationstudioTranslatable } from
|
|
1
|
+
import { TranslationstudioTranslatable } from '../../../../../Types';
|
|
2
2
|
export declare function processComponentFields(componentFieldsMap: Map<string, TranslationstudioTranslatable[]>, acc: Record<string, any>, existingEntry: any, targetSchema: any): Record<string, any>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare function updateEntry(contentTypeID: string, entryID: string, sourceLocale: string, targetLocale: string, data: Record<string, any>, attributes: Record<string, any>): Promise<void>;
|
|
2
|
-
export declare function processDataRecursively(data: any): any;
|
|
2
|
+
export declare function processDataRecursively(data: any, schema?: any): any;
|
|
@@ -5,9 +5,12 @@ declare const _default: {
|
|
|
5
5
|
getLicense(): Promise<{
|
|
6
6
|
license: unknown;
|
|
7
7
|
}>;
|
|
8
|
+
getTranslationstudioUrl(): Promise<string>;
|
|
8
9
|
setLicense(license: string): Promise<{
|
|
9
10
|
success: boolean;
|
|
10
11
|
}>;
|
|
12
|
+
setDevelopmentUrl(url: string): Promise<boolean>;
|
|
13
|
+
getDevelopmentUrl(): Promise<string>;
|
|
11
14
|
getToken(): Promise<{
|
|
12
15
|
token: unknown;
|
|
13
16
|
}>;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import type { Core } from
|
|
2
|
-
import type { ExportPayload, ImportPayload, LocaleMap, TranslationRequest } from
|
|
1
|
+
import type { Core } from '@strapi/strapi';
|
|
2
|
+
import type { ExportPayload, ImportPayload, LocaleMap, TranslationRequest } from '../../../Types';
|
|
3
3
|
declare const service: ({ strapi }: {
|
|
4
4
|
strapi: Core.Strapi;
|
|
5
5
|
}) => {
|
|
6
6
|
getLicense(): Promise<{
|
|
7
7
|
license: unknown;
|
|
8
8
|
}>;
|
|
9
|
+
getTranslationstudioUrl(): Promise<string>;
|
|
9
10
|
setLicense(license: string): Promise<{
|
|
10
11
|
success: boolean;
|
|
11
12
|
}>;
|
|
13
|
+
setDevelopmentUrl(url: string): Promise<boolean>;
|
|
14
|
+
getDevelopmentUrl(): Promise<string>;
|
|
12
15
|
getToken(): Promise<{
|
|
13
16
|
token: unknown;
|
|
14
17
|
}>;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"license": "GPL-2.0-only",
|
|
5
5
|
"author": "Duncan Leininger <duncan.leininger@idmedia.com>",
|
|
6
6
|
"homepage": "https://translationstudio.tech",
|
|
7
|
-
"version": "1.1.
|
|
7
|
+
"version": "1.1.3",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"translationstudio",
|
|
10
10
|
"strapi",
|
|
@@ -49,17 +49,17 @@
|
|
|
49
49
|
"react-intl": "^7.1.10"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@strapi/strapi": "^5.12.4",
|
|
53
52
|
"@strapi/sdk-plugin": "^5.3.2",
|
|
54
|
-
"
|
|
53
|
+
"@strapi/strapi": "^5.12.4",
|
|
54
|
+
"@strapi/typescript-utils": "^5.5.0",
|
|
55
55
|
"@types/react": "^18.3.1",
|
|
56
56
|
"@types/react-dom": "^18.3.1",
|
|
57
|
-
"
|
|
57
|
+
"prettier": "^3.4.2",
|
|
58
58
|
"typescript": "^5.7.2"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@strapi/strapi": "^5.5.0",
|
|
62
61
|
"@strapi/sdk-plugin": "^5.2.7",
|
|
62
|
+
"@strapi/strapi": "^5.5.0",
|
|
63
63
|
"react": "^18.3.1",
|
|
64
64
|
"react-dom": "^18.3.1",
|
|
65
65
|
"react-router-dom": "^6.28.0",
|