complexqa_frontend_core 1.30.3 → 1.31.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "complexqa_frontend_core",
3
- "version": "1.30.3",
3
+ "version": "1.31.1",
4
4
  "description": "core of web ",
5
5
  "type": "module",
6
6
  "exports": {
@@ -0,0 +1,17 @@
1
+ import { ApiAbstractReferenceClass } from "../api_abstract_reference_class.js";
2
+ import { typeUserAgentContext } from "../../types/family_context/typeUserAgentContext.js";
3
+
4
+ /**
5
+ *
6
+ * @version v.1.0 (09/09/2026)
7
+ */
8
+ export class ContextUserAgentsApi extends ApiAbstractReferenceClass
9
+ {
10
+ module_prefix = 'context_user_agents';
11
+
12
+ constructor(options)
13
+ {
14
+ super(options);
15
+ this.set_element_class_instance(typeUserAgentContext);
16
+ }
17
+ }
@@ -29,6 +29,7 @@ import { ExecutionContextApi } from "./context/context_execution_general_api.js"
29
29
  import { ContextLocaleApi } from "./context/context_locale_api.js";
30
30
  import { ContextOsApi } from "./context/context_os_api.js";
31
31
  import { ContextScreenResolutionApi } from "./context/context_screen_resolution_api.js";
32
+ import { ContextUserAgentsApi } from "./context/context_user_agents_api.js";
32
33
  import { BrowserToolsUtilExecutionApi } from "./util/browser_tools_util_execution_api.js";
33
34
  import { BrowserToolsScreenshotMultiApi } from "./util/browser_tools_screenshot_multi_api.js";
34
35
  import { TeamDomainApi } from "./team_domain_api.js";
@@ -229,6 +230,7 @@ export class Api
229
230
  response.context_locale = new ContextLocaleApi(payload);
230
231
  response.context_os = new ContextOsApi(payload);
231
232
  response.context_screen_resolution = new ContextScreenResolutionApi(payload);
233
+ response.context_user_agents = new ContextUserAgentsApi(payload);
232
234
  response.tag_color = new TagColorApi(payload);
233
235
  response.tag_template = new TagTemplateApi(payload);
234
236
  response.custom_property_template = new CustomPropertyTemplateApi(payload);
@@ -15,6 +15,7 @@ export function get_execution_context_listing_field_specs()
15
15
  { field: 'device_context_id', overrides: { width: '200' } },
16
16
  { field: 'locale_context_id', overrides: { width: '200' } },
17
17
  { field: 'deployment_target_context_id', overrides: { width: '200' } },
18
+ { field: 'user_agent_context_id', overrides: { width: '220' } },
18
19
  { field: 'protocol', overrides: { width: '120' } },
19
20
  { field: 'host', overrides: { width: '200' } },
20
21
  { field: 'base_url', overrides: { width: '250' } },
@@ -12,6 +12,7 @@ const FK_FIELDS = [
12
12
  'device_context_id',
13
13
  'locale_context_id',
14
14
  'deployment_target_context_id',
15
+ 'user_agent_context_id',
15
16
  ];
16
17
 
17
18
  const EXECUTION_CONTEXT_EDITABLE_FIELDS = new Set([
package/publish/index.js CHANGED
@@ -59,6 +59,7 @@ export { typeScreenResolutionContext } from './types/family_context/typeScreenRe
59
59
  export { typeDeviceContext } from './types/family_context/typeDeviceContext.js';
60
60
  export { typeLocaleContext } from './types/family_context/typeLocaleContext.js';
61
61
  export { typeDeploymentTargetContext } from './types/family_context/typeDeploymentTargetContext.js';
62
+ export { typeUserAgentContext } from './types/family_context/typeUserAgentContext.js';
62
63
  export { typeExecutionContext } from './types/family_context/typeExecutionContext.js';
63
64
 
64
65
  export { familyUtil } from './types/family_utils/familyUtil.js';
@@ -17,6 +17,7 @@ export const typeExecutionContext_i18n = {
17
17
  device_context_id : 'Device',
18
18
  locale_context_id : 'Locale',
19
19
  deployment_target_context_id: 'Deployment target',
20
+ user_agent_context_id : 'User-Agent',
20
21
  protocol : 'Protocol',
21
22
  host : 'Host',
22
23
  base_url : 'Base URL',
@@ -36,6 +37,7 @@ export const typeExecutionContext_i18n = {
36
37
  device_context_id : 'Устройство',
37
38
  locale_context_id : 'Локаль',
38
39
  deployment_target_context_id: 'Среда развёртывания',
40
+ user_agent_context_id : 'User-Agent',
39
41
  protocol : 'Протокол',
40
42
  host : 'Хост',
41
43
  base_url : 'Базовый URL',
@@ -55,6 +57,7 @@ export const typeExecutionContext_i18n = {
55
57
  device_context_id : 'Gerät',
56
58
  locale_context_id : 'Gebietsschema',
57
59
  deployment_target_context_id: 'Bereitstellungsumgebung',
60
+ user_agent_context_id : 'User-Agent',
58
61
  protocol : 'Protokoll',
59
62
  host : 'Host',
60
63
  base_url : 'Basis-URL',
@@ -74,6 +77,7 @@ export const typeExecutionContext_i18n = {
74
77
  device_context_id : 'الجهاز',
75
78
  locale_context_id : 'اللغة',
76
79
  deployment_target_context_id: 'بيئة النشر',
80
+ user_agent_context_id : 'User-Agent',
77
81
  protocol : 'البروتوكول',
78
82
  host : 'المضيف',
79
83
  base_url : 'عنوان URL الأساسي',
@@ -93,6 +97,7 @@ export const typeExecutionContext_i18n = {
93
97
  device_context_id : 'Dispositivo',
94
98
  locale_context_id : 'Configuración regional',
95
99
  deployment_target_context_id: 'Entorno de despliegue',
100
+ user_agent_context_id : 'User-Agent',
96
101
  protocol : 'Protocolo',
97
102
  host : 'Host',
98
103
  base_url : 'URL base',
@@ -112,6 +117,7 @@ export const typeExecutionContext_i18n = {
112
117
  device_context_id : 'Appareil',
113
118
  locale_context_id : 'Paramètres régionaux',
114
119
  deployment_target_context_id: 'Environnement de déploiement',
120
+ user_agent_context_id : 'User-Agent',
115
121
  protocol : 'Protocole',
116
122
  host : 'Hôte',
117
123
  base_url : 'URL de base',
@@ -131,6 +137,7 @@ export const typeExecutionContext_i18n = {
131
137
  device_context_id : 'Սարք',
132
138
  locale_context_id : 'Տեղական կարգավորում',
133
139
  deployment_target_context_id: 'Տեղակայման միջավայր',
140
+ user_agent_context_id : 'User-Agent',
134
141
  protocol : 'Պրոտոկոլ',
135
142
  host : 'Հոստ',
136
143
  base_url : 'Հիմնական URL',
@@ -150,6 +157,7 @@ export const typeExecutionContext_i18n = {
150
157
  device_context_id : 'Dispositivo',
151
158
  locale_context_id : 'Impostazioni locali',
152
159
  deployment_target_context_id: 'Ambiente di distribuzione',
160
+ user_agent_context_id : 'User-Agent',
153
161
  protocol : 'Protocollo',
154
162
  host : 'Host',
155
163
  base_url : 'URL base',
@@ -169,6 +177,7 @@ export const typeExecutionContext_i18n = {
169
177
  device_context_id : 'Urządzenie',
170
178
  locale_context_id : 'Ustawienia regionalne',
171
179
  deployment_target_context_id: 'Środowisko wdrożenia',
180
+ user_agent_context_id : 'User-Agent',
172
181
  protocol : 'Protokół',
173
182
  host : 'Host',
174
183
  base_url : 'Bazowy URL',
@@ -188,6 +197,7 @@ export const typeExecutionContext_i18n = {
188
197
  device_context_id : 'Dispositivo',
189
198
  locale_context_id : 'Definições regionais',
190
199
  deployment_target_context_id: 'Ambiente de implementação',
200
+ user_agent_context_id : 'User-Agent',
191
201
  protocol : 'Protocolo',
192
202
  host : 'Host',
193
203
  base_url : 'URL base',
@@ -207,6 +217,7 @@ export const typeExecutionContext_i18n = {
207
217
  device_context_id : 'Җihaz',
208
218
  locale_context_id : 'Локаль',
209
219
  deployment_target_context_id: 'Урнаштыру мохите',
220
+ user_agent_context_id : 'User-Agent',
210
221
  protocol : 'Прotokol',
211
222
  host : 'Хост',
212
223
  base_url : 'База URL',
@@ -0,0 +1,165 @@
1
+ import { familyContext_i18n } from './_familyContext.i18n.js';
2
+ import { typeDeviceContext_i18n } from './typeDeviceContext.i18n.js';
3
+
4
+ const catalog = familyContext_i18n.attribute_name_translate_matrix;
5
+
6
+ const extra = {
7
+ en: {
8
+ user_agent_context_id: 'ID',
9
+ user_agent: 'User-Agent',
10
+ playwright_device: 'Playwright device',
11
+ device_class: 'Device class',
12
+ device_context_id: 'Device',
13
+ viewport_width: 'Viewport width',
14
+ viewport_height: 'Viewport height',
15
+ device_scale_factor: 'Device scale factor',
16
+ is_mobile: 'Mobile',
17
+ has_touch: 'Touch',
18
+ },
19
+ ru: {
20
+ user_agent_context_id: 'ID',
21
+ user_agent: 'User-Agent',
22
+ playwright_device: 'Устройство Playwright',
23
+ device_class: 'Класс устройства',
24
+ device_context_id: 'Устройство',
25
+ viewport_width: 'Ширина viewport',
26
+ viewport_height: 'Высота viewport',
27
+ device_scale_factor: 'Масштаб устройства',
28
+ is_mobile: 'Мобильный',
29
+ has_touch: 'Сенсор',
30
+ },
31
+ de: {
32
+ user_agent_context_id: 'ID',
33
+ user_agent: 'User-Agent',
34
+ playwright_device: 'Playwright-Gerät',
35
+ device_class: 'Geräteklasse',
36
+ device_context_id: 'Gerät',
37
+ viewport_width: 'Viewport-Breite',
38
+ viewport_height: 'Viewport-Höhe',
39
+ device_scale_factor: 'Geräteskalierung',
40
+ is_mobile: 'Mobil',
41
+ has_touch: 'Touch',
42
+ },
43
+ ar: {
44
+ user_agent_context_id: 'ID',
45
+ user_agent: 'User-Agent',
46
+ playwright_device: 'جهاز Playwright',
47
+ device_class: 'فئة الجهاز',
48
+ device_context_id: 'جهاز',
49
+ viewport_width: 'عرض viewport',
50
+ viewport_height: 'ارتفاع viewport',
51
+ device_scale_factor: 'مقياس الجهاز',
52
+ is_mobile: 'جوال',
53
+ has_touch: 'لمس',
54
+ },
55
+ es: {
56
+ user_agent_context_id: 'ID',
57
+ user_agent: 'User-Agent',
58
+ playwright_device: 'Dispositivo Playwright',
59
+ device_class: 'Clase de dispositivo',
60
+ device_context_id: 'Dispositivo',
61
+ viewport_width: 'Ancho de viewport',
62
+ viewport_height: 'Alto de viewport',
63
+ device_scale_factor: 'Escala del dispositivo',
64
+ is_mobile: 'Móvil',
65
+ has_touch: 'Táctil',
66
+ },
67
+ fr: {
68
+ user_agent_context_id: 'ID',
69
+ user_agent: 'User-Agent',
70
+ playwright_device: 'Appareil Playwright',
71
+ device_class: 'Classe d\'appareil',
72
+ device_context_id: 'Appareil',
73
+ viewport_width: 'Largeur viewport',
74
+ viewport_height: 'Hauteur viewport',
75
+ device_scale_factor: 'Échelle appareil',
76
+ is_mobile: 'Mobile',
77
+ has_touch: 'Tactile',
78
+ },
79
+ hy: {
80
+ user_agent_context_id: 'ID',
81
+ user_agent: 'User-Agent',
82
+ playwright_device: 'Playwright սարք',
83
+ device_class: 'Սարքի դաս',
84
+ device_context_id: 'Սարք',
85
+ viewport_width: 'Viewport լայնություն',
86
+ viewport_height: 'Viewport բարձրություն',
87
+ device_scale_factor: 'Սարքի մասշտաբ',
88
+ is_mobile: 'Բջջային',
89
+ has_touch: 'Հպում',
90
+ },
91
+ it: {
92
+ user_agent_context_id: 'ID',
93
+ user_agent: 'User-Agent',
94
+ playwright_device: 'Dispositivo Playwright',
95
+ device_class: 'Classe dispositivo',
96
+ device_context_id: 'Dispositivo',
97
+ viewport_width: 'Larghezza viewport',
98
+ viewport_height: 'Altezza viewport',
99
+ device_scale_factor: 'Scala dispositivo',
100
+ is_mobile: 'Mobile',
101
+ has_touch: 'Touch',
102
+ },
103
+ pl: {
104
+ user_agent_context_id: 'ID',
105
+ user_agent: 'User-Agent',
106
+ playwright_device: 'Urządzenie Playwright',
107
+ device_class: 'Klasa urządzenia',
108
+ device_context_id: 'Urządzenie',
109
+ viewport_width: 'Szerokość viewport',
110
+ viewport_height: 'Wysokość viewport',
111
+ device_scale_factor: 'Skala urządzenia',
112
+ is_mobile: 'Mobilny',
113
+ has_touch: 'Dotyk',
114
+ },
115
+ pt: {
116
+ user_agent_context_id: 'ID',
117
+ user_agent: 'User-Agent',
118
+ playwright_device: 'Dispositivo Playwright',
119
+ device_class: 'Classe de dispositivo',
120
+ device_context_id: 'Dispositivo',
121
+ viewport_width: 'Largura viewport',
122
+ viewport_height: 'Altura viewport',
123
+ device_scale_factor: 'Escala do dispositivo',
124
+ is_mobile: 'Móvel',
125
+ has_touch: 'Toque',
126
+ },
127
+ tt: {
128
+ user_agent_context_id: 'ID',
129
+ user_agent: 'User-Agent',
130
+ playwright_device: 'Playwright җihaz',
131
+ device_class: 'Җihaz классы',
132
+ device_context_id: 'Җihaz',
133
+ viewport_width: 'Viewport киңлеге',
134
+ viewport_height: 'Viewport биеклеге',
135
+ device_scale_factor: 'Җihaz масштабы',
136
+ is_mobile: 'Мобиль',
137
+ has_touch: 'Touch',
138
+ },
139
+ };
140
+
141
+ /**
142
+ * Переводы для typeUserAgentContext.
143
+ *
144
+ * @see typeUserAgentContext
145
+ */
146
+ export const typeUserAgentContext_i18n = {
147
+ attribute_name_translate_matrix: {
148
+ en: { ...catalog.en, ...extra.en },
149
+ ru: { ...catalog.ru, ...extra.ru },
150
+ de: { ...catalog.de, ...extra.de },
151
+ ar: { ...catalog.ar, ...extra.ar },
152
+ es: { ...catalog.es, ...extra.es },
153
+ fr: { ...catalog.fr, ...extra.fr },
154
+ hy: { ...catalog.hy, ...extra.hy },
155
+ it: { ...catalog.it, ...extra.it },
156
+ pl: { ...catalog.pl, ...extra.pl },
157
+ pt: { ...catalog.pt, ...extra.pt },
158
+ tt: { ...catalog.tt, ...extra.tt },
159
+ },
160
+
161
+ enum_value_translate_matrix: {
162
+ ...familyContext_i18n.enum_value_translate_matrix,
163
+ device_class: typeDeviceContext_i18n.enum_value_translate_matrix.device_class,
164
+ },
165
+ };
@@ -25,6 +25,7 @@ export class typeExecutionContext extends familyGeneralElement
25
25
  device_context_id;
26
26
  locale_context_id;
27
27
  deployment_target_context_id;
28
+ user_agent_context_id;
28
29
 
29
30
  protocol;
30
31
  host;
@@ -49,6 +50,7 @@ export class typeExecutionContext extends familyGeneralElement
49
50
  device_context_id : 'integer | typeDeviceContext | optional',
50
51
  locale_context_id : 'integer | typeLocaleContext | optional',
51
52
  deployment_target_context_id: 'integer | typeDeploymentTargetContext | optional',
53
+ user_agent_context_id : 'integer | typeUserAgentContext | optional',
52
54
  protocol : 'string | enum | optional',
53
55
  host : 'string | max:255 | optional',
54
56
  base_url : 'string | max:2048 | optional',
@@ -0,0 +1,80 @@
1
+ import { familyContext } from "../core/1_familyContext.js";
2
+ import { is_object } from "../../utils/utils.js";
3
+ import { register_type_class } from "../core/type_class_resolver.js";
4
+ import { typeUserAgentContext_i18n } from "../element_translate/typeUserAgentContext.i18n.js";
5
+
6
+
7
+ /**
8
+ * Справочник HTTP User-Agent для контекста исполнения автотеста.
9
+ *
10
+ * SYSTEM seed: Playwright 1.62.1 playwright.devices (portrait).
11
+ * Runtime: userAgent + viewport default + isMobile / hasTouch in browser.newContext().
12
+ *
13
+ * @version v.1.0 (09/09/2026)
14
+ */
15
+ export class typeUserAgentContext extends familyContext
16
+ {
17
+ user_agent_context_id;
18
+ device_class;
19
+ user_agent;
20
+ playwright_device;
21
+ device_context_id;
22
+ viewport_width;
23
+ viewport_height;
24
+ device_scale_factor;
25
+ is_mobile;
26
+ has_touch;
27
+
28
+ context_axis = 'user_agent';
29
+
30
+ primary_key = 'user_agent_context_id';
31
+ api_key = 'user_agent_context';
32
+ reference_api_key = 'context_user_agents';
33
+
34
+ structure_scheme = {
35
+ user_agent_context_id: 'integer | require',
36
+ device_class : 'string | enum | require',
37
+ user_agent : 'string | max:512 | require',
38
+ playwright_device : 'string | max:128 | optional',
39
+ device_context_id : 'integer | typeDeviceContext | optional',
40
+ viewport_width : 'integer | require',
41
+ viewport_height : 'integer | require',
42
+ device_scale_factor : 'number | require',
43
+ is_mobile : 'integer | optional',
44
+ has_touch : 'integer | optional',
45
+ ...familyContext.get_catalog_base_structure_scheme(),
46
+ };
47
+
48
+ available_enum_values = {
49
+ ...familyContext.get_base_available_enum_values(),
50
+ device_class: [ 'DESKTOP', 'MOBILE', 'TABLET', 'TV', 'WATCH', 'OTHER' ],
51
+ };
52
+
53
+ enum_value_translate_matrix = typeUserAgentContext_i18n.enum_value_translate_matrix;
54
+
55
+ attribute_name_translate_matrix = typeUserAgentContext_i18n.attribute_name_translate_matrix;
56
+
57
+
58
+ /**
59
+ * @param {object|false|undefined} data
60
+ */
61
+ constructor(data = false)
62
+ {
63
+ super();
64
+
65
+ if (data && is_object(data))
66
+ {
67
+ _.mapObject(data, (value, key) =>
68
+ {
69
+ if (this.hasOwnProperty(key))
70
+ {
71
+ this [ key ] = value;
72
+ }
73
+ });
74
+ }
75
+
76
+ return this;
77
+ }
78
+ }
79
+
80
+ register_type_class('typeUserAgentContext', typeUserAgentContext);