@blueking/ai-ui-sdk 0.1.19-beta.17 → 0.1.19-beta.19

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 (84) hide show
  1. package/dist/components/render-auth/auth-dialog.script.vue.js.js +26 -25
  2. package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
  3. package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
  4. package/dist/components/render-auto-refresh/index.vue.css +8 -8
  5. package/dist/components/render-auto-refresh/index.vue.js +1 -1
  6. package/dist/components/render-checkbox/index.vue.css +9 -9
  7. package/dist/components/render-checkbox/index.vue.js +1 -1
  8. package/dist/components/render-choose-tag/index.script.vue.js.js +3 -3
  9. package/dist/components/render-choose-tag/index.vue.css +7 -7
  10. package/dist/components/render-choose-tag/index.vue.js +1 -1
  11. package/dist/components/render-collapse/index.vue.css +2 -2
  12. package/dist/components/render-collapse/index.vue.js +1 -1
  13. package/dist/components/render-dataset/components/dataset-data-tool-icons/index.script.vue.js +1 -1
  14. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
  15. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
  16. package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
  17. package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
  18. package/dist/components/render-dataset/components/operation-record/table/index.script.vue.js +165 -0
  19. package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
  20. package/dist/components/render-dataset/components/operation-record/table/index.vue.js +2 -2
  21. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
  22. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
  23. package/dist/components/render-dataset/components/plus-dataset/dataset-form.script.vue.js +20 -42
  24. package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
  25. package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
  26. package/dist/components/render-dataset/components/plus-dataset-data/form/api.script.vue.js.js +21 -29
  27. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.css +2 -2
  28. package/dist/components/render-dataset/components/plus-dataset-data/form/api.vue.js +1 -1
  29. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
  30. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
  31. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -2
  32. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
  33. package/dist/components/render-dataset/components/plus-dataset-data/index.script.vue.js.js +6 -1
  34. package/dist/components/render-dataset/components/plus-dataset-data/index.vue.d.ts +1 -0
  35. package/dist/components/render-dataset/components/review-dataset-data/index.vue.css +10 -10
  36. package/dist/components/render-dataset/components/review-dataset-data/index.vue.js +1 -1
  37. package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js +230 -388
  38. package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.d.ts +3 -1
  39. package/dist/components/render-dataset-detail-origin-data/index.script.vue.js.js +7 -6
  40. package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
  41. package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
  42. package/dist/components/render-dataset-list/components/main.script.vue.js.js +6 -5
  43. package/dist/components/render-dataset-list/components/main.vue.css +3 -3
  44. package/dist/components/render-dataset-list/components/main.vue.js +1 -1
  45. package/dist/components/render-dataset-list/components/table.script.vue.js +406 -0
  46. package/dist/components/render-dataset-list/components/table.vue.d.ts +2 -0
  47. package/dist/components/render-dataset-list/components/table.vue.js +1 -1
  48. package/dist/components/render-dataset-list/index.vue.css +4 -1
  49. package/dist/components/render-dataset-list/index.vue.js +1 -1
  50. package/dist/components/render-file-card/index.script.vue.js.js +1 -1
  51. package/dist/components/render-file-card/index.vue.css +11 -11
  52. package/dist/components/render-file-card/index.vue.js +1 -1
  53. package/dist/components/render-file-type-icon/index.vue.css +5 -5
  54. package/dist/components/render-file-type-icon/index.vue.js +1 -1
  55. package/dist/components/render-header/index.vue.css +3 -3
  56. package/dist/components/render-header/index.vue.js +1 -1
  57. package/dist/components/render-like/index.vue.css +5 -5
  58. package/dist/components/render-like/index.vue.js +1 -1
  59. package/dist/components/render-router-tab/index.vue.css +3 -3
  60. package/dist/components/render-router-tab/index.vue.js +1 -1
  61. package/dist/components/render-search-empty/index.script.vue.js.js +1 -1
  62. package/dist/components/render-t-table/index.script.vue.js +5 -2
  63. package/dist/components/render-t-table/index.vue.css +19 -19
  64. package/dist/components/render-t-table/index.vue.d.ts +1 -0
  65. package/dist/components/render-t-table/index.vue.js +1 -1
  66. package/dist/components/render-tag-tree/index.script.vue.js.js +4 -0
  67. package/dist/components/render-tag-tree/index.vue.css +7 -7
  68. package/dist/components/render-tag-tree/index.vue.js +1 -1
  69. package/dist/css/tailwind.css +71 -6
  70. package/dist/hooks/use-common-http.d.ts +4 -1
  71. package/dist/hooks/use-common-http.ts.js +5 -4
  72. package/dist/hooks/use-dataset-http.d.ts +2 -2
  73. package/dist/hooks/use-dataset-http.ts.js +6 -4
  74. package/dist/hooks/use-ellipsis-tooltip.ts.js +6 -3
  75. package/dist/hooks/use-meta-http.d.ts +2 -2
  76. package/dist/hooks/use-meta-http.ts.js +6 -4
  77. package/dist/http/helper/common.ts.js +4 -4
  78. package/dist/http/helper/dataset.ts.js +1 -1
  79. package/dist/http/helper/knowledge.ts.js +2 -1
  80. package/dist/http/helper/tool.ts.js +1 -0
  81. package/dist/types/common.d.ts +7 -1
  82. package/package.json +1 -1
  83. package/dist/components/render-dataset/components/operation-record/table/index.script.vue.js.js +0 -226
  84. package/dist/components/render-dataset-list/components/table.script.vue.js.js +0 -590
@@ -59,8 +59,9 @@ export const useMetaHttp = (apiPrefix, spaceId)=>{
59
59
  }
60
60
  }).then((result)=>result.map(transferTagApi2Tag));
61
61
  // 新增 tag
62
- const plusTag = (tagNames)=>fetch.post(`${apiPrefix}/${metaPerfix}/tag/`, {
63
- tag_names: tagNames
62
+ const plusTag = (tagNames, module)=>fetch.post(`${apiPrefix}/${metaPerfix}/tag/`, {
63
+ tag_names: tagNames,
64
+ scope_name: module
64
65
  }, {
65
66
  globalError: false,
66
67
  headers: {
@@ -68,8 +69,9 @@ export const useMetaHttp = (apiPrefix, spaceId)=>{
68
69
  }
69
70
  });
70
71
  // check tag
71
- const checkTag = (tagNames)=>fetch.post(`${apiPrefix}/${metaPerfix}/tag/check/`, {
72
- tag_names: tagNames
72
+ const checkTag = (tagNames, module)=>fetch.post(`${apiPrefix}/${metaPerfix}/tag/check/`, {
73
+ tag_names: tagNames,
74
+ scope_name: module
73
75
  }, {
74
76
  globalError: false,
75
77
  headers: {
@@ -29,8 +29,8 @@
29
29
  * @returns IPaginationParamApi
30
30
  */ export const transferIPaginationParamToIPaginationParamApi = (data)=>{
31
31
  return {
32
- page: data.page,
33
- page_size: data.pageSize
32
+ page: data === null || data === void 0 ? void 0 : data.page,
33
+ page_size: data === null || data === void 0 ? void 0 : data.pageSize
34
34
  };
35
35
  };
36
36
  /**
@@ -39,7 +39,7 @@
39
39
  * @returns ISortParamApi
40
40
  */ export const transferISortParamToISortParamApi = (data)=>{
41
41
  return {
42
- order_by: data.orderBy,
43
- order_method: data.orderMethod
42
+ order_by: data === null || data === void 0 ? void 0 : data.orderBy,
43
+ order_method: data === null || data === void 0 ? void 0 : data.orderMethod
44
44
  };
45
45
  };
@@ -217,7 +217,7 @@ import { transferResourcePermission } from './permission.ts.js';
217
217
  "statuses",
218
218
  "reviewStatuses"
219
219
  ]);
220
- return _object_spread_props(_object_spread({}, rest), {
220
+ return _object_spread_props(_object_spread({}, rest, transferIPaginationParamToIPaginationParamApi(data), transferISortParamToISortParamApi(data)), {
221
221
  dataset_id: datasetId,
222
222
  created_by: createdBy,
223
223
  source_types: sourceTypes,
@@ -188,7 +188,8 @@ import { transferResourcePermission } from './permission.ts.js';
188
188
  knowledge_count: data.number,
189
189
  anchor_path: data.anchorPath,
190
190
  index_config: data.indexConfig,
191
- status: data.status
191
+ status: data.status,
192
+ space_id: data.spaceId
192
193
  });
193
194
  /**
194
195
  * 转换 ui 文件夹为 IKnowledgeApi,接口使用
@@ -49,6 +49,7 @@ import { transferResourcePermission } from './permission.ts.js';
49
49
  is_public: data.isPublic,
50
50
  tool_id: data.id,
51
51
  status: data.status,
52
+ space_id: data.spaceId,
52
53
  is_sensitive: data.isSensitive,
53
54
  credential_id: data.credentialId,
54
55
  credential_type: data.credentialType,
@@ -15,12 +15,18 @@ export interface ITTableSort {
15
15
  descending?: OrderMethod;
16
16
  sortKey?: string;
17
17
  }
18
- export interface ITTableCol<T> extends Omit<PrimaryTableCol<T>, 'type' | 'align' | 'fixed' | 'sortKey'> {
18
+ export interface ITTableColEllipsis {
19
+ theme?: string;
20
+ placement?: string;
21
+ className?: string;
22
+ }
23
+ export interface ITTableCol<T> extends Omit<PrimaryTableCol<T>, 'type' | 'align' | 'fixed' | 'sortKey' | 'ellipsis'> {
19
24
  defaultShow?: boolean;
20
25
  sortKey?: string;
21
26
  type?: string;
22
27
  fixed?: string;
23
28
  align?: string;
29
+ ellipsis?: boolean | ITTableColEllipsis;
24
30
  }
25
31
  export interface IPaginationParam {
26
32
  page?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/ai-ui-sdk",
3
- "version": "0.1.19-beta.17",
3
+ "version": "0.1.19-beta.19",
4
4
  "description": "蓝鲸AI UI SDK",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",
@@ -1,226 +0,0 @@
1
- function _define_property(obj, key, value) {
2
- if (key in obj) {
3
- Object.defineProperty(obj, key, {
4
- value: value,
5
- enumerable: true,
6
- configurable: true,
7
- writable: true
8
- });
9
- } else {
10
- obj[key] = value;
11
- }
12
- return obj;
13
- }
14
- function _object_spread(target) {
15
- for(var i = 1; i < arguments.length; i++){
16
- var source = arguments[i] != null ? arguments[i] : {};
17
- var ownKeys = Object.keys(source);
18
- if (typeof Object.getOwnPropertySymbols === "function") {
19
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
20
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
21
- }));
22
- }
23
- ownKeys.forEach(function(key) {
24
- _define_property(target, key, source[key]);
25
- });
26
- }
27
- return target;
28
- }
29
- import { defineComponent as _defineComponent } from 'vue';
30
- import { unref as _unref, resolveComponent as _resolveComponent, createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, renderList as _renderList, Fragment as _Fragment, resolveDirective as _resolveDirective, createBlock as _createBlock, withDirectives as _withDirectives } from "vue";
31
- const _hoisted_1 = {
32
- class: "g-flex-row"
33
- };
34
- const _hoisted_2 = {
35
- class: "g-mr-4 g-width-16 g-height-16 g-min-width-16"
36
- };
37
- const _hoisted_3 = [
38
- "href"
39
- ];
40
- const _hoisted_4 = {
41
- class: "g-flex-row g-justify-between"
42
- };
43
- const _hoisted_5 = {
44
- class: "text"
45
- };
46
- import { ref, toRef, watch } from 'vue';
47
- import ViewOpResult from '../view-op-result/index.vue.js';
48
- import { useDatasetHttp } from '../../../../../hooks/use-dataset-http.ts.js';
49
- import useTable from '../../../../../hooks/use-table.ts.js';
50
- import { DatasetDataOperatRecordResultCode } from '../../../../../types/enum.ts.js';
51
- export default /*@__PURE__*/ _defineComponent({
52
- props: {
53
- search: {},
54
- apiPrefix: {},
55
- spaceId: {}
56
- },
57
- setup (__props) {
58
- const props = __props;
59
- const { getOperateRecordList } = useDatasetHttp(props.apiPrefix, toRef(props, 'spaceId'));
60
- const resultCodeMap = {
61
- [DatasetDataOperatRecordResultCode.Failed]: '失败',
62
- [DatasetDataOperatRecordResultCode.Success]: '成功'
63
- };
64
- const isShowView = ref(false);
65
- const viewData = ref();
66
- const handleGetOperateRecordList = (params)=>{
67
- return getOperateRecordList(_object_spread({}, props.search, params));
68
- };
69
- const { tableData, pagination, isLoading, handlePageChange, handlePageSizeChange, resetPagination, triggerApi } = useTable(handleGetOperateRecordList, 'results', {
70
- current: 1,
71
- limit: 20,
72
- count: 0
73
- });
74
- const handleView = (row)=>{
75
- isShowView.value = true;
76
- viewData.value = row;
77
- };
78
- watch(()=>props.search, ()=>{
79
- resetPagination();
80
- triggerApi();
81
- }, {
82
- immediate: true,
83
- deep: true
84
- });
85
- return (_ctx, _cache)=>{
86
- const _component_bk_table_column = _resolveComponent("bk-table-column");
87
- const _component_bk_popover = _resolveComponent("bk-popover");
88
- const _component_bk_button = _resolveComponent("bk-button");
89
- const _component_bk_table = _resolveComponent("bk-table");
90
- const _directive_bkloading = _resolveDirective("bkloading");
91
- return _openBlock(), _createElementBlock(_Fragment, null, [
92
- _withDirectives((_openBlock(), _createBlock(_component_bk_table, {
93
- "show-overflow-tooltip": "",
94
- "remote-pagination": "",
95
- class: "g-white-footer-table g-gray-header-table",
96
- "empty-cell-text": "--",
97
- "max-height": "calc(100% - 48px)",
98
- "row-height": 70,
99
- pagination: _unref(pagination),
100
- data: _unref(tableData),
101
- onPageLimitChange: _unref(handlePageSizeChange),
102
- onPageValueChange: _unref(handlePageChange)
103
- }, {
104
- default: _withCtx(()=>[
105
- _createVNode(_component_bk_table_column, {
106
- label: "数据 ID",
107
- field: "instanceId",
108
- width: "80"
109
- }),
110
- _createVNode(_component_bk_table_column, {
111
- label: "操作类型",
112
- width: "142"
113
- }, {
114
- default: _withCtx(({ row })=>[
115
- _createTextVNode(_toDisplayString(row.actionName), 1 /* TEXT */ )
116
- ]),
117
- _: 1 /* STABLE */
118
- }),
119
- _createVNode(_component_bk_table_column, {
120
- label: "操作状态",
121
- width: "142"
122
- }, {
123
- default: _withCtx(({ row })=>[
124
- _createElementVNode("span", _hoisted_1, [
125
- (_openBlock(), _createElementBlock("svg", _hoisted_2, [
126
- _createElementVNode("use", {
127
- href: row.resultCode === _unref(DatasetDataOperatRecordResultCode).Success ? '#ai-ui-sdk-sync-success' : '#ai-ui-sdk-sync-failed'
128
- }, null, 8 /* PROPS */ , _hoisted_3)
129
- ])),
130
- _createTextVNode(" " + _toDisplayString(resultCodeMap[row.resultCode]), 1 /* TEXT */ )
131
- ])
132
- ]),
133
- _: 1 /* STABLE */
134
- }),
135
- _createVNode(_component_bk_table_column, {
136
- label: "操作结果",
137
- prop: "instanceData"
138
- }, {
139
- default: _withCtx(({ row })=>[
140
- _createElementVNode("span", _hoisted_4, [
141
- _createVNode(_component_bk_popover, {
142
- arrow: false,
143
- theme: "light",
144
- "ext-cls": "g-max-width-400 g-white-space-pre-line g-max-height-80vh g-scrollbar-page"
145
- }, {
146
- content: _withCtx(()=>[
147
- (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(row.instanceData, (value, key)=>{
148
- return _openBlock(), _createElementBlock("span", {
149
- key: key
150
- }, [
151
- _createTextVNode(_toDisplayString(key) + ": " + _toDisplayString(value) + " ", 1 /* TEXT */ ),
152
- _cache[2] || (_cache[2] = _createElementVNode("br", null, null, -1 /* HOISTED */ ))
153
- ]);
154
- }), 128 /* KEYED_FRAGMENT */ ))
155
- ]),
156
- default: _withCtx(()=>[
157
- _createElementVNode("span", _hoisted_5, [
158
- (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(row.instanceData, (value, key)=>{
159
- return _openBlock(), _createElementBlock("span", {
160
- key: key
161
- }, [
162
- _createTextVNode(_toDisplayString(key) + ": " + _toDisplayString(value) + " ", 1 /* TEXT */ ),
163
- _cache[1] || (_cache[1] = _createElementVNode("br", null, null, -1 /* HOISTED */ ))
164
- ]);
165
- }), 128 /* KEYED_FRAGMENT */ ))
166
- ])
167
- ]),
168
- _: 2 /* DYNAMIC */
169
- }, 1024 /* DYNAMIC_SLOTS */ ),
170
- _createVNode(_component_bk_button, {
171
- text: "",
172
- theme: "primary",
173
- onClick: ($event)=>handleView(row)
174
- }, {
175
- default: _withCtx(()=>_cache[3] || (_cache[3] = [
176
- _createTextVNode(" [查看] ")
177
- ])),
178
- _: 2 /* DYNAMIC */ ,
179
- __: [
180
- 3
181
- ]
182
- }, 1032 /* PROPS, DYNAMIC_SLOTS */ , [
183
- "onClick"
184
- ])
185
- ])
186
- ]),
187
- _: 1 /* STABLE */
188
- }),
189
- _createVNode(_component_bk_table_column, {
190
- label: "操作人",
191
- field: "username",
192
- width: "142"
193
- }),
194
- _createVNode(_component_bk_table_column, {
195
- label: "操作时间",
196
- field: "endTime",
197
- width: "152"
198
- })
199
- ]),
200
- _: 1 /* STABLE */
201
- }, 8 /* PROPS */ , [
202
- "pagination",
203
- "data",
204
- "onPageLimitChange",
205
- "onPageValueChange"
206
- ])), [
207
- [
208
- _directive_bkloading,
209
- {
210
- loading: _unref(isLoading),
211
- zIndex: 2
212
- }
213
- ]
214
- ]),
215
- _createVNode(ViewOpResult, {
216
- "is-show": isShowView.value,
217
- "onUpdate:isShow": _cache[0] || (_cache[0] = ($event)=>isShowView.value = $event),
218
- data: viewData.value
219
- }, null, 8 /* PROPS */ , [
220
- "is-show",
221
- "data"
222
- ])
223
- ], 64 /* STABLE_FRAGMENT */ );
224
- };
225
- }
226
- });