complexqa_frontend_core 1.21.7 → 1.22.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.
- package/package.json +1 -1
- package/publish/api/file_app_api.js +30 -3
- package/publish/api/index.js +6 -0
- package/publish/api/project_api.js +31 -8
- package/publish/api/public_text_document_api.js +59 -0
- package/publish/api/text_document_api.js +230 -0
- package/publish/api/text_document_folder_api.js +16 -0
- package/publish/app_configuration/table/helpers/table_element_models.js +2 -0
- package/publish/app_configuration/table/sections/text_document.js +31 -0
- package/publish/app_configuration/table/table_configuration.js +2 -0
- package/publish/app_configuration/text_document_editor_config.js +27 -0
- package/publish/constants/text_document_limits.js +12 -0
- package/publish/index.js +11 -0
- package/publish/services/FileAppService.js +103 -10
- package/publish/types/core/0_familyGeneralElement.js +2 -2
- package/publish/types/element_translate/_familyUtil.i18n.js +302 -68
- package/publish/types/element_translate/typeTextDocument.i18n.js +201 -0
- package/publish/types/element_translate/typeTextDocumentFolder.i18n.js +108 -0
- package/publish/types/element_translate/typeUtilExecution.i18n.js +171 -0
- package/publish/types/element_translate/typeUtilExecutionScreenshotMulti.i18n.js +281 -65
- package/publish/types/family_elements/typeProject.js +35 -10
- package/publish/types/family_files/typeFile.js +2 -0
- package/publish/types/family_files/typeTextDocument.js +88 -0
- package/publish/types/family_files/typeTextDocumentFolder.js +68 -0
- package/publish/types/family_utils/typeUtilExecution.js +14 -3
- package/publish/utils/text_document_image.js +84 -0
package/package.json
CHANGED
|
@@ -26,7 +26,7 @@ export class FileAppApi extends ApiAbstractClass
|
|
|
26
26
|
const url = `/${ this.api_prefix }/${ this.module_prefix }/issue_access_token`;
|
|
27
27
|
payload = this.handle_request_payload(payload);
|
|
28
28
|
let response = this.api_request(url, payload);
|
|
29
|
-
response = this.handle_response(response, false);
|
|
29
|
+
response = await this.handle_response(response, false);
|
|
30
30
|
|
|
31
31
|
return {
|
|
32
32
|
response: response,
|
|
@@ -51,7 +51,34 @@ export class FileAppApi extends ApiAbstractClass
|
|
|
51
51
|
|
|
52
52
|
payload = this.handle_request_payload(payload);
|
|
53
53
|
let response = this.api_request(url, payload);
|
|
54
|
-
response = this.handle_response(response, false);
|
|
54
|
+
response = await this.handle_response(response, false);
|
|
55
|
+
|
|
56
|
+
this.method = prev_method;
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
response: response,
|
|
60
|
+
payload : payload,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* GET|POST /web_api/file_app/file_access_urls?file_uuids[]=&disposition=
|
|
67
|
+
*
|
|
68
|
+
* @param {object} payload
|
|
69
|
+
*
|
|
70
|
+
* @returns {Promise<{payload: object, response: object}>}
|
|
71
|
+
*/
|
|
72
|
+
async file_access_urls(payload)
|
|
73
|
+
{
|
|
74
|
+
const url = `/${ this.api_prefix }/${ this.module_prefix }/file_access_urls`;
|
|
75
|
+
const prev_method = this.method;
|
|
76
|
+
|
|
77
|
+
this.method = 'get';
|
|
78
|
+
|
|
79
|
+
payload = this.handle_request_payload(payload);
|
|
80
|
+
let response = this.api_request(url, payload);
|
|
81
|
+
response = await this.handle_response(response, false);
|
|
55
82
|
|
|
56
83
|
this.method = prev_method;
|
|
57
84
|
|
|
@@ -78,7 +105,7 @@ export class FileAppApi extends ApiAbstractClass
|
|
|
78
105
|
|
|
79
106
|
payload = this.handle_request_payload(payload);
|
|
80
107
|
let response = this.api_request(url, payload);
|
|
81
|
-
response = this.handle_response(response, false);
|
|
108
|
+
response = await this.handle_response(response, false);
|
|
82
109
|
|
|
83
110
|
this.method = prev_method;
|
|
84
111
|
|
package/publish/api/index.js
CHANGED
|
@@ -22,6 +22,9 @@ import { ContextOsApi } from "./context/context_os_api.js";
|
|
|
22
22
|
import { ContextScreenResolutionApi } from "./context/context_screen_resolution_api.js";
|
|
23
23
|
import { BrowserToolsUtilExecutionApi } from "./util/browser_tools_util_execution_api.js";
|
|
24
24
|
import { BrowserToolsScreenshotMultiApi } from "./util/browser_tools_screenshot_multi_api.js";
|
|
25
|
+
import { TextDocumentApi } from "./text_document_api.js";
|
|
26
|
+
import { PublicTextDocumentApi } from "./public_text_document_api.js";
|
|
27
|
+
import { TextDocumentFolderApi } from "./text_document_folder_api.js";
|
|
25
28
|
import { FileAppApi } from "./file_app_api.js";
|
|
26
29
|
|
|
27
30
|
/**
|
|
@@ -163,6 +166,9 @@ export class Api
|
|
|
163
166
|
this.browser_tools_util_execution = new BrowserToolsUtilExecutionApi(payload);
|
|
164
167
|
this.browser_tools_screenshot_multi = new BrowserToolsScreenshotMultiApi(payload);
|
|
165
168
|
this.file_app = new FileAppApi(payload);
|
|
169
|
+
this.text_document = new TextDocumentApi(payload);
|
|
170
|
+
this.text_document_folder = new TextDocumentFolderApi(payload);
|
|
171
|
+
this.public_text_document = new PublicTextDocumentApi(payload);
|
|
166
172
|
|
|
167
173
|
this.reference = this.bootstrap_reference(payload)
|
|
168
174
|
}
|
|
@@ -20,16 +20,12 @@ export class ProjectApi extends ApiAbstractElementClass
|
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* @
|
|
26
|
-
* @param payload
|
|
27
|
-
* @todo - валидация входящих параметров
|
|
23
|
+
* @param {string} url
|
|
24
|
+
* @param {object} payload
|
|
25
|
+
* @returns {Promise<{response: *, payload: *}>}
|
|
28
26
|
*/
|
|
29
|
-
async
|
|
27
|
+
async _get_project_structure(url, payload)
|
|
30
28
|
{
|
|
31
|
-
let url = `/web_api/project/get/test_structure`;
|
|
32
|
-
|
|
33
29
|
payload = this.handle_request_payload(payload);
|
|
34
30
|
let response = this.api_request(url, payload);
|
|
35
31
|
response = this.handle_response(response, false);
|
|
@@ -39,4 +35,31 @@ export class ProjectApi extends ApiAbstractElementClass
|
|
|
39
35
|
payload : payload
|
|
40
36
|
};
|
|
41
37
|
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* All test cases + suites
|
|
43
|
+
*
|
|
44
|
+
* @version v.1.1 (04/02/2026)
|
|
45
|
+
* @param payload
|
|
46
|
+
* @todo - валидация входящих параметров
|
|
47
|
+
*/
|
|
48
|
+
async get_test_structure(payload)
|
|
49
|
+
{
|
|
50
|
+
return this._get_project_structure('/web_api/project/get/test_structure', payload);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* All text documents + folders
|
|
57
|
+
*
|
|
58
|
+
* @version v.1.0 (04/07/2026)
|
|
59
|
+
* @param payload
|
|
60
|
+
*/
|
|
61
|
+
async get_text_document_structure(payload)
|
|
62
|
+
{
|
|
63
|
+
return this._get_project_structure('/web_api/project/get/text_document_structure', payload);
|
|
64
|
+
}
|
|
42
65
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ApiAbstractClass } from "./api_abstract_class.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Guest public text document view API.
|
|
5
|
+
*
|
|
6
|
+
* @version v.1.0 (04/07/2026)
|
|
7
|
+
*/
|
|
8
|
+
export class PublicTextDocumentApi extends ApiAbstractClass
|
|
9
|
+
{
|
|
10
|
+
module_prefix = 'public/text_document';
|
|
11
|
+
api_prefix = 'web_api';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* GET|POST /web_api/public/text_document/view
|
|
16
|
+
*
|
|
17
|
+
* @param {object} payload token, password?
|
|
18
|
+
* @returns {Promise<{payload: object, response: object}>}
|
|
19
|
+
*/
|
|
20
|
+
async view(payload)
|
|
21
|
+
{
|
|
22
|
+
const url = `/${ this.api_prefix }/${ this.module_prefix }/view`;
|
|
23
|
+
const prev_method = this.method;
|
|
24
|
+
|
|
25
|
+
this.method = 'get';
|
|
26
|
+
|
|
27
|
+
payload = this.handle_request_payload(payload);
|
|
28
|
+
let response = this.api_request(url, payload);
|
|
29
|
+
response = await this.handle_response(response, false);
|
|
30
|
+
|
|
31
|
+
this.method = prev_method;
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
response: response,
|
|
35
|
+
payload : payload,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* POST /web_api/public/text_document/report
|
|
42
|
+
*
|
|
43
|
+
* @param {object} payload token, reason, reporter_email, password?
|
|
44
|
+
* @returns {Promise<{payload: object, response: object}>}
|
|
45
|
+
*/
|
|
46
|
+
async report(payload)
|
|
47
|
+
{
|
|
48
|
+
const url = `/${ this.api_prefix }/${ this.module_prefix }/report`;
|
|
49
|
+
|
|
50
|
+
payload = this.handle_request_payload(payload);
|
|
51
|
+
let response = this.api_request(url, payload);
|
|
52
|
+
response = await this.handle_response(response, false);
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
response: response,
|
|
56
|
+
payload : payload,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { ApiAbstractElementClass } from "./api_abstract_element_class.js";
|
|
2
|
+
import { typeTextDocument } from "../types/family_files/typeTextDocument.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @version v.1.0 (04/07/2026)
|
|
6
|
+
*/
|
|
7
|
+
export class TextDocumentApi extends ApiAbstractElementClass
|
|
8
|
+
{
|
|
9
|
+
module_prefix = 'text_document';
|
|
10
|
+
|
|
11
|
+
constructor(options)
|
|
12
|
+
{
|
|
13
|
+
super(options);
|
|
14
|
+
this.set_element_class_instance(typeTextDocument);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* GET /web_api/text_document/list_project_images?project_id=
|
|
20
|
+
*
|
|
21
|
+
* @param {object} payload
|
|
22
|
+
* @returns {Promise<{payload: object, response: object}>}
|
|
23
|
+
*/
|
|
24
|
+
async list_project_images(payload)
|
|
25
|
+
{
|
|
26
|
+
const url = `/${ this.api_prefix }/${ this.module_prefix }/list_project_images`;
|
|
27
|
+
const prev_method = this.method;
|
|
28
|
+
|
|
29
|
+
this.method = 'get';
|
|
30
|
+
|
|
31
|
+
payload = this.handle_request_payload(payload);
|
|
32
|
+
let response = this.api_request(url, payload);
|
|
33
|
+
response = await this.handle_response(response, false);
|
|
34
|
+
|
|
35
|
+
this.method = prev_method;
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
response: response,
|
|
39
|
+
payload : payload,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* GET /web_api/text_document/load_body?text_document_id=
|
|
46
|
+
*
|
|
47
|
+
* @param {object} payload
|
|
48
|
+
* @returns {Promise<{payload: object, response: object}>}
|
|
49
|
+
*/
|
|
50
|
+
async load_body(payload)
|
|
51
|
+
{
|
|
52
|
+
const url = `/${ this.api_prefix }/${ this.module_prefix }/load_body`;
|
|
53
|
+
const prev_method = this.method;
|
|
54
|
+
|
|
55
|
+
this.method = 'get';
|
|
56
|
+
|
|
57
|
+
payload = this.handle_request_payload(payload);
|
|
58
|
+
let response = this.api_request(url, payload);
|
|
59
|
+
response = await this.handle_response(response, false);
|
|
60
|
+
|
|
61
|
+
this.method = prev_method;
|
|
62
|
+
|
|
63
|
+
return {
|
|
64
|
+
response: response,
|
|
65
|
+
payload : payload,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* GET /web_api/text_document/list_versions?text_document_id=
|
|
72
|
+
*
|
|
73
|
+
* @param {object} payload
|
|
74
|
+
* @returns {Promise<{payload: object, response: object}>}
|
|
75
|
+
*/
|
|
76
|
+
async list_versions(payload)
|
|
77
|
+
{
|
|
78
|
+
const url = `/${ this.api_prefix }/${ this.module_prefix }/list_versions`;
|
|
79
|
+
const prev_method = this.method;
|
|
80
|
+
|
|
81
|
+
this.method = 'get';
|
|
82
|
+
|
|
83
|
+
payload = this.handle_request_payload(payload);
|
|
84
|
+
let response = this.api_request(url, payload);
|
|
85
|
+
response = await this.handle_response(response, false);
|
|
86
|
+
|
|
87
|
+
this.method = prev_method;
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
response: response,
|
|
91
|
+
payload : payload,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* POST /web_api/text_document/restore_version
|
|
98
|
+
*
|
|
99
|
+
* @param {object} payload
|
|
100
|
+
* @returns {Promise<{payload: object, response: object}>}
|
|
101
|
+
*/
|
|
102
|
+
async restore_version(payload)
|
|
103
|
+
{
|
|
104
|
+
const url = `/${ this.api_prefix }/${ this.module_prefix }/restore_version`;
|
|
105
|
+
|
|
106
|
+
payload = this.handle_request_payload(payload);
|
|
107
|
+
let response = this.api_request(url, payload);
|
|
108
|
+
response = await this.handle_response(response, false);
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
response: response,
|
|
112
|
+
payload : payload,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* POST /web_api/text_document/enforce_version_retention
|
|
119
|
+
*
|
|
120
|
+
* @param {object} payload
|
|
121
|
+
* @returns {Promise<{payload: object, response: object}>}
|
|
122
|
+
*/
|
|
123
|
+
async enforce_version_retention(payload)
|
|
124
|
+
{
|
|
125
|
+
const url = `/${ this.api_prefix }/${ this.module_prefix }/enforce_version_retention`;
|
|
126
|
+
|
|
127
|
+
payload = this.handle_request_payload(payload);
|
|
128
|
+
let response = this.api_request(url, payload);
|
|
129
|
+
response = await this.handle_response(response, false);
|
|
130
|
+
|
|
131
|
+
return {
|
|
132
|
+
response: response,
|
|
133
|
+
payload : payload,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* GET /web_api/text_document/public_share_status?text_document_id=
|
|
140
|
+
*
|
|
141
|
+
* @param {object} payload
|
|
142
|
+
* @returns {Promise<{payload: object, response: object}>}
|
|
143
|
+
*/
|
|
144
|
+
async public_share_status(payload)
|
|
145
|
+
{
|
|
146
|
+
const url = `/${ this.api_prefix }/${ this.module_prefix }/public_share_status`;
|
|
147
|
+
const prev_method = this.method;
|
|
148
|
+
|
|
149
|
+
this.method = 'get';
|
|
150
|
+
|
|
151
|
+
payload = this.handle_request_payload(payload);
|
|
152
|
+
let response = this.api_request(url, payload);
|
|
153
|
+
response = await this.handle_response(response, false);
|
|
154
|
+
|
|
155
|
+
this.method = prev_method;
|
|
156
|
+
|
|
157
|
+
return {
|
|
158
|
+
response: response,
|
|
159
|
+
payload : payload,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* POST /web_api/text_document/create_public_share
|
|
166
|
+
*
|
|
167
|
+
* @param {object} payload
|
|
168
|
+
* @returns {Promise<{payload: object, response: object}>}
|
|
169
|
+
*/
|
|
170
|
+
async create_public_share(payload)
|
|
171
|
+
{
|
|
172
|
+
const url = `/${ this.api_prefix }/${ this.module_prefix }/create_public_share`;
|
|
173
|
+
|
|
174
|
+
payload = this.handle_request_payload(payload);
|
|
175
|
+
let response = this.api_request(url, payload);
|
|
176
|
+
response = await this.handle_response(response, false);
|
|
177
|
+
|
|
178
|
+
return {
|
|
179
|
+
response: response,
|
|
180
|
+
payload : payload,
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* POST /web_api/text_document/revoke_public_share
|
|
187
|
+
*
|
|
188
|
+
* @param {object} payload
|
|
189
|
+
* @returns {Promise<{payload: object, response: object}>}
|
|
190
|
+
*/
|
|
191
|
+
async revoke_public_share(payload)
|
|
192
|
+
{
|
|
193
|
+
const url = `/${ this.api_prefix }/${ this.module_prefix }/revoke_public_share`;
|
|
194
|
+
|
|
195
|
+
payload = this.handle_request_payload(payload);
|
|
196
|
+
let response = this.api_request(url, payload);
|
|
197
|
+
response = await this.handle_response(response, false);
|
|
198
|
+
|
|
199
|
+
return {
|
|
200
|
+
response: response,
|
|
201
|
+
payload : payload,
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* GET /web_api/text_document/public_share_analytics?text_document_id=
|
|
208
|
+
*
|
|
209
|
+
* @param {object} payload
|
|
210
|
+
* @returns {Promise<{payload: object, response: object}>}
|
|
211
|
+
*/
|
|
212
|
+
async public_share_analytics(payload)
|
|
213
|
+
{
|
|
214
|
+
const url = `/${ this.api_prefix }/${ this.module_prefix }/public_share_analytics`;
|
|
215
|
+
const prev_method = this.method;
|
|
216
|
+
|
|
217
|
+
this.method = 'get';
|
|
218
|
+
|
|
219
|
+
payload = this.handle_request_payload(payload);
|
|
220
|
+
let response = this.api_request(url, payload);
|
|
221
|
+
response = await this.handle_response(response, false);
|
|
222
|
+
|
|
223
|
+
this.method = prev_method;
|
|
224
|
+
|
|
225
|
+
return {
|
|
226
|
+
response: response,
|
|
227
|
+
payload : payload,
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ApiAbstractElementClass } from "./api_abstract_element_class.js";
|
|
2
|
+
import { typeTextDocumentFolder } from "../types/family_files/typeTextDocumentFolder.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @version v.1.0 (04/07/2026)
|
|
6
|
+
*/
|
|
7
|
+
export class TextDocumentFolderApi extends ApiAbstractElementClass
|
|
8
|
+
{
|
|
9
|
+
module_prefix = 'text_document_folder';
|
|
10
|
+
|
|
11
|
+
constructor(options)
|
|
12
|
+
{
|
|
13
|
+
super(options);
|
|
14
|
+
this.set_element_class_instance(typeTextDocumentFolder);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -11,6 +11,7 @@ import { typeTestCaseStep } from '../../../types/family_elements/typeTestCaseSte
|
|
|
11
11
|
import { typeUser } from '../../../types/family_elements/typeUser.js';
|
|
12
12
|
import { typeTeam } from '../../../types/family_elements/typeTeam.js';
|
|
13
13
|
import { typeUtilExecutionScreenshotMulti } from '../../../types/family_utils/typeUtilExecutionScreenshotMulti.js';
|
|
14
|
+
import { typeTextDocument } from '../../../types/family_files/typeTextDocument.js';
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Реестр классов моделей по ключу `element_type`.
|
|
@@ -36,5 +37,6 @@ export const TABLE_ELEMENT_MODELS = {
|
|
|
36
37
|
test_case_step : typeTestCaseStep,
|
|
37
38
|
user : typeUser,
|
|
38
39
|
team : typeTeam,
|
|
40
|
+
text_document : typeTextDocument,
|
|
39
41
|
util_execution : typeUtilExecutionScreenshotMulti,
|
|
40
42
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { typeTextDocument } from '../../../types/family_files/typeTextDocument.js';
|
|
2
|
+
import { UserService } from '../../../services/UserService.js';
|
|
3
|
+
import { createColumn, createGoToColumn, createPrimaryKeyColumn } from '../helpers/column_factory.js';
|
|
4
|
+
import { createListingFor, registerSection } from '../helpers/section_registry.js';
|
|
5
|
+
|
|
6
|
+
function build_text_document_listing_columns(locale)
|
|
7
|
+
{
|
|
8
|
+
const model = new typeTextDocument();
|
|
9
|
+
|
|
10
|
+
return [
|
|
11
|
+
createPrimaryKeyColumn(model, locale),
|
|
12
|
+
createColumn(model, locale, 'text_document_title', { width: '320', is_editable: true, is_title: true }),
|
|
13
|
+
createColumn(model, locale, 'text_document_status', { width: '140', is_editable: true }),
|
|
14
|
+
createColumn(model, locale, 'text_document_folder_id', { width: '120' }),
|
|
15
|
+
createColumn(model, locale, 'created_at', { width: '170' }),
|
|
16
|
+
createColumn(model, locale, 'updated_at', { width: '170' }),
|
|
17
|
+
createGoToColumn(model, locale),
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @param {Object<string, Object<string, { config: import('../../../types/family_service/typeTableConfiguration.js').typeTableConfiguration }>>} config
|
|
23
|
+
*/
|
|
24
|
+
export function bootstrap_text_document(config)
|
|
25
|
+
{
|
|
26
|
+
const locale = UserService.get_current_language();
|
|
27
|
+
|
|
28
|
+
registerSection(config, 'text_document', 'listing', build_text_document_listing_columns(locale), {
|
|
29
|
+
for: createListingFor([ 'project_id', 'text_document_folder_id' ]),
|
|
30
|
+
});
|
|
31
|
+
}
|
|
@@ -12,6 +12,7 @@ import { bootstrap_team_member } from './sections/team_member.js';
|
|
|
12
12
|
import { bootstrap_user } from './sections/user.js';
|
|
13
13
|
import { bootstrap_team } from './sections/team.js';
|
|
14
14
|
import { bootstrap_project } from './sections/project.js';
|
|
15
|
+
import { bootstrap_text_document } from './sections/text_document.js';
|
|
15
16
|
import { localizeTableSection } from './helpers/column_locale.js';
|
|
16
17
|
|
|
17
18
|
/**
|
|
@@ -120,6 +121,7 @@ export class TableConfiguration extends abstractAppConfiguration
|
|
|
120
121
|
bootstrap_user(this.config);
|
|
121
122
|
bootstrap_team(this.config);
|
|
122
123
|
bootstrap_project(this.config);
|
|
124
|
+
bootstrap_text_document(this.config);
|
|
123
125
|
|
|
124
126
|
this.state.loaded = true;
|
|
125
127
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TipTap toolbar / extension flags for text document editor (web_app consumes).
|
|
3
|
+
*
|
|
4
|
+
* @version v.1.0 (04/07/2026)
|
|
5
|
+
*/
|
|
6
|
+
export const text_document_editor_config = {
|
|
7
|
+
starterKit: {
|
|
8
|
+
heading: {
|
|
9
|
+
levels: [ 1, 2, 3 ],
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
underline : true,
|
|
13
|
+
textAlign : true,
|
|
14
|
+
color : true,
|
|
15
|
+
highlight : true,
|
|
16
|
+
link : true,
|
|
17
|
+
placeholder : 'Start writing…',
|
|
18
|
+
numberedHeadings: true,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @returns {typeof text_document_editor_config}
|
|
23
|
+
*/
|
|
24
|
+
export function get_text_document_editor_config()
|
|
25
|
+
{
|
|
26
|
+
return text_document_editor_config;
|
|
27
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Limits for text document feature (sync with test_site and file-app).
|
|
3
|
+
*
|
|
4
|
+
* @version v.1.0 (04/07/2026)
|
|
5
|
+
*/
|
|
6
|
+
export const TEXT_DOCUMENT_MAX_IMAGES = 20;
|
|
7
|
+
|
|
8
|
+
export const TEXT_DOCUMENT_MAX_BODY_BYTES = 5242880;
|
|
9
|
+
|
|
10
|
+
export const TEXT_DOCUMENT_MAX_VERSIONS = 15;
|
|
11
|
+
|
|
12
|
+
export const TEXT_DOCUMENT_AUTOSAVE_STORAGE_PREFIX = 'text_document_autosave_';
|
package/publish/index.js
CHANGED
|
@@ -45,6 +45,17 @@ export { typeFilePostman } from './types/family_files/typeFilePostman.js';
|
|
|
45
45
|
export { typeFileVideo } from './types/family_files/typeFileVideo.js';
|
|
46
46
|
export { typeFileJson } from './types/family_files/typeFileJson.js';
|
|
47
47
|
export { create_type_file_from_wire } from './types/family_files/typeFileFactory.js';
|
|
48
|
+
export { typeTextDocument } from './types/family_files/typeTextDocument.js';
|
|
49
|
+
export { typeTextDocumentFolder } from './types/family_files/typeTextDocumentFolder.js';
|
|
50
|
+
|
|
51
|
+
export { TEXT_DOCUMENT_MAX_IMAGES, TEXT_DOCUMENT_MAX_BODY_BYTES, TEXT_DOCUMENT_MAX_VERSIONS, TEXT_DOCUMENT_AUTOSAVE_STORAGE_PREFIX } from './constants/text_document_limits.js';
|
|
52
|
+
export {
|
|
53
|
+
count_text_document_images,
|
|
54
|
+
collect_text_document_image_uuids,
|
|
55
|
+
build_text_document_image_html,
|
|
56
|
+
can_add_text_document_image,
|
|
57
|
+
} from './utils/text_document_image.js';
|
|
58
|
+
export { text_document_editor_config, get_text_document_editor_config } from './app_configuration/text_document_editor_config.js';
|
|
48
59
|
|
|
49
60
|
export { typeUser } from './types/family_elements/typeUser.js';
|
|
50
61
|
export { typeTeam } from './types/family_elements/typeTeam.js';
|