@blueking/ai-ui-sdk 0.1.19-beta.4 → 0.1.19-beta.40

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 (162) hide show
  1. package/dist/common/util.d.ts +24 -0
  2. package/dist/common/util.ts.js +41 -0
  3. package/dist/components/render-auth/auth-dialog.script.vue.js.js +27 -26
  4. package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
  5. package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
  6. package/dist/components/render-auto-refresh/index.vue.css +9 -8
  7. package/dist/components/render-auto-refresh/index.vue.js +1 -1
  8. package/dist/components/render-checkbox/index.vue.css +9 -9
  9. package/dist/components/render-checkbox/index.vue.js +1 -1
  10. package/dist/components/render-choose-tag/index.script.vue.js.js +129 -92
  11. package/dist/components/render-choose-tag/index.vue.css +7 -7
  12. package/dist/components/render-choose-tag/index.vue.d.ts +4 -0
  13. package/dist/components/render-choose-tag/index.vue.js +1 -1
  14. package/dist/components/render-collapse/index.vue.css +2 -2
  15. package/dist/components/render-collapse/index.vue.js +1 -1
  16. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.script.vue.js +86 -0
  17. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.css +16 -0
  18. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.d.ts +16 -0
  19. package/dist/components/render-dataset/components/batch-delete-dataset-data/index.vue.js +5 -0
  20. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.script.vue.js.js +133 -0
  21. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.css +4 -0
  22. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.d.ts +16 -0
  23. package/dist/components/render-dataset/components/batch-edit-valid-dataset-data/index.vue.js +5 -0
  24. package/dist/components/render-dataset/components/dataset-data-status/index.script.vue.js.js +6 -8
  25. package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
  26. package/dist/components/render-dataset/components/dataset-data-valid/index.script.vue.js.js +176 -0
  27. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.css +4 -0
  28. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.d.ts +16 -0
  29. package/dist/components/render-dataset/components/dataset-data-valid/index.vue.js +5 -0
  30. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
  31. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
  32. package/dist/components/render-dataset/components/operation-record/index.script.vue.js.js +36 -1
  33. package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
  34. package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
  35. package/dist/components/render-dataset/components/operation-record/table/index.script.vue.js +174 -0
  36. package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
  37. package/dist/components/render-dataset/components/operation-record/table/index.vue.d.ts +5 -1
  38. package/dist/components/render-dataset/components/operation-record/table/index.vue.js +2 -2
  39. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
  40. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
  41. package/dist/components/render-dataset/components/plus-dataset/dataset-form.script.vue.js +39 -44
  42. package/dist/components/render-dataset/components/plus-dataset/index.script.vue.js.js +26 -8
  43. package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
  44. package/dist/components/render-dataset/components/plus-dataset/index.vue.d.ts +2 -2
  45. package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
  46. package/dist/components/render-dataset/components/plus-dataset-data/form/api.script.vue.js.js +21 -29
  47. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
  48. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
  49. package/dist/components/render-dataset/components/plus-dataset-data/form/dataset.script.vue.js.js +4 -1
  50. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
  51. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
  52. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -2
  53. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
  54. package/dist/components/render-dataset/components/plus-dataset-data/index.script.vue.js.js +8 -3
  55. package/dist/components/render-dataset/components/plus-dataset-data/index.vue.d.ts +3 -2
  56. package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
  57. package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
  58. package/dist/components/render-dataset/components/search-dataset/index.script.vue.js.js +21 -31
  59. package/dist/components/render-dataset/components/search-dataset/index.vue.d.ts +1 -0
  60. package/dist/components/render-dataset/components/search-dataset-data/index.script.vue.js.js +14 -0
  61. package/dist/components/render-dataset-detail/components/header.script.vue.js.js +1 -1
  62. package/dist/components/render-dataset-detail-origin-data/components/batch-operation/index.script.vue.js.js +61 -39
  63. package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js +259 -388
  64. package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.d.ts +3 -1
  65. package/dist/components/render-dataset-detail-origin-data/index.script.vue.js.js +8 -7
  66. package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
  67. package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
  68. package/dist/components/render-dataset-list/components/header.script.vue.js.js +6 -3
  69. package/dist/components/render-dataset-list/components/header.vue.d.ts +4 -1
  70. package/dist/components/render-dataset-list/components/main.script.vue.js.js +38 -14
  71. package/dist/components/render-dataset-list/components/main.vue.css +4 -4
  72. package/dist/components/render-dataset-list/components/main.vue.d.ts +12 -5
  73. package/dist/components/render-dataset-list/components/main.vue.js +1 -1
  74. package/dist/components/render-dataset-list/components/table.script.vue.js +405 -0
  75. package/dist/components/render-dataset-list/components/table.vue.d.ts +13 -2
  76. package/dist/components/render-dataset-list/components/table.vue.js +1 -1
  77. package/dist/components/render-dataset-list/index.script.vue.js.js +37 -16
  78. package/dist/components/render-dataset-list/index.vue.css +4 -1
  79. package/dist/components/render-dataset-list/index.vue.d.ts +2 -6
  80. package/dist/components/render-dataset-list/index.vue.js +1 -1
  81. package/dist/components/render-dropdown/index.script.vue.js.js +171 -0
  82. package/dist/components/render-dropdown/index.vue.css +29 -0
  83. package/dist/components/render-dropdown/index.vue.d.ts +64 -0
  84. package/dist/components/render-dropdown/index.vue.js +4 -0
  85. package/dist/components/render-file-card/index.script.vue.js.js +5 -15
  86. package/dist/components/render-file-card/index.vue.css +11 -11
  87. package/dist/components/render-file-card/index.vue.js +1 -1
  88. package/dist/components/render-file-type-icon/index.vue.css +5 -5
  89. package/dist/components/render-file-type-icon/index.vue.js +1 -1
  90. package/dist/components/render-header/index.script.vue.js.js +11 -3
  91. package/dist/components/render-header/index.vue.css +3 -3
  92. package/dist/components/render-header/index.vue.d.ts +1 -1
  93. package/dist/components/render-header/index.vue.js +1 -1
  94. package/dist/components/render-like/index.script.vue.js.js +3 -3
  95. package/dist/components/render-like/index.vue.css +14 -13
  96. package/dist/components/render-like/index.vue.js +1 -1
  97. package/dist/components/render-router-tab/index.vue.css +4 -4
  98. package/dist/components/render-router-tab/index.vue.js +1 -1
  99. package/dist/components/render-search-empty/index.script.vue.js.js +61 -0
  100. package/dist/components/render-search-empty/index.vue.d.ts +20 -0
  101. package/dist/components/render-search-empty/index.vue.js +3 -0
  102. package/dist/components/render-search-select/index.script.vue.js.js +1 -0
  103. package/dist/components/render-t-table/index.script.vue.js +351 -0
  104. package/dist/components/render-t-table/index.vue.css +208 -0
  105. package/dist/components/render-t-table/index.vue.d.ts +59 -0
  106. package/dist/components/render-t-table/index.vue.js +5 -0
  107. package/dist/components/render-tag-tree/index.script.vue.js.js +112 -26
  108. package/dist/components/render-tag-tree/index.vue.css +7 -7
  109. package/dist/components/render-tag-tree/index.vue.d.ts +7 -3
  110. package/dist/components/render-tag-tree/index.vue.js +1 -1
  111. package/dist/components/render-tree/index.script.vue.js +17 -8
  112. package/dist/components/render-tree/index.vue.d.ts +4 -1
  113. package/dist/components.d.ts +4 -1
  114. package/dist/components.ts.js +4 -1
  115. package/dist/css/fonts/iconcool.eot +0 -0
  116. package/dist/css/fonts/iconcool.svg +5 -2
  117. package/dist/css/fonts/iconcool.ttf +0 -0
  118. package/dist/css/fonts/iconcool.woff +0 -0
  119. package/dist/css/iconcool.js +1 -1
  120. package/dist/css/style.css +5 -2
  121. package/dist/css/tailwind.css +105 -11
  122. package/dist/hooks/use-chat.d.ts +14 -4
  123. package/dist/hooks/use-common-http.d.ts +5 -2
  124. package/dist/hooks/use-common-http.ts.js +8 -6
  125. package/dist/hooks/use-dataset-http.d.ts +6 -4
  126. package/dist/hooks/use-dataset-http.ts.js +17 -6
  127. package/dist/hooks/use-ellipsis-tooltip.d.ts +3 -0
  128. package/dist/hooks/use-ellipsis-tooltip.ts.js +86 -0
  129. package/dist/hooks/use-member-http.d.ts +8 -0
  130. package/dist/hooks/use-member-http.ts.js +30 -0
  131. package/dist/hooks/use-meta-http.d.ts +3 -3
  132. package/dist/hooks/use-meta-http.ts.js +9 -5
  133. package/dist/hooks/use-style.d.ts +1 -0
  134. package/dist/hooks/use-style.ts.js +1 -0
  135. package/dist/hooks/use-t-table.d.ts +39 -0
  136. package/dist/hooks/use-t-table.ts.js +82 -0
  137. package/dist/hooks.d.ts +3 -0
  138. package/dist/hooks.ts.js +3 -0
  139. package/dist/http/fetch/index.ts.js +3 -2
  140. package/dist/http/helper/agent.d.ts +13 -1
  141. package/dist/http/helper/agent.ts.js +69 -24
  142. package/dist/http/helper/common.ts.js +4 -4
  143. package/dist/http/helper/dataset.d.ts +7 -1
  144. package/dist/http/helper/dataset.ts.js +20 -4
  145. package/dist/http/helper/knowledge.ts.js +9 -3
  146. package/dist/http/helper/tool.ts.js +7 -4
  147. package/dist/images/market.png +0 -0
  148. package/dist/transforms.d.ts +1 -0
  149. package/dist/transforms.ts.js +1 -0
  150. package/dist/types/agent.d.ts +41 -24
  151. package/dist/types/common.d.ts +28 -1
  152. package/dist/types/dataset.d.ts +16 -0
  153. package/dist/types/enum.d.ts +15 -2
  154. package/dist/types/enum.ts.js +16 -1
  155. package/dist/types/knowledge.d.ts +6 -0
  156. package/dist/types/model.d.ts +4 -4
  157. package/dist/types/tool.d.ts +5 -3
  158. package/dist/util.d.ts +1 -0
  159. package/dist/util.ts.js +1 -0
  160. package/package.json +11 -2
  161. package/dist/components/render-dataset/components/operation-record/table/index.script.vue.js.js +0 -226
  162. package/dist/components/render-dataset-list/components/table.script.vue.js.js +0 -580
@@ -22,15 +22,23 @@
22
22
  .g-flex-column {
23
23
  display: flex;
24
24
  flex-direction: column;
25
- align-items: center;
25
+ align-items: initial !important;
26
+ }
27
+
28
+ .g-align-center {
29
+ align-items: center !important;
26
30
  }
27
31
 
28
32
  .g-align-start {
29
- align-items: flex-start;
33
+ align-items: flex-start !important;
34
+ }
35
+
36
+ .g-align-end {
37
+ align-items: end;
30
38
  }
31
39
 
32
40
  .g-align-self-center {
33
- align-self: center;
41
+ align-self: center !important;
34
42
  }
35
43
 
36
44
  .g-justify-between {
@@ -45,6 +53,10 @@
45
53
  justify-content: end;
46
54
  }
47
55
 
56
+ .g-justify-start {
57
+ justify-content: start;
58
+ }
59
+
48
60
  .g-overflow-hidden {
49
61
  overflow: hidden;
50
62
  }
@@ -74,6 +86,10 @@
74
86
  padding: 4px;
75
87
  }
76
88
 
89
+ .g-p-12 {
90
+ padding: 12px;
91
+ }
92
+
77
93
  .g-p-24 {
78
94
  padding: 24px;
79
95
  }
@@ -134,10 +150,6 @@
134
150
  margin-top: 25px;
135
151
  }
136
152
 
137
- .g-mt-30 {
138
- margin-top: 30px;
139
- }
140
-
141
153
  .g-mt-100 {
142
154
  margin-top: 100px;
143
155
  }
@@ -362,6 +374,14 @@
362
374
  padding-right: 5px !important;
363
375
  }
364
376
 
377
+ .g-pr-8 {
378
+ padding-right: 8px;
379
+ }
380
+
381
+ .g-pr-14 {
382
+ padding-right: 14px;
383
+ }
384
+
365
385
  .g-pr-16 {
366
386
  padding-right: 16px !important;
367
387
  }
@@ -374,10 +394,18 @@
374
394
  padding-top: 4px;
375
395
  }
376
396
 
397
+ .g-pt-8 {
398
+ padding-top: 8px;
399
+ }
400
+
377
401
  .g-pt-12 {
378
402
  padding-top: 12px;
379
403
  }
380
404
 
405
+ .g-pt-14 {
406
+ padding-top: 14px;
407
+ }
408
+
381
409
  .g-pt-16 {
382
410
  padding-top: 16px;
383
411
  }
@@ -402,10 +430,22 @@
402
430
  padding-bottom: 4px;
403
431
  }
404
432
 
433
+ .g-pb-8 {
434
+ padding-bottom: 8px;
435
+ }
436
+
437
+ .g-pb-10 {
438
+ padding-bottom: 10px;
439
+ }
440
+
405
441
  .g-pb-12 {
406
442
  padding-bottom: 12px;
407
443
  }
408
444
 
445
+ .g-pb-14 {
446
+ padding-bottom: 14px;
447
+ }
448
+
409
449
  .g-pb-16 {
410
450
  padding-bottom: 16px;
411
451
  }
@@ -426,6 +466,14 @@
426
466
  padding: 0 3px;
427
467
  }
428
468
 
469
+ .g-w-auto {
470
+ width: auto !important;
471
+ }
472
+
473
+ .g-w-0 {
474
+ width: 0 !important;
475
+ }
476
+
429
477
  .g-w-8 {
430
478
  width: 8px;
431
479
  }
@@ -438,6 +486,10 @@
438
486
  width: 20px;
439
487
  }
440
488
 
489
+ .g-w-220 {
490
+ width: 220px !important;
491
+ }
492
+
441
493
  .g-w-380 {
442
494
  width: 380px !important;
443
495
  }
@@ -483,7 +535,7 @@
483
535
  }
484
536
 
485
537
  .g-text-18 {
486
- font-size: 18px;
538
+ font-size: 18px !important;
487
539
  }
488
540
 
489
541
  .g-text-20 {
@@ -614,8 +666,8 @@
614
666
  width: 108px;
615
667
  }
616
668
 
617
- .g-width-6rem {
618
- width: 6rem !important;
669
+ .g-width-5rem {
670
+ width: 5rem !important;
619
671
  }
620
672
 
621
673
  .g-height-max-600 {
@@ -654,6 +706,22 @@
654
706
  height: 42px;
655
707
  }
656
708
 
709
+ .g-height-56 {
710
+ height: 56px;
711
+ }
712
+
713
+ .g-height-60 {
714
+ height: 60px;
715
+ }
716
+
717
+ .g-height-70 {
718
+ height: 70px;
719
+ }
720
+
721
+ .g-height-78 {
722
+ height: 78px;
723
+ }
724
+
657
725
  .g-height-60 {
658
726
  height: 60px;
659
727
  }
@@ -700,7 +768,7 @@
700
768
 
701
769
  .g-hover-text-blue {
702
770
  &:hover {
703
- color: #3a84ff;
771
+ color: #3a84ff !important;
704
772
  }
705
773
  }
706
774
 
@@ -722,6 +790,12 @@
722
790
  }
723
791
  }
724
792
 
793
+ .g-hover-text-normal {
794
+ &:hover {
795
+ color: #4d4f56;
796
+ }
797
+ }
798
+
725
799
  .g-hover-border-blue {
726
800
  &:hover {
727
801
  border: 1px solid #3a84ff !important;
@@ -850,6 +924,10 @@
850
924
  column-gap: 16px;
851
925
  }
852
926
 
927
+ .g-gap-x-20 {
928
+ column-gap: 20px;
929
+ }
930
+
853
931
  .g-gap-x-21 {
854
932
  column-gap: 21px;
855
933
  }
@@ -931,3 +1009,19 @@
931
1009
  .g-rounded-2 {
932
1010
  border-radius: 2px;
933
1011
  }
1012
+
1013
+ .g-z-index-9999 {
1014
+ z-index: 9999 !important;
1015
+ }
1016
+
1017
+ .g-fill-current-color {
1018
+ fill: currentColor;
1019
+ }
1020
+
1021
+ .g-line-clamp-3 {
1022
+ display: -webkit-box !important;
1023
+ -webkit-box-orient: vertical !important;
1024
+ -webkit-line-clamp: 3 !important;
1025
+ overflow: hidden !important;
1026
+ word-break: break-word;
1027
+ }
@@ -92,10 +92,11 @@ export declare const useChat: ({ handleStart, handleText, handleReferenceDoc, ha
92
92
  }[];
93
93
  creator: string;
94
94
  createTime: string;
95
- updateTime: string;
95
+ updatedBy?: string;
96
+ updatedAt?: string;
96
97
  toolCode: string;
97
98
  toolName: string;
98
- icon: string;
99
+ tagNames: string[][];
99
100
  description: string;
100
101
  method: string;
101
102
  url: string;
@@ -302,6 +303,8 @@ export declare const useChat: ({ handleStart, handleText, handleReferenceDoc, ha
302
303
  };
303
304
  }[];
304
305
  };
306
+ approvers?: string[];
307
+ ticketUrl?: string;
305
308
  }[];
306
309
  knowledgebases?: {
307
310
  id?: number;
@@ -329,6 +332,7 @@ export declare const useChat: ({ handleStart, handleText, handleReferenceDoc, ha
329
332
  folderNumber?: number;
330
333
  url?: string;
331
334
  updatedBy?: string;
335
+ updatedAt?: string;
332
336
  indexConfig?: {
333
337
  vector_indexes: {
334
338
  index_name: string;
@@ -425,6 +429,7 @@ export declare const useChat: ({ handleStart, handleText, handleReferenceDoc, ha
425
429
  folderNumber?: number;
426
430
  url?: string;
427
431
  updatedBy?: string;
432
+ updatedAt?: string;
428
433
  indexConfig?: {
429
434
  vector_indexes: {
430
435
  index_name: string;
@@ -582,10 +587,11 @@ export declare const useChat: ({ handleStart, handleText, handleReferenceDoc, ha
582
587
  }[];
583
588
  creator: string;
584
589
  createTime: string;
585
- updateTime: string;
590
+ updatedBy?: string;
591
+ updatedAt?: string;
586
592
  toolCode: string;
587
593
  toolName: string;
588
- icon: string;
594
+ tagNames: string[][];
589
595
  description: string;
590
596
  method: string;
591
597
  url: string;
@@ -792,6 +798,8 @@ export declare const useChat: ({ handleStart, handleText, handleReferenceDoc, ha
792
798
  };
793
799
  }[];
794
800
  };
801
+ approvers?: string[];
802
+ ticketUrl?: string;
795
803
  }[];
796
804
  knowledgebases?: {
797
805
  id?: number;
@@ -819,6 +827,7 @@ export declare const useChat: ({ handleStart, handleText, handleReferenceDoc, ha
819
827
  folderNumber?: number;
820
828
  url?: string;
821
829
  updatedBy?: string;
830
+ updatedAt?: string;
822
831
  indexConfig?: {
823
832
  vector_indexes: {
824
833
  index_name: string;
@@ -915,6 +924,7 @@ export declare const useChat: ({ handleStart, handleText, handleReferenceDoc, ha
915
924
  folderNumber?: number;
916
925
  url?: string;
917
926
  updatedBy?: string;
927
+ updatedAt?: string;
918
928
  indexConfig?: {
919
929
  vector_indexes: {
920
930
  index_name: string;
@@ -1,5 +1,8 @@
1
1
  import { type Ref } from 'vue';
2
- import { GroupType, Module } from '@/types/enum';
2
+ import { EnumCharacter, GroupType, Module } from '@/types/enum';
3
3
  export declare const useCommonHttp: (apiPrefix: string, spaceId?: Ref<string>) => {
4
- getTagTree: (module: Module, subModule: Module, tagName: string, groupType?: GroupType) => Promise<import("@/types/common").ITagTree>;
4
+ getTagTree: {
5
+ (module: Module, subModule: Module, tagName: string, groupType?: GroupType, generateType?: EnumCharacter): Promise<import("@/types/common").ITagTree>;
6
+ abort(): void;
7
+ };
5
8
  };
@@ -1,15 +1,17 @@
1
- import fetch from '../http/fetch/index.ts.js';
1
+ import fetch, { withAbort } from '../http/fetch/index.ts.js';
2
2
  import { transferTagTreeApiToTagTree } from '../http/helper/common.ts.js';
3
3
  export const useCommonHttp = (apiPrefix, spaceId)=>{
4
- // 获取标签树
5
- const getTagTree = (module, subModule, tagName, groupType)=>fetch.get(`${apiPrefix}/${module}/v1/${subModule}/tag_tree/`, {
4
+ // 获取资源标签树
5
+ const getTagTree = withAbort((signal, module, subModule, tagName, groupType, generateType)=>fetch.get(`${apiPrefix}/${module}/v1/${subModule}/tag_tree/`, {
6
6
  tag_name: tagName,
7
- group_type: groupType
7
+ group_type: groupType,
8
+ generate_type: generateType
8
9
  }, {
9
10
  headers: {
10
11
  'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
11
- }
12
- }).then((data)=>transferTagTreeApiToTagTree(data));
12
+ },
13
+ signal
14
+ }).then((data)=>transferTagTreeApiToTagTree(data)));
13
15
  return {
14
16
  getTagTree
15
17
  };
@@ -1,5 +1,6 @@
1
1
  import { type Ref } from 'vue';
2
- import type { IBatchRetryReviewDatasetData, IBatchReviewDatasetData, IComponent, IDatasetApi, IDatasetDataApi, IDatasetDataForm, IDatasetDataParam, IDatasetForm, IDatasetInfo, IDatasetListParam, IDatasetStatusInfo, IOperatRecordParam, ISchema, IUserInfoForm } from '@/types/dataset';
2
+ import type { IBatchRetryReviewDatasetData, IBatchReviewDatasetData, IBatchUpdateDatasetDataValidity, IComponent, IDatasetApi, IDatasetDataApi, IDatasetDataForm, IDatasetDataParam, IDatasetForm, IDatasetInfo, IDatasetListParam, IDatasetStatusInfo, IOperatRecordParam, ISchema, IUserInfoForm } from '@/types/dataset';
3
+ import { Module } from '@/types/enum';
3
4
  import type { ITagApi } from '@/types/meta';
4
5
  export declare const useDatasetHttp: (apiPrefix?: string, spaceId?: Ref<string>) => {
5
6
  getCompanyList: () => Promise<import("@/types/dataset").ICompany[]>;
@@ -45,7 +46,8 @@ export declare const useDatasetHttp: (apiPrefix?: string, spaceId?: Ref<string>)
45
46
  }>;
46
47
  batchReviewDatasetData: (data: IBatchReviewDatasetData) => Promise<unknown>;
47
48
  batchRetryReviewDatasetData: (data: IBatchRetryReviewDatasetData) => Promise<unknown>;
48
- getTags: () => Promise<import("@/types/meta").ITag[]>;
49
- plusTag: (tagNames: string[][]) => Promise<ITagApi>;
50
- checkTag: (tagNames: string[][]) => Promise<boolean>;
49
+ batchUpdateDatasetDataValidity: (data: IBatchUpdateDatasetDataValidity) => Promise<unknown>;
50
+ getTags: (module: Module) => Promise<import("@/types/meta").ITag[]>;
51
+ plusTag: (tagNames: string[][], module: Module) => Promise<ITagApi>;
52
+ checkTag: (tagNames: string[][], module: Module) => Promise<boolean>;
51
53
  };
@@ -1,5 +1,5 @@
1
1
  import fetch from '../http/fetch/index.ts.js';
2
- import { transferBatchRetryReviewDatasetData2BatchRetryReviewDatasetDataApi, transferBatchReviewDatasetData2BatchReviewDatasetDataApi, transferCompanyApi2Company, transferCompanyParticipantApi2CompanyParticipantList, transferCreateDatasetDataResultApi2CreateDatasetDataResult, transferDatasetApi2Dataset, transferDatasetApiGuideApi2DatasetApiGuide, transferDatasetDataApi2DatasetData, transferDatasetDataFileApi2DatasetDataFile, transferDatasetDataForm2DatasetDataFormApi, transferDatasetDataParam2DatasetDataParamApi, transferDatasetForm2DatasetFormApi, transferDatasetListParam2DatasetListParamApi, transferOperatRecordApi2OperatRecord, transferOperatRecordParam2OperatRecordParamApi, transferUserInfoApi2UserInfo, transferUserInfoForm2UserInfoFormApi } from '../http/helper/dataset.ts.js';
2
+ import { transferBatchRetryReviewDatasetData2BatchRetryReviewDatasetDataApi, transferBatchReviewDatasetData2BatchReviewDatasetDataApi, transferBatchUpdateDatasetDataValidity2BatchUpdateDatasetDataValidityApi, transferCompanyApi2Company, transferCompanyParticipantApi2CompanyParticipantList, transferCreateDatasetDataResultApi2CreateDatasetDataResult, transferDatasetApi2Dataset, transferDatasetApiGuideApi2DatasetApiGuide, transferDatasetDataApi2DatasetData, transferDatasetDataFileApi2DatasetDataFile, transferDatasetDataForm2DatasetDataFormApi, transferDatasetDataParam2DatasetDataParamApi, transferDatasetForm2DatasetFormApi, transferDatasetListParam2DatasetListParamApi, transferOperatRecordApi2OperatRecord, transferOperatRecordParam2OperatRecordParamApi, transferUserInfoApi2UserInfo, transferUserInfoForm2UserInfoFormApi } from '../http/helper/dataset.ts.js';
3
3
  import { transferTagApi2Tag } from '../http/helper/meta.ts.js';
4
4
  const datasetPerfix = 'dataset/v1';
5
5
  const metaPerfix = 'meta/v1';
@@ -201,15 +201,24 @@ export const useDatasetHttp = (apiPrefix, spaceId)=>{
201
201
  'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
202
202
  }
203
203
  });
204
+ // 批量修改有效性
205
+ const batchUpdateDatasetDataValidity = (data)=>fetch.post(`${apiPrefix}/${datasetPerfix}/dataset_item/batch_valid/`, transferBatchUpdateDatasetDataValidity2BatchUpdateDatasetDataValidityApi(data), {
206
+ headers: {
207
+ 'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
208
+ }
209
+ });
204
210
  // 获取tag列表
205
- const getTags = ()=>fetch.get(`${apiPrefix}/${datasetPerfix}/tag/`, undefined, {
211
+ const getTags = (module)=>fetch.get(`${apiPrefix}/${datasetPerfix}/tag/`, {
212
+ scope_name: module
213
+ }, {
206
214
  headers: {
207
215
  'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
208
216
  }
209
217
  }).then((result)=>result.map(transferTagApi2Tag));
210
218
  // 新增 tag
211
- const plusTag = (tagNames)=>fetch.post(`${apiPrefix}/${datasetPerfix}/tag/`, {
212
- tag_names: tagNames
219
+ const plusTag = (tagNames, module)=>fetch.post(`${apiPrefix}/${datasetPerfix}/tag/`, {
220
+ tag_names: tagNames,
221
+ scope_name: module
213
222
  }, {
214
223
  globalError: false,
215
224
  headers: {
@@ -217,8 +226,9 @@ export const useDatasetHttp = (apiPrefix, spaceId)=>{
217
226
  }
218
227
  });
219
228
  // check tag
220
- const checkTag = (tagNames)=>fetch.post(`${apiPrefix}/${datasetPerfix}/tag/check/`, {
221
- tag_names: tagNames
229
+ const checkTag = (tagNames, module)=>fetch.post(`${apiPrefix}/${datasetPerfix}/tag/check/`, {
230
+ tag_names: tagNames,
231
+ scope_name: module
222
232
  }, {
223
233
  globalError: false,
224
234
  headers: {
@@ -254,6 +264,7 @@ export const useDatasetHttp = (apiPrefix, spaceId)=>{
254
264
  getCompanyParticipantList,
255
265
  batchReviewDatasetData,
256
266
  batchRetryReviewDatasetData,
267
+ batchUpdateDatasetDataValidity,
257
268
  getTags,
258
269
  plusTag,
259
270
  checkTag
@@ -0,0 +1,3 @@
1
+ export declare const useEllipsisTooltip: () => {
2
+ handleInitEllipsisTooltip: () => void;
3
+ };
@@ -0,0 +1,86 @@
1
+ import tippy from 'tippy.js';
2
+ // 全局事件代理,如果文本溢出,则显示 tooltip
3
+ export const useEllipsisTooltip = ()=>{
4
+ let tippyInstance = null;
5
+ const handleInitEllipsisTooltip = ()=>{
6
+ handleInitEvent();
7
+ handleInitStyle();
8
+ };
9
+ const handleInitEvent = ()=>{
10
+ document.addEventListener('mouseenter', handleMouseEnter, true);
11
+ };
12
+ const handleInitStyle = ()=>{
13
+ const style = document.createElement('style');
14
+ style.textContent = `
15
+ .tippy-box[data-theme~='ellipsis-tooltip'] .tippy-content {
16
+ font-size: 12px !important;
17
+ padding: 7px 14px !important;
18
+ white-space: pre-wrap !important;
19
+ max-height: 400px;
20
+ overflow-y: auto;
21
+ }
22
+ .tippy-box[data-theme~='ellipsis-tooltip'] .tippy-content::-webkit-scrollbar {
23
+ width: 6px;
24
+ height: 6px;
25
+ }
26
+ .tippy-box[data-theme~='ellipsis-tooltip'] .tippy-content::-webkit-scrollbar-thumb {
27
+ width: 6px;
28
+ height: 6px;
29
+ border-radius: 3px;
30
+ background-color: #dcdee5;
31
+
32
+ &:hover {
33
+ background-color: #979ba5;
34
+ }
35
+ }
36
+ .tippy-box[data-theme~='ellipsis-tooltip'][data-placement^=top]>.tippy-arrow:before {
37
+ bottom: -5px !important;
38
+ }
39
+ .tippy-box[data-theme~='ellipsis-tooltip'][data-placement^=bottom]>.tippy-arrow:before {
40
+ top: -5px !important;
41
+ }
42
+ `;
43
+ document.head.appendChild(style);
44
+ };
45
+ const handleMouseEnter = (event)=>{
46
+ var _target_hasAttribute;
47
+ const target = event.target;
48
+ // 没有标识,什么都不做
49
+ if (!(target === null || target === void 0 ? void 0 : (_target_hasAttribute = target.hasAttribute) === null || _target_hasAttribute === void 0 ? void 0 : _target_hasAttribute.call(target, 'data-ellipsis-tooltip'))) return;
50
+ const isOverflow = target.scrollWidth > target.clientWidth || target.scrollHeight > target.clientHeight;
51
+ // 没有溢出,什么都不做
52
+ if (!isOverflow) return;
53
+ const computedStyle = window.getComputedStyle(target);
54
+ const hasScrollbar = computedStyle.overflowX === 'scroll' || computedStyle.overflowX === 'auto' || computedStyle.overflowY === 'scroll' || computedStyle.overflowY === 'auto' || computedStyle.overflow === 'scroll' || computedStyle.overflow === 'auto';
55
+ // 如果有滚动条,不显示 tooltip
56
+ if (hasScrollbar) return;
57
+ // 如果有旧实例,先销毁
58
+ if (tippyInstance) {
59
+ tippyInstance.destroy();
60
+ tippyInstance = null;
61
+ }
62
+ tippyInstance = tippy(target, {
63
+ content: target.getAttribute('data-ellipsis-tooltip') || target.textContent,
64
+ interactive: true,
65
+ arrow: true,
66
+ appendTo: ()=>document.body,
67
+ hideOnClick: false,
68
+ offset: [
69
+ 0,
70
+ 2
71
+ ],
72
+ theme: 'ellipsis-tooltip',
73
+ onHidden: (instance)=>{
74
+ // tooltip 隐藏后销毁实例
75
+ instance.destroy();
76
+ if (tippyInstance === instance) {
77
+ tippyInstance = null;
78
+ }
79
+ }
80
+ });
81
+ tippyInstance.show();
82
+ };
83
+ return {
84
+ handleInitEllipsisTooltip
85
+ };
86
+ };
@@ -0,0 +1,8 @@
1
+ interface IMember {
2
+ id: string;
3
+ name: string;
4
+ }
5
+ export declare const useMemberHttp: () => {
6
+ getMemberList: (memberUrl: string, search: string) => Promise<IMember[]>;
7
+ };
8
+ export {};
@@ -0,0 +1,30 @@
1
+ import { Message } from 'bkui-vue';
2
+ export const useMemberHttp = ()=>{
3
+ const getMemberList = (memberUrl, search)=>{
4
+ return new Promise((resolve, reject)=>{
5
+ const callback = `jsonp_init_bk_member_${Math.ceil(Math.random() * 1000)}`;
6
+ const script = document.createElement('script');
7
+ script.src = `${memberUrl}?callback=${callback}&app_code=bk-magicbox&fuzzy_lookups=${search}`;
8
+ script.onerror = reject;
9
+ document.body.appendChild(script);
10
+ // @ts-ignore
11
+ window[callback] = (res)=>{
12
+ if (!res.code) {
13
+ resolve(res.data.results.map((item)=>({
14
+ id: item.username,
15
+ name: `${item.username}(${item.display_name})`
16
+ })));
17
+ } else {
18
+ reject(res.message);
19
+ Message({
20
+ theme: 'error',
21
+ message: res.message
22
+ });
23
+ }
24
+ };
25
+ });
26
+ };
27
+ return {
28
+ getMemberList
29
+ };
30
+ };
@@ -10,7 +10,7 @@ export declare const useMetaHttp: (apiPrefix: string, spaceId?: Ref<string>) =>
10
10
  data: boolean;
11
11
  message: string;
12
12
  }>;
13
- getTags: () => Promise<import("@/types/meta").ITag[]>;
14
- plusTag: (tagNames: string[][]) => Promise<ITagApi>;
15
- checkTag: (tagNames: string[][]) => Promise<boolean>;
13
+ getTags: (module: Module) => Promise<import("@/types/meta").ITag[]>;
14
+ plusTag: (tagNames: string[][], module: Module) => Promise<ITagApi>;
15
+ checkTag: (tagNames: string[][], module: Module) => Promise<boolean>;
16
16
  };
@@ -51,14 +51,17 @@ export const useMetaHttp = (apiPrefix, spaceId)=>{
51
51
  }
52
52
  });
53
53
  // 获取tag列表
54
- const getTags = ()=>fetch.get(`${apiPrefix}/${metaPerfix}/tag/`, undefined, {
54
+ const getTags = (module)=>fetch.get(`${apiPrefix}/${metaPerfix}/tag/`, {
55
+ scope_name: module
56
+ }, {
55
57
  headers: {
56
58
  'x-space-id': spaceId === null || spaceId === void 0 ? void 0 : spaceId.value
57
59
  }
58
60
  }).then((result)=>result.map(transferTagApi2Tag));
59
61
  // 新增 tag
60
- const plusTag = (tagNames)=>fetch.post(`${apiPrefix}/${metaPerfix}/tag/`, {
61
- tag_names: tagNames
62
+ const plusTag = (tagNames, module)=>fetch.post(`${apiPrefix}/${metaPerfix}/tag/`, {
63
+ tag_names: tagNames,
64
+ scope_name: module
62
65
  }, {
63
66
  globalError: false,
64
67
  headers: {
@@ -66,8 +69,9 @@ export const useMetaHttp = (apiPrefix, spaceId)=>{
66
69
  }
67
70
  });
68
71
  // check tag
69
- const checkTag = (tagNames)=>fetch.post(`${apiPrefix}/${metaPerfix}/tag/check/`, {
70
- tag_names: tagNames
72
+ const checkTag = (tagNames, module)=>fetch.post(`${apiPrefix}/${metaPerfix}/tag/check/`, {
73
+ tag_names: tagNames,
74
+ scope_name: module
71
75
  }, {
72
76
  globalError: false,
73
77
  headers: {
@@ -1,4 +1,5 @@
1
1
  import '../css/tailwind.css';
2
2
  import '../css/style.css';
3
3
  import '../css/iconcool.js';
4
+ import 'tippy.js/dist/tippy.css';
4
5
  export declare const useStyle: () => void;
@@ -3,6 +3,7 @@ import { useThink } from './use-think.ts.js';
3
3
  import '../css/tailwind.css';
4
4
  import '../css/style.css';
5
5
  import '../css/iconcool.js';
6
+ import 'tippy.js/dist/tippy.css';
6
7
  // ai 样式。注意:全局引入一次即可
7
8
  export const useStyle = ()=>{
8
9
  // 引用资料
@@ -0,0 +1,39 @@
1
+ import type { IPagination, IPaginationParam, ISortParam, ITTableSort } from '@/types/common';
2
+ import { OrderMethod } from '@/types/enum';
3
+ interface IPaginatedApiResult<T> {
4
+ results?: T;
5
+ count?: number;
6
+ }
7
+ export declare const useTTable: <T>() => {
8
+ isLoading: import("vue").Ref<boolean, boolean>;
9
+ initHook: (callBackFn: (search: IPaginationParam & ISortParam) => Promise<IPaginatedApiResult<T> | T>, isShowPagination: boolean) => void;
10
+ sort: import("vue").Ref<{
11
+ descending?: OrderMethod;
12
+ sortKey?: string;
13
+ }, ITTableSort | {
14
+ descending?: OrderMethod;
15
+ sortKey?: string;
16
+ }>;
17
+ handleSortChange: (config: {
18
+ descending: boolean;
19
+ }, { col }: {
20
+ col: {
21
+ sortKey: string;
22
+ };
23
+ }) => Promise<void>;
24
+ triggerApi: () => Promise<void>;
25
+ pagination: import("vue").Ref<{
26
+ current: number;
27
+ limit: number;
28
+ count: number;
29
+ }, IPagination | {
30
+ current: number;
31
+ limit: number;
32
+ count: number;
33
+ }>;
34
+ resetPagination: () => void;
35
+ tableData: [[] | T] extends [import("vue").Ref<any, any>] ? import("@vue/shared").IfAny<import("vue").Ref<any, any> & ([] | T), import("vue").Ref<import("vue").Ref<any, any> & ([] | T), import("vue").Ref<any, any> & ([] | T)>, import("vue").Ref<any, any> & ([] | T)> : import("vue").Ref<[] | import("vue").UnwrapRef<T>, [] | T | import("vue").UnwrapRef<T>>;
36
+ handlePageChange: (current: number) => void;
37
+ handlePageSizeChange: (pageSize: number) => void;
38
+ };
39
+ export {};