complexqa_frontend_core 1.0.4 → 1.0.6

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.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "core of web ",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,5 +1,4 @@
1
- import { Api } from "./api";
2
- import { serviceTranslate } from "./services/serviceTranslate";
1
+
3
2
 
4
3
  /**
5
4
  * Прототип идеи, пока не уверен, что именно так надо
@@ -41,11 +40,7 @@ export class App
41
40
  this.service.translate = new serviceTranslate();
42
41
  }
43
42
  }
44
-
45
- import { clone_object, echo, is_array } from "../utils/utils";
46
- import axios from "axios";
47
- import * as qs from "query-string/base";
48
- import { ApiException } from "../exceptions/ApiException";
43
+
49
44
 
50
45
  /**
51
46
  * Общие методы для всех типизированных элементов
@@ -467,9 +462,7 @@ export class ApiAbstractElementClass
467
462
 
468
463
  return response;
469
464
  }
470
- }
471
- import { ApiAbstractElementClass } from "./api_abstract_element_class";
472
- import { typeFunctional } from "../types/family_elements/typeFunctional";
465
+ }
473
466
 
474
467
 
475
468
  /**
@@ -485,11 +478,7 @@ export class FunctionalApi extends ApiAbstractElementClass
485
478
  super(options);
486
479
  this.set_element_class_instance(typeFunctional);
487
480
  }
488
- }
489
- import { TestPlanApi } from "./test_plan_api";
490
- import { ProjectApi } from "./project_api";
491
- import { ServiceApi } from "./service_api";
492
- import { TestCaseApi } from "./test_case_api";
481
+ }
493
482
 
494
483
  /**
495
484
  * Обертка над axios
@@ -597,9 +586,7 @@ export class Api
597
586
  this.service = new ServiceApi(payload);
598
587
  this.test_case = new TestCaseApi(payload);
599
588
  }
600
- }
601
- import { ApiAbstractElementClass } from "./api_abstract_element_class";
602
- import { typeProject } from "../types/family_elements/typeProject";
589
+ }
603
590
 
604
591
  /**
605
592
  *
@@ -614,7 +601,7 @@ export class ProjectApi extends ApiAbstractElementClass
614
601
  super(options);
615
602
  this.set_element_class_instance(typeProject);
616
603
  }
617
- }
604
+ }
618
605
 
619
606
  // тут нужен свой класс, не для типов
620
607
  export class ServiceApi
@@ -634,9 +621,7 @@ export class ServiceApi
634
621
  {
635
622
  return [];
636
623
  }
637
- }
638
- import { ApiAbstractElementClass } from "./api_abstract_element_class";
639
- import { typeTeamMember } from "../types/family_elements/typeTeamMember";
624
+ }
640
625
 
641
626
 
642
627
  /**
@@ -652,9 +637,7 @@ export class TeamMemberApi extends ApiAbstractElementClass
652
637
  super(options);
653
638
  this.set_element_class_instance(typeTeamMember);
654
639
  }
655
- }
656
- import { ApiAbstractElementClass } from "./api_abstract_element_class";
657
- import { typeTestCase } from "../types/family_elements/typeTestCase";
640
+ }
658
641
 
659
642
 
660
643
  /**
@@ -670,9 +653,7 @@ export class TestCaseApi extends ApiAbstractElementClass
670
653
  super(options);
671
654
  this.set_element_class_instance(typeTestCase);
672
655
  }
673
- }
674
- import { typeTestCaseStep } from "../types/family_elements/typeTestCaseStep";
675
- import { ApiAbstractElementClass } from "./api_abstract_element_class";
656
+ }
676
657
 
677
658
 
678
659
  /**
@@ -688,9 +669,7 @@ export class TestCaseStepApi extends ApiAbstractElementClass
688
669
  super(options);
689
670
  this.set_element_class_instance(typeTestCaseStep);
690
671
  }
691
- }
692
- import { ApiAbstractElementClass } from "./api_abstract_element_class";
693
- import { typeTestPlan } from "../types/family_elements/typeTestPlan";
672
+ }
694
673
 
695
674
 
696
675
  /**
@@ -706,9 +685,7 @@ export class TestPlanApi extends ApiAbstractElementClass
706
685
  super(options);
707
686
  this.set_element_class_instance(typeTestPlan);
708
687
  }
709
- }
710
- import { ApiAbstractElementClass } from "./api_abstract_element_class";
711
- import { typeTestRun } from "../types/family_elements/typeTestRun";
688
+ }
712
689
 
713
690
  export class TestRunApi extends ApiAbstractElementClass
714
691
  {
@@ -719,9 +696,7 @@ export class TestRunApi extends ApiAbstractElementClass
719
696
  super(options);
720
697
  this.set_element_class_instance(typeTestRun);
721
698
  }
722
- }
723
- import { ApiAbstractElementClass } from "./api_abstract_element_class";
724
- import { typeTestRunResult } from "../types/family_elements/typeTestRunResult";
699
+ }
725
700
 
726
701
 
727
702
  /**
@@ -737,9 +712,7 @@ export class TestRunResultApi extends ApiAbstractElementClass
737
712
  super(options);
738
713
  this.set_element_class_instance(typeTestRunResult);
739
714
  }
740
- }
741
- import { ApiAbstractElementClass } from "./api_abstract_element_class";
742
- import { typeTestSuite } from "../types/family_elements/typeTestSuite";
715
+ }
743
716
 
744
717
 
745
718
  /**
@@ -755,7 +728,7 @@ export class TestSuiteApi extends ApiAbstractElementClass
755
728
  super(options);
756
729
  this.set_element_class_instance(typeTestSuite);
757
730
  }
758
- }
731
+ }
759
732
  export class ApiException extends Error
760
733
  {
761
734
  /**
@@ -824,7 +797,7 @@ export class ApiException extends Error
824
797
  return this.#message;
825
798
  }
826
799
  }
827
- }
800
+ }
828
801
  /**
829
802
  *
830
803
  * @version v.0.1 (25/06/2024)
@@ -860,10 +833,7 @@ export class abstractService
860
833
  {
861
834
 
862
835
  }*/
863
- }
864
- import { abstractService } from "./abstractService";
865
- import i18next from 'i18next';
866
- import { Api } from "../api";
836
+ }
867
837
 
868
838
  /**
869
839
  *
@@ -958,9 +928,7 @@ export class serviceTranslate extends abstractService
958
928
  {
959
929
  return this.#vendor_instance.t(group + '.' + key);
960
930
  }
961
- }
962
- import { abstractService } from "./abstractService";
963
- import { MockUserService } from "./mock_data/MockUserService";
931
+ }
964
932
 
965
933
  /**
966
934
  *
@@ -1088,7 +1056,7 @@ export class UserService extends abstractService
1088
1056
  UserService.current_language = current_language;
1089
1057
  }
1090
1058
  }
1091
-
1059
+
1092
1060
  /**
1093
1061
  *
1094
1062
  * @param {object} object
@@ -1278,7 +1246,7 @@ export function in_array(value, array, strict = false)
1278
1246
  export function cls()
1279
1247
  {
1280
1248
  console.clear();
1281
- }
1249
+ }
1282
1250
  export class MockUserService
1283
1251
  {
1284
1252
  static mock_attributes = [ {
@@ -1308,8 +1276,7 @@ export class MockUserService
1308
1276
  },
1309
1277
  ];
1310
1278
 
1311
- }
1312
- import { clone_object, in_array, is_array } from "../../utils/utils";
1279
+ }
1313
1280
 
1314
1281
  /**
1315
1282
  * Базовый абстрактный класс для всех типов
@@ -1494,6 +1461,7 @@ export class familyGeneralElement
1494
1461
 
1495
1462
  is_editable_attribute(attribute) {}
1496
1463
 
1464
+
1497
1465
  /**
1498
1466
  *
1499
1467
  * @version v.0.1 (26/05/2024)
@@ -1505,6 +1473,17 @@ export class familyGeneralElement
1505
1473
  return attribute_name;
1506
1474
  }
1507
1475
 
1476
+ /***********************************************/
1477
+
1478
+ /**
1479
+ * Возвращаем "имя", то есть значение атрибута, который является именем
1480
+ *
1481
+ * @version v.0.1 (05/06/2025)
1482
+ */
1483
+ get_element_name()
1484
+ {
1485
+ alert('Error #205-001 Not implemented method');
1486
+ }
1508
1487
 
1509
1488
  /***********************************************/
1510
1489
  /***********************************************/
@@ -1573,7 +1552,7 @@ export class familyGeneralElement
1573
1552
  alert('Error #267-001 Not implemented method');
1574
1553
  return false;
1575
1554
  }
1576
- }
1555
+ }
1577
1556
  /**
1578
1557
  * Заготовка - логи действий
1579
1558
  *
@@ -1582,9 +1561,7 @@ export class familyGeneralElement
1582
1561
  export class typeActionLog
1583
1562
  {
1584
1563
 
1585
- }
1586
- import { familyGeneralElement } from "./0_familyGeneralElement";
1587
- import { is_object } from "../../utils/utils";
1564
+ }
1588
1565
 
1589
1566
 
1590
1567
  /**
@@ -1678,9 +1655,7 @@ export class typeFunctional extends familyGeneralElement
1678
1655
  }
1679
1656
 
1680
1657
 
1681
- }
1682
- import { familyGeneralElement } from "./0_familyGeneralElement";
1683
- import { is_object } from "../../utils/utils";
1658
+ }
1684
1659
 
1685
1660
 
1686
1661
  /**
@@ -1773,9 +1748,7 @@ export class typeFunctionalGroup extends familyGeneralElement
1773
1748
  }
1774
1749
 
1775
1750
 
1776
- }
1777
- import { familyGeneralElement } from "./0_familyGeneralElement";
1778
- import { is_object } from "../../utils/utils";
1751
+ }
1779
1752
 
1780
1753
  /**
1781
1754
  *
@@ -1866,10 +1839,7 @@ export class typeMilestone extends familyGeneralElement
1866
1839
  }
1867
1840
 
1868
1841
 
1869
- }
1870
- import { familyGeneralElement } from "./0_familyGeneralElement";
1871
- import { echo, is_object } from "../../utils/utils";
1872
- import { MockDataTypeProject } from "./mock_data/mock_data_typeProject";
1842
+ }
1873
1843
 
1874
1844
 
1875
1845
  /**
@@ -1946,6 +1916,20 @@ export class typeProject extends familyGeneralElement
1946
1916
  }
1947
1917
 
1948
1918
 
1919
+ /******************************************************************************************/
1920
+
1921
+
1922
+ /**
1923
+ *
1924
+ * @version v.0.1 (05/06/2025)
1925
+ *
1926
+ * @returns {string}
1927
+ */
1928
+ get_element_name()
1929
+ {
1930
+ return this.project_name;
1931
+ }
1932
+
1949
1933
  /******************************************************************************************/
1950
1934
  /*********************************** general **********************************************/
1951
1935
  /******************************************************************************************/
@@ -2033,9 +2017,7 @@ export class typeProject extends familyGeneralElement
2033
2017
  member_get() {}
2034
2018
 
2035
2019
 
2036
- }
2037
- import { familyGeneralElement } from "./0_familyGeneralElement";
2038
- import { is_object } from "../../utils/utils";
2020
+ }
2039
2021
 
2040
2022
  /**
2041
2023
  * (идея) - у проекта должна быть тестовая документация
@@ -2113,9 +2095,7 @@ export class typeProjectDocument extends familyGeneralElement
2113
2095
  {
2114
2096
 
2115
2097
  }
2116
- }
2117
- import { familyGeneralElement } from "./0_familyGeneralElement";
2118
- import { is_object } from "../../utils/utils";
2098
+ }
2119
2099
 
2120
2100
  /**
2121
2101
  * Тестовые аккаунты
@@ -2172,9 +2152,7 @@ export class typeProjectTestAccount extends familyGeneralElement
2172
2152
 
2173
2153
  return this;
2174
2154
  }
2175
- }
2176
- import { familyGeneralElement } from "./0_familyGeneralElement";
2177
- import { is_object } from "../../utils/utils";
2155
+ }
2178
2156
 
2179
2157
  /**
2180
2158
  * Тестовые данные
@@ -2215,9 +2193,7 @@ export class typeProjectTestData extends familyGeneralElement
2215
2193
 
2216
2194
  return this;
2217
2195
  }
2218
- }
2219
- import { familyGeneralElement } from "./0_familyGeneralElement";
2220
- import { is_object } from "../../utils/utils";
2196
+ }
2221
2197
 
2222
2198
  /**
2223
2199
  * Роли в проекте
@@ -2270,9 +2246,7 @@ export class typeProjectUserRole extends familyGeneralElement
2270
2246
 
2271
2247
  return this;
2272
2248
  }
2273
- }
2274
- import { familyGeneralElement } from "./0_familyGeneralElement";
2275
- import { is_object } from "../../utils/utils";
2249
+ }
2276
2250
 
2277
2251
 
2278
2252
  /**
@@ -2348,9 +2322,7 @@ export class typeTask extends familyGeneralElement
2348
2322
 
2349
2323
  return this;
2350
2324
  }
2351
- }
2352
- import { familyGeneralElement } from "./0_familyGeneralElement";
2353
- import { is_object } from "../../utils/utils";
2325
+ }
2354
2326
 
2355
2327
 
2356
2328
  /**
@@ -2453,9 +2425,7 @@ export class typeTeam extends familyGeneralElement
2453
2425
  user_delete() {}
2454
2426
 
2455
2427
  users_get() {}
2456
- }
2457
- import { familyGeneralElement } from "./0_familyGeneralElement";
2458
- import { is_object } from "../../utils/utils";
2428
+ }
2459
2429
 
2460
2430
 
2461
2431
  /**
@@ -2511,9 +2481,7 @@ export class typeTeamMember extends familyGeneralElement
2511
2481
 
2512
2482
  return this;
2513
2483
  }
2514
- }
2515
- import { familyGeneralElement } from "./0_familyGeneralElement";
2516
- import { is_object } from "../../utils/utils";
2484
+ }
2517
2485
 
2518
2486
  /**
2519
2487
  * Роль пользователя в команде
@@ -2567,9 +2535,7 @@ export class typeTeamUserRole extends familyGeneralElement
2567
2535
 
2568
2536
  return this;
2569
2537
  }
2570
- }
2571
- import { familyGeneralElement } from "./0_familyGeneralElement";
2572
- import { echo, is_object } from "../../utils/utils";
2538
+ }
2573
2539
 
2574
2540
 
2575
2541
  /**
@@ -2652,6 +2618,18 @@ export class typeTestCase extends familyGeneralElement
2652
2618
 
2653
2619
  /******************************************************************************************/
2654
2620
 
2621
+ /**
2622
+ *
2623
+ * @version v.0.1 (05/06/2025)
2624
+ *
2625
+ * @returns {string}
2626
+ */
2627
+ get_element_name()
2628
+ {
2629
+ return this.test_case_title;
2630
+ }
2631
+
2632
+
2655
2633
  /**
2656
2634
  *
2657
2635
  * @param {familyGeneralElement|object} payload
@@ -2830,8 +2808,7 @@ export class typeTestCase extends familyGeneralElement
2830
2808
  }
2831
2809
 
2832
2810
 
2833
- }
2834
- import { familyGeneralElement } from "./0_familyGeneralElement";
2811
+ }
2835
2812
 
2836
2813
 
2837
2814
  /**
@@ -2851,9 +2828,7 @@ export class typeTestCaseStep extends familyGeneralElement
2851
2828
  available_enum_values = {
2852
2829
  test_case_step_type: [ 'TEST_CASE_STEP', 'TEST_CASE_PRESTEP' ],
2853
2830
  };
2854
- }
2855
- import { familyGeneralElement } from "./0_familyGeneralElement";
2856
- import { is_object } from "../../utils/utils";
2831
+ }
2857
2832
 
2858
2833
 
2859
2834
  /**
@@ -2886,9 +2861,7 @@ export class typeTestPlan extends familyGeneralElement
2886
2861
 
2887
2862
  return this;
2888
2863
  }
2889
- }
2890
- import { familyGeneralElement } from "./0_familyGeneralElement";
2891
- import { is_object } from "../../utils/utils";
2864
+ }
2892
2865
 
2893
2866
  /**
2894
2867
  * Коллекция тестов для работы, она же parent для typeTestRunResult
@@ -2942,9 +2915,7 @@ export class typeTestRun extends familyGeneralElement
2942
2915
 
2943
2916
  return this;
2944
2917
  }
2945
- }
2946
- import { familyGeneralElement } from "./0_familyGeneralElement";
2947
- import { is_object } from "../../utils/utils";
2918
+ }
2948
2919
 
2949
2920
  /**
2950
2921
  * 1 результат по каждому тест кейсу
@@ -3014,9 +2985,7 @@ export class typeTestRunResult extends familyGeneralElement
3014
2985
 
3015
2986
  return this;
3016
2987
  }
3017
- }
3018
- import { familyGeneralElement } from "./0_familyGeneralElement";
3019
- import { is_object } from "../../utils/utils";
2988
+ }
3020
2989
 
3021
2990
  /**
3022
2991
  * Структурная коллекция тестов
@@ -3100,9 +3069,7 @@ export class typeTestSuite extends familyGeneralElement
3100
3069
  }
3101
3070
 
3102
3071
 
3103
- }
3104
- import { familyGeneralElement } from "./0_familyGeneralElement";
3105
- import { is_object } from "../../utils/utils";
3072
+ }
3106
3073
 
3107
3074
 
3108
3075
  /**
@@ -3156,7 +3123,7 @@ export class typeUser extends familyGeneralElement
3156
3123
 
3157
3124
  return this;
3158
3125
  }
3159
- }
3126
+ }
3160
3127
  /**
3161
3128
  * базовый тип для всех служебных типов
3162
3129
  * @version v.0.1 (26/05/2024)
@@ -3164,8 +3131,7 @@ export class typeUser extends familyGeneralElement
3164
3131
  export class familyService
3165
3132
  {
3166
3133
  //
3167
- }
3168
- import { familyService } from "./familyService";
3134
+ }
3169
3135
 
3170
3136
  /**
3171
3137
  * Общее конфигурирование приложений
@@ -3203,8 +3169,44 @@ export class typeAppConfiguration extends familyService
3203
3169
 
3204
3170
  return this;
3205
3171
  }
3206
- }
3207
- import { familyService } from "./familyService";
3172
+ }
3173
+
3174
+ /**
3175
+ *
3176
+ * @version v.1.0 (25/05/2025)
3177
+ */
3178
+ export class typeFilter extends familyService
3179
+ {
3180
+ object = {
3181
+ attribute : false,
3182
+ };
3183
+ operator;
3184
+ value;
3185
+
3186
+ /**
3187
+ *
3188
+ * @version v.1.0 (25/05/2025)
3189
+ * @param {any} data
3190
+ * @param {boolean} normalize
3191
+ * @return {typeFilter}
3192
+ */
3193
+ constructor(data = null, normalize = false)
3194
+ {
3195
+ super();
3196
+ if (data && typeof data === 'object')
3197
+ {
3198
+ _.mapObject(data, (value, key) =>
3199
+ {
3200
+ if (this.hasOwnProperty(key))
3201
+ {
3202
+ this [ key ] = value;
3203
+ }
3204
+ });
3205
+ }
3206
+
3207
+ return this;
3208
+ }
3209
+ }
3208
3210
 
3209
3211
  /**
3210
3212
  *
@@ -3212,7 +3214,7 @@ import { familyService } from "./familyService";
3212
3214
  */
3213
3215
  export class typeFOR extends familyService
3214
3216
  {
3215
- filter;
3217
+ filters;
3216
3218
  object;
3217
3219
  response;
3218
3220
 
@@ -3239,8 +3241,7 @@ export class typeFOR extends familyService
3239
3241
 
3240
3242
  return this;
3241
3243
  }
3242
- }
3243
- import { familyService } from "./familyService";
3244
+ }
3244
3245
 
3245
3246
  /**
3246
3247
  * Описание стандартного колбека типового для методов
@@ -3279,9 +3280,7 @@ export class typeFunctionCallback extends familyService
3279
3280
 
3280
3281
  return this;
3281
3282
  }
3282
- }
3283
- import { familyService } from "./familyService";
3284
- import { is_object } from "../../utils/utils";
3283
+ }
3285
3284
 
3286
3285
  /**
3287
3286
  * Уведомления
@@ -3315,8 +3314,7 @@ export class typeNotification extends familyService
3315
3314
 
3316
3315
  return this;
3317
3316
  }
3318
- }
3319
- import { familyService } from "./familyService";
3317
+ }
3320
3318
 
3321
3319
  /**
3322
3320
  *
@@ -3352,8 +3350,7 @@ export class typeTableColumn extends familyService
3352
3350
 
3353
3351
  return this;
3354
3352
  }
3355
- }
3356
- import { typeAppConfiguration } from "./typeAppConfiguration";
3353
+ }
3357
3354
 
3358
3355
  /**
3359
3356
  * Настройки таблиц (aggrid)
@@ -3408,7 +3405,7 @@ export class typeTableConfiguration extends typeAppConfiguration
3408
3405
 
3409
3406
  return this;
3410
3407
  }
3411
- }
3408
+ }
3412
3409
  /**
3413
3410
  *
3414
3411
  * @version v.0.1 (02/07/2024)
@@ -3421,9 +3418,7 @@ export class abstractMockData
3421
3418
  {
3422
3419
  this.mock_data_type = mock_data_type;
3423
3420
  }
3424
- }
3425
- import { abstractMockData } from "./abstract_mock_data";
3426
- import { count, is_object } from "../../../utils/utils";
3421
+ }
3427
3422
 
3428
3423
 
3429
3424
  /**