@blueking/ai-ui-sdk 0.1.2-beta.1 → 0.1.2-beta.10

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 (139) hide show
  1. package/dist/components/render-aside/index.vue.css +9 -9
  2. package/dist/components/render-aside/index.vue.js +1 -1
  3. package/dist/components/render-auth/auth-dialog-fn.d.ts +2 -0
  4. package/dist/components/render-auth/auth-dialog-fn.ts.js +14 -0
  5. package/dist/components/render-auth/auth-dialog.script.vue.js.js +110 -0
  6. package/dist/components/render-auth/auth-dialog.vue.css +4 -0
  7. package/dist/components/render-auth/auth-dialog.vue.d.ts +5 -0
  8. package/dist/components/render-auth/auth-dialog.vue.js +4 -0
  9. package/dist/components/render-auto-height-textarea/index.vue.css +11 -11
  10. package/dist/components/render-auto-height-textarea/index.vue.d.ts +2 -2
  11. package/dist/components/render-auto-height-textarea/index.vue.js +1 -1
  12. package/dist/components/render-choose-tag/index.script.vue.js.js +242 -0
  13. package/dist/components/render-choose-tag/index.vue.css +39 -0
  14. package/dist/components/render-choose-tag/index.vue.d.ts +12 -0
  15. package/dist/components/render-choose-tag/index.vue.js +5 -0
  16. package/dist/components/render-collapse/index.vue.css +2 -2
  17. package/dist/components/render-collapse/index.vue.js +1 -1
  18. package/dist/components/render-dataset/components/edit-dataset-data/index.script.vue.js.js +4 -3
  19. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
  20. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.d.ts +1 -0
  21. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
  22. package/dist/components/render-dataset/components/operation-record/index.script.vue.js.js +8 -5
  23. package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
  24. package/dist/components/render-dataset/components/operation-record/index.vue.d.ts +1 -0
  25. package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
  26. package/dist/components/render-dataset/components/operation-record/table/index.script.vue.js.js +4 -3
  27. package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
  28. package/dist/components/render-dataset/components/operation-record/table/index.vue.d.ts +1 -0
  29. package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
  30. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
  31. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
  32. package/dist/components/render-dataset/components/plus-dataset/dataset-footer.script.vue.js.js +6 -4
  33. package/dist/components/render-dataset/components/plus-dataset/dataset-footer.vue.d.ts +4 -2
  34. package/dist/components/render-dataset/components/plus-dataset/dataset-form.script.vue.js +89 -26
  35. package/dist/components/render-dataset/components/plus-dataset/dataset-form.vue.d.ts +3 -0
  36. package/dist/components/render-dataset/components/plus-dataset/index.script.vue.js.js +73 -22
  37. package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
  38. package/dist/components/render-dataset/components/plus-dataset/index.vue.d.ts +3 -0
  39. package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
  40. package/dist/components/render-dataset/components/plus-dataset-data/form/dataset.script.vue.js.js +4 -3
  41. package/dist/components/render-dataset/components/plus-dataset-data/form/dataset.vue.d.ts +1 -0
  42. package/dist/components/render-dataset/components/plus-dataset-data/form/file.script.vue.js.js +4 -3
  43. package/dist/components/render-dataset/components/plus-dataset-data/form/file.vue.d.ts +1 -0
  44. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.script.vue.js.js +4 -3
  45. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
  46. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.d.ts +1 -0
  47. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
  48. package/dist/components/render-dataset/components/plus-dataset-data/form/index.script.vue.js.js +13 -4
  49. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -2
  50. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.d.ts +1 -0
  51. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
  52. package/dist/components/render-dataset/components/plus-dataset-data/form/manual.script.vue.js +4 -3
  53. package/dist/components/render-dataset/components/plus-dataset-data/form/manual.vue.d.ts +1 -0
  54. package/dist/components/render-dataset/components/plus-dataset-data/index.script.vue.js.js +4 -1
  55. package/dist/components/render-dataset/components/plus-dataset-data/index.vue.d.ts +1 -0
  56. package/dist/components/render-dataset/components/search-dataset/index.script.vue.js.js +21 -6
  57. package/dist/components/render-dataset/components/search-dataset/index.vue.d.ts +2 -0
  58. package/dist/components/render-dataset/components/source-type-icon/index.vue.css +3 -3
  59. package/dist/components/render-dataset/components/source-type-icon/index.vue.js +1 -1
  60. package/dist/components/render-dataset/index.script.vue.js.js +7 -4
  61. package/dist/components/render-dataset/index.vue.css +1 -1
  62. package/dist/components/render-dataset/index.vue.d.ts +1 -0
  63. package/dist/components/render-dataset/index.vue.js +1 -1
  64. package/dist/components/render-dataset-detail/components/header.script.vue.js.js +4 -3
  65. package/dist/components/render-dataset-detail/components/header.vue.d.ts +1 -0
  66. package/dist/components/render-dataset-detail/index.script.vue.js.js +6 -3
  67. package/dist/components/render-dataset-detail/index.vue.d.ts +1 -0
  68. package/dist/components/render-dataset-detail-origin-data/components/batch-operation/index.script.vue.js.js +4 -3
  69. package/dist/components/render-dataset-detail-origin-data/components/batch-operation/index.vue.d.ts +1 -0
  70. package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js +13 -8
  71. package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.css +1 -1
  72. package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.d.ts +1 -0
  73. package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.js +1 -1
  74. package/dist/components/render-dataset-detail-origin-data/index.script.vue.js.js +12 -5
  75. package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
  76. package/dist/components/render-dataset-detail-origin-data/index.vue.d.ts +1 -0
  77. package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
  78. package/dist/components/render-dataset-list/components/main.script.vue.js.js +23 -5
  79. package/dist/components/render-dataset-list/components/main.vue.css +3 -3
  80. package/dist/components/render-dataset-list/components/main.vue.d.ts +2 -0
  81. package/dist/components/render-dataset-list/components/main.vue.js +1 -1
  82. package/dist/components/render-dataset-list/components/table.script.vue.js.js +199 -33
  83. package/dist/components/render-dataset-list/components/table.vue.d.ts +2 -0
  84. package/dist/components/render-dataset-list/index.script.vue.js.js +10 -2
  85. package/dist/components/render-dataset-list/index.vue.d.ts +2 -0
  86. package/dist/components/render-expand-collapse/index.vue.css +3 -3
  87. package/dist/components/render-expand-collapse/index.vue.js +1 -1
  88. package/dist/components/render-file-card/index.vue.css +11 -11
  89. package/dist/components/render-file-card/index.vue.js +1 -1
  90. package/dist/components/render-file-type-icon/index.vue.css +5 -5
  91. package/dist/components/render-file-type-icon/index.vue.js +1 -1
  92. package/dist/components/render-header/index.vue.css +5 -5
  93. package/dist/components/render-header/index.vue.js +1 -1
  94. package/dist/components/render-router-tab/index.vue.css +3 -3
  95. package/dist/components/render-router-tab/index.vue.js +1 -1
  96. package/dist/{component.d.ts → components.d.ts} +3 -1
  97. package/dist/{component.ts.js → components.ts.js} +3 -1
  98. package/dist/enums.d.ts +1 -0
  99. package/dist/enums.ts.js +1 -0
  100. package/dist/events.d.ts +1 -0
  101. package/dist/events.ts.js +1 -0
  102. package/dist/hooks/use-chat.d.ts +2 -2
  103. package/dist/hooks/use-chat.ts.js +82 -55
  104. package/dist/hooks/use-dataset-http.d.ts +2 -1
  105. package/dist/hooks/use-dataset-http.ts.js +102 -19
  106. package/dist/hooks/use-form-rule.d.ts +29 -0
  107. package/dist/hooks/use-form-rule.ts.js +101 -0
  108. package/dist/hooks/use-meta-http.d.ts +16 -0
  109. package/dist/hooks/use-meta-http.ts.js +83 -0
  110. package/dist/hooks/use-permission-http.d.ts +7 -0
  111. package/dist/hooks/use-permission-http.ts.js +26 -0
  112. package/dist/hooks/use-permission.d.ts +9 -0
  113. package/dist/hooks/use-permission.ts.js +100 -0
  114. package/dist/hooks/use-session-http.d.ts +1 -1
  115. package/dist/hooks/use-session-http.ts.js +37 -11
  116. package/dist/hooks.d.ts +7 -0
  117. package/dist/hooks.ts.js +7 -0
  118. package/dist/http/fetch/index.ts.js +59 -6
  119. package/dist/http/helper/agent.ts.js +4 -1
  120. package/dist/http/helper/dataset.ts.js +13 -9
  121. package/dist/http/helper/permission.d.ts +7 -1
  122. package/dist/http/helper/permission.ts.js +8 -0
  123. package/dist/http/helper/session.d.ts +10 -0
  124. package/dist/http/helper/session.ts.js +33 -3
  125. package/dist/https.d.ts +2 -0
  126. package/dist/https.ts.js +2 -0
  127. package/dist/transforms.d.ts +4 -0
  128. package/dist/transforms.ts.js +4 -0
  129. package/dist/types/agent.d.ts +7 -0
  130. package/dist/types/dataset.d.ts +12 -0
  131. package/dist/types/enum.d.ts +42 -0
  132. package/dist/types/enum.ts.js +45 -0
  133. package/dist/types/meta.d.ts +3 -0
  134. package/dist/types/permission.d.ts +40 -0
  135. package/dist/types.d.ts +6 -0
  136. package/dist/types.ts.js +6 -0
  137. package/package.json +31 -10
  138. package/dist/main.d.ts +0 -22
  139. package/dist/main.ts.js +0 -28
@@ -1,12 +1,12 @@
1
1
 
2
- .aside-home[data-v-sgxzhgh6] {
2
+ .aside-home[data-v-yyvyklae] {
3
3
  width: 300px;
4
4
  height: 100%;
5
5
  background: #FFFFFF;
6
6
  padding: 16px;
7
7
  border-right: 1px solid #eaebf0;
8
8
  }
9
- [data-v-sgxzhgh6] .aside-item {
9
+ [data-v-yyvyklae] .aside-item {
10
10
  width: 268px;
11
11
  line-height: 36px;
12
12
  border-radius: 2px;
@@ -16,30 +16,30 @@
16
16
  justify-content: space-between;
17
17
  color: #979BA5;
18
18
  }
19
- [data-v-sgxzhgh6] .aside-item.is-tab {
19
+ [data-v-yyvyklae] .aside-item.is-tab {
20
20
  background: #F5F7FA;
21
21
  cursor: pointer;
22
22
  color: #4D4F56;
23
23
  }
24
- [data-v-sgxzhgh6] .aside-item.is-tab:hover {
24
+ [data-v-yyvyklae] .aside-item.is-tab:hover {
25
25
  background: #F0F5FF;
26
26
  }
27
- [data-v-sgxzhgh6] .aside-item.active {
27
+ [data-v-yyvyklae] .aside-item.active {
28
28
  background: #F0F5FF;
29
29
  color: #3A84FF;
30
30
  font-weight: 700;
31
31
  }
32
- [data-v-sgxzhgh6] .aside-item.active .tab-num {
32
+ [data-v-yyvyklae] .aside-item.active .tab-num {
33
33
  background: #3A84FF;
34
34
  color: #fff;
35
35
  }
36
- [data-v-sgxzhgh6] .aside-item.active .active-text {
36
+ [data-v-yyvyklae] .aside-item.active .active-text {
37
37
  color: #3A84FF;
38
38
  }
39
- [data-v-sgxzhgh6] .aside-item .tab-name {
39
+ [data-v-yyvyklae] .aside-item .tab-name {
40
40
  flex: 1;
41
41
  }
42
- [data-v-sgxzhgh6] .aside-item .tab-num {
42
+ [data-v-yyvyklae] .aside-item .tab-num {
43
43
  background: #EAEBF0;
44
44
  border-radius: 2px;
45
45
  margin-left: 5px;
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js';
2
- script.__scopeId = "data-v-sgxzhgh6";
2
+ script.__scopeId = "data-v-yyvyklae";
3
3
  script.__file = "./src/components/render-aside/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -0,0 +1,2 @@
1
+ import type { IPermissionApplyData } from '@/types/permission';
2
+ export declare const renderAuthDialog: (perm: IPermissionApplyData) => void;
@@ -0,0 +1,14 @@
1
+ import { h, render } from 'vue';
2
+ import authDialog from './auth-dialog.vue.js';
3
+ const getVnode = ()=>{
4
+ const vNode = h(authDialog);
5
+ const rootElement = document.querySelector('.app');
6
+ vNode.appContext = rootElement.__vue_app__._context;
7
+ render(vNode, document.body);
8
+ return vNode;
9
+ };
10
+ export const renderAuthDialog = (perm)=>{
11
+ var _vNode_component_exposed, _vNode_component;
12
+ const vNode = getVnode();
13
+ (_vNode_component = vNode.component) === null || _vNode_component === void 0 ? void 0 : (_vNode_component_exposed = _vNode_component.exposed) === null || _vNode_component_exposed === void 0 ? void 0 : _vNode_component_exposed.handleShow(perm);
14
+ };
@@ -0,0 +1,110 @@
1
+ import { defineComponent as _defineComponent } from 'vue';
2
+ import { resolveComponent as _resolveComponent, createVNode as _createVNode, withCtx as _withCtx, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createBlock as _createBlock } from "vue";
3
+ import { ref } from 'vue';
4
+ export default /*@__PURE__*/ _defineComponent({
5
+ setup (__props, { expose: __expose }) {
6
+ const isShow = ref(false);
7
+ const perm = ref();
8
+ const tableData = ref();
9
+ const handleApply = ()=>{
10
+ var _perm_value;
11
+ window.open((_perm_value = perm.value) === null || _perm_value === void 0 ? void 0 : _perm_value.apply_url, '_blank');
12
+ };
13
+ const handleClosed = ()=>{
14
+ isShow.value = false;
15
+ };
16
+ const handleShow = (data)=>{
17
+ var _data_permission, _data_permission_actions_, _data_permission1, _data_permission_actions__related_resource_types__instances__at, _data_permission_actions__related_resource_types__instances_, _data_permission_actions__related_resource_types__instances, _data_permission_actions__related_resource_types_, _data_permission_actions__related_resource_types, _data_permission_actions_1, _data_permission2;
18
+ perm.value = data;
19
+ isShow.value = true;
20
+ tableData.value = [
21
+ {
22
+ system_name: data === null || data === void 0 ? void 0 : (_data_permission = data.permission) === null || _data_permission === void 0 ? void 0 : _data_permission.system_name,
23
+ name: data === null || data === void 0 ? void 0 : (_data_permission1 = data.permission) === null || _data_permission1 === void 0 ? void 0 : (_data_permission_actions_ = _data_permission1.actions[0]) === null || _data_permission_actions_ === void 0 ? void 0 : _data_permission_actions_.name,
24
+ instance_name: data === null || data === void 0 ? void 0 : (_data_permission2 = data.permission) === null || _data_permission2 === void 0 ? void 0 : (_data_permission_actions_1 = _data_permission2.actions[0]) === null || _data_permission_actions_1 === void 0 ? void 0 : (_data_permission_actions__related_resource_types = _data_permission_actions_1.related_resource_types) === null || _data_permission_actions__related_resource_types === void 0 ? void 0 : (_data_permission_actions__related_resource_types_ = _data_permission_actions__related_resource_types[0]) === null || _data_permission_actions__related_resource_types_ === void 0 ? void 0 : (_data_permission_actions__related_resource_types__instances = _data_permission_actions__related_resource_types_.instances) === null || _data_permission_actions__related_resource_types__instances === void 0 ? void 0 : (_data_permission_actions__related_resource_types__instances_ = _data_permission_actions__related_resource_types__instances[0]) === null || _data_permission_actions__related_resource_types__instances_ === void 0 ? void 0 : (_data_permission_actions__related_resource_types__instances__at = _data_permission_actions__related_resource_types__instances_.at(-1)) === null || _data_permission_actions__related_resource_types__instances__at === void 0 ? void 0 : _data_permission_actions__related_resource_types__instances__at.name
25
+ }
26
+ ];
27
+ };
28
+ __expose({
29
+ handleShow
30
+ });
31
+ return (_ctx, _cache)=>{
32
+ const _component_bk_exception = _resolveComponent("bk-exception");
33
+ const _component_bk_table_column = _resolveComponent("bk-table-column");
34
+ const _component_bk_table = _resolveComponent("bk-table");
35
+ const _component_bk_button = _resolveComponent("bk-button");
36
+ const _component_bk_dialog = _resolveComponent("bk-dialog");
37
+ return _openBlock(), _createBlock(_component_bk_dialog, {
38
+ "is-show": isShow.value,
39
+ width: 640,
40
+ class: "auth-dialog",
41
+ onClosed: handleClosed
42
+ }, {
43
+ header: _withCtx(()=>[
44
+ _createVNode(_component_bk_exception, {
45
+ type: "403",
46
+ scene: "part",
47
+ title: "该操作需要以下权限"
48
+ })
49
+ ]),
50
+ footer: _withCtx(()=>[
51
+ _createElementVNode("div", null, [
52
+ _createVNode(_component_bk_button, {
53
+ theme: "primary",
54
+ onClick: handleApply
55
+ }, {
56
+ default: _withCtx(()=>_cache[0] || (_cache[0] = [
57
+ _createTextVNode(" 去申请 ")
58
+ ])),
59
+ _: 1 /* STABLE */ ,
60
+ __: [
61
+ 0
62
+ ]
63
+ }),
64
+ _createVNode(_component_bk_button, {
65
+ class: "g-ml-8",
66
+ onClick: handleClosed
67
+ }, {
68
+ default: _withCtx(()=>_cache[1] || (_cache[1] = [
69
+ _createTextVNode(" 取消 ")
70
+ ])),
71
+ _: 1 /* STABLE */ ,
72
+ __: [
73
+ 1
74
+ ]
75
+ })
76
+ ])
77
+ ]),
78
+ default: _withCtx(()=>[
79
+ _createVNode(_component_bk_table, {
80
+ class: "g-mb-20",
81
+ "show-overflow-tooltip": "",
82
+ "empty-cell-text": "--",
83
+ data: tableData.value
84
+ }, {
85
+ default: _withCtx(()=>[
86
+ _createVNode(_component_bk_table_column, {
87
+ label: "系统",
88
+ field: "system_name"
89
+ }),
90
+ _createVNode(_component_bk_table_column, {
91
+ label: "需要申请的权限",
92
+ field: "name"
93
+ }),
94
+ _createVNode(_component_bk_table_column, {
95
+ label: "关联的资源实例",
96
+ field: "instance_name"
97
+ })
98
+ ]),
99
+ _: 1 /* STABLE */
100
+ }, 8 /* PROPS */ , [
101
+ "data"
102
+ ])
103
+ ]),
104
+ _: 1 /* STABLE */
105
+ }, 8 /* PROPS */ , [
106
+ "is-show"
107
+ ]);
108
+ };
109
+ }
110
+ });
@@ -0,0 +1,4 @@
1
+
2
+ .auth-dialog .bk-modal-mask {
3
+ opacity: 1 !important;
4
+ }
@@ -0,0 +1,5 @@
1
+ import type { IPermissionApplyData } from '@/types/permission';
2
+ declare const _default: import("vue").DefineComponent<{}, {
3
+ handleShow: (data: IPermissionApplyData) => void;
4
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
5
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import script from './auth-dialog.script.vue.js.js';
2
+ script.__file = "./src/components/render-auth/auth-dialog.vue";
3
+ import './auth-dialog.vue.css';
4
+ export default script;
@@ -1,40 +1,40 @@
1
1
 
2
- .send-container[data-v-1yqqop4l] {
2
+ .send-container[data-v-9l0cryg6] {
3
3
  position: relative;
4
4
  }
5
- .send-container[data-v-1yqqop4l]:has(textarea:focus) {
5
+ .send-container[data-v-9l0cryg6]:has(textarea:focus) {
6
6
  z-index: 2;
7
7
  }
8
- .send-container:hover .send-clear[data-v-1yqqop4l] {
8
+ .send-container:hover .send-clear[data-v-9l0cryg6] {
9
9
  display: inline-flex !important;
10
10
  }
11
- .send-input[data-v-1yqqop4l] {
11
+ .send-input[data-v-9l0cryg6] {
12
12
  width: 100%;
13
13
  flex-direction: row;
14
14
  height: var(--origin-height);
15
15
  }
16
- .send-input[data-v-1yqqop4l]:has(textarea:focus) {
16
+ .send-input[data-v-9l0cryg6]:has(textarea:focus) {
17
17
  height: var(--text-height);
18
18
  }
19
- .send-input[data-v-1yqqop4l] textarea {
19
+ .send-input[data-v-9l0cryg6] textarea {
20
20
  font-size: 12px;
21
21
  line-height: 16px;
22
22
  padding: 7px;
23
23
  resize: none !important;
24
24
  }
25
- .send-input[data-v-1yqqop4l] textarea::-webkit-scrollbar {
25
+ .send-input[data-v-9l0cryg6] textarea::-webkit-scrollbar {
26
26
  width: 4px;
27
27
  height: 4px;
28
28
  }
29
- .send-input[data-v-1yqqop4l] textarea::-webkit-scrollbar-thumb {
29
+ .send-input[data-v-9l0cryg6] textarea::-webkit-scrollbar-thumb {
30
30
  height: 5px;
31
31
  border-radius: 3px;
32
32
  background-color: #dcdee5;
33
33
  }
34
- .send-input[data-v-1yqqop4l] textarea::placeholder {
34
+ .send-input[data-v-9l0cryg6] textarea::placeholder {
35
35
  line-height: 16px;
36
36
  }
37
- .send-clear[data-v-1yqqop4l] {
37
+ .send-clear[data-v-9l0cryg6] {
38
38
  display: none !important;
39
39
  position: absolute;
40
40
  right: 10px;
@@ -43,6 +43,6 @@
43
43
  font-size: 14px;
44
44
  cursor: pointer;
45
45
  }
46
- .send-clear[data-v-1yqqop4l]:hover {
46
+ .send-clear[data-v-9l0cryg6]:hover {
47
47
  color: #313238;
48
48
  }
@@ -7,11 +7,11 @@ interface IProps {
7
7
  disabled?: boolean;
8
8
  }
9
9
  declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
- "update:modelValue": (...args: any[]) => void;
11
10
  input: (...args: any[]) => void;
11
+ "update:modelValue": (...args: any[]) => void;
12
12
  }, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
13
- "onUpdate:modelValue"?: (...args: any[]) => any;
14
13
  onInput?: (...args: any[]) => any;
14
+ "onUpdate:modelValue"?: (...args: any[]) => any;
15
15
  }>, {
16
16
  maxHeight: number;
17
17
  focusShowHeight: boolean;
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-1yqqop4l";
2
+ script.__scopeId = "data-v-9l0cryg6";
3
3
  script.__file = "./src/components/render-auto-height-textarea/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -0,0 +1,242 @@
1
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
2
+ try {
3
+ var info = gen[key](arg);
4
+ var value = info.value;
5
+ } catch (error) {
6
+ reject(error);
7
+ return;
8
+ }
9
+ if (info.done) {
10
+ resolve(value);
11
+ } else {
12
+ Promise.resolve(value).then(_next, _throw);
13
+ }
14
+ }
15
+ function _async_to_generator(fn) {
16
+ return function() {
17
+ var self = this, args = arguments;
18
+ return new Promise(function(resolve, reject) {
19
+ var gen = fn.apply(self, args);
20
+ function _next(value) {
21
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
22
+ }
23
+ function _throw(err) {
24
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
25
+ }
26
+ _next(undefined);
27
+ });
28
+ };
29
+ }
30
+ import { defineComponent as _defineComponent } from 'vue';
31
+ import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, createBlock as _createBlock, createVNode as _createVNode, withCtx as _withCtx, unref as _unref, resolveDirective as _resolveDirective, withDirectives as _withDirectives, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode } from "vue";
32
+ const _hoisted_1 = {
33
+ key: 0,
34
+ class: "g-flex-row plus-tag-input"
35
+ };
36
+ import { Message } from 'bkui-vue';
37
+ import { Done, Error } from 'bkui-vue/lib/icon';
38
+ import { nextTick, onBeforeMount, ref, toRef, watch } from 'vue';
39
+ import { useFormRule } from '../../hooks/use-form-rule.ts.js';
40
+ import { useMetaHttp } from '../../hooks/use-meta-http.ts.js';
41
+ import { HttpErrorCode, Modules } from '../../types/enum.ts.js';
42
+ export default /*@__PURE__*/ _defineComponent({
43
+ props: {
44
+ modelValue: {},
45
+ apiPrefix: {},
46
+ spaceId: {},
47
+ popoverOptions: {}
48
+ },
49
+ emits: [
50
+ "update:modelValue"
51
+ ],
52
+ setup (__props, { emit: __emit }) {
53
+ const props = __props;
54
+ const emits = __emit;
55
+ const { getTags, plusTag, checkTag } = useMetaHttp(props.apiPrefix, toRef(props, 'spaceId'));
56
+ const { getNameRule, getLengthRule } = useFormRule(props.apiPrefix, toRef(props, 'spaceId'));
57
+ const isShowEdit = ref(false);
58
+ const isPulsingTag = ref(false);
59
+ const tempTagName = ref('');
60
+ const tagRef = ref();
61
+ const tagFormRef = ref();
62
+ const isLoadingTag = ref(false);
63
+ const tags = ref([]);
64
+ const checkTagRule = {
65
+ validator: (value)=>checkTag(value).then(()=>true).catch(()=>false),
66
+ message: '标签名称重复',
67
+ trigger: 'change'
68
+ };
69
+ const tagRules = {
70
+ tempTagName: [
71
+ getNameRule(Modules.Tag),
72
+ checkTagRule,
73
+ getLengthRule('标签名称', 16)
74
+ ]
75
+ };
76
+ const handleShowPlusTag = ()=>{
77
+ isShowEdit.value = true;
78
+ nextTick(()=>{
79
+ tagRef.value.focus();
80
+ });
81
+ };
82
+ const handleTagToggle = (isOpen)=>{
83
+ if (!isOpen) {
84
+ handleHidePlusTag();
85
+ }
86
+ };
87
+ const handleSelect = (value)=>{
88
+ emits('update:modelValue', value);
89
+ };
90
+ const handleTagKeyDown = (value, event)=>{
91
+ if (event.keyCode === 13 || event.key === 'Enter') {
92
+ handlePlusTag();
93
+ }
94
+ };
95
+ const handlePlusTag = function() {
96
+ var _ref = _async_to_generator(function*() {
97
+ try {
98
+ isPulsingTag.value = true;
99
+ yield tagFormRef.value.validate();
100
+ yield plusTag(tempTagName.value);
101
+ emits('update:modelValue', [
102
+ ...props.modelValue,
103
+ tempTagName.value
104
+ ]);
105
+ handleGetTags();
106
+ handleHidePlusTag();
107
+ } catch (error) {
108
+ if (error.code === HttpErrorCode.TagRepeat) {
109
+ Message({
110
+ message: '标签已存在,请重新输入',
111
+ theme: 'error'
112
+ });
113
+ } else {
114
+ console.error(error.message || error);
115
+ }
116
+ } finally{
117
+ isPulsingTag.value = false;
118
+ }
119
+ });
120
+ return function handlePlusTag() {
121
+ return _ref.apply(this, arguments);
122
+ };
123
+ }();
124
+ const handleHidePlusTag = ()=>{
125
+ isShowEdit.value = false;
126
+ tempTagName.value = '';
127
+ };
128
+ const handleGetTags = ()=>{
129
+ isLoadingTag.value = true;
130
+ getTags().then((result)=>{
131
+ tags.value = result;
132
+ }).finally(()=>{
133
+ isLoadingTag.value = false;
134
+ });
135
+ };
136
+ watch(()=>props.spaceId, handleGetTags);
137
+ onBeforeMount(handleGetTags);
138
+ return (_ctx, _cache)=>{
139
+ const _component_bk_option = _resolveComponent("bk-option");
140
+ const _component_bk_input = _resolveComponent("bk-input");
141
+ const _component_bk_form_item = _resolveComponent("bk-form-item");
142
+ const _component_bk_form = _resolveComponent("bk-form");
143
+ const _component_bk_select = _resolveComponent("bk-select");
144
+ const _directive_bkloading = _resolveDirective("bkloading");
145
+ return _openBlock(), _createBlock(_component_bk_select, {
146
+ multiple: "",
147
+ filterable: "",
148
+ "collapse-tags": "",
149
+ "multiple-mode": "tag",
150
+ "popover-options": _ctx.popoverOptions,
151
+ loading: isLoadingTag.value,
152
+ "input-search": false,
153
+ "model-value": _ctx.modelValue,
154
+ onChange: handleSelect,
155
+ onToggle: handleTagToggle
156
+ }, {
157
+ extension: _withCtx(()=>[
158
+ isShowEdit.value ? (_openBlock(), _createElementBlock("section", _hoisted_1, [
159
+ _createVNode(_component_bk_form, {
160
+ class: "plus-tag-form",
161
+ ref_key: "tagFormRef",
162
+ ref: tagFormRef,
163
+ model: {
164
+ tempTagName: tempTagName.value
165
+ },
166
+ rules: tagRules
167
+ }, {
168
+ default: _withCtx(()=>[
169
+ _createVNode(_component_bk_form_item, {
170
+ class: "plus-tag-form-item",
171
+ "label-width": 0,
172
+ property: "tempTagName",
173
+ "error-display-type": "tooltips",
174
+ required: ""
175
+ }, {
176
+ default: _withCtx(()=>[
177
+ _createVNode(_component_bk_input, {
178
+ modelValue: tempTagName.value,
179
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>tempTagName.value = $event),
180
+ maxlength: 20,
181
+ ref_key: "tagRef",
182
+ ref: tagRef,
183
+ placeholder: "请输入标签名称",
184
+ onKeydown: handleTagKeyDown
185
+ }, null, 8 /* PROPS */ , [
186
+ "modelValue"
187
+ ])
188
+ ]),
189
+ _: 1 /* STABLE */
190
+ })
191
+ ]),
192
+ _: 1 /* STABLE */
193
+ }, 8 /* PROPS */ , [
194
+ "model"
195
+ ]),
196
+ _withDirectives(_createVNode(_unref(Done), {
197
+ class: "plus-tag-done",
198
+ onClick: handlePlusTag
199
+ }, null, 512 /* NEED_PATCH */ ), [
200
+ [
201
+ _directive_bkloading,
202
+ {
203
+ loading: isPulsingTag.value
204
+ }
205
+ ]
206
+ ]),
207
+ _createVNode(_unref(Error), {
208
+ class: "plus-tag-error",
209
+ onClick: handleHidePlusTag
210
+ })
211
+ ])) : (_openBlock(), _createElementBlock("span", {
212
+ key: 1,
213
+ class: "plus-tag",
214
+ onClick: handleShowPlusTag
215
+ }, _cache[1] || (_cache[1] = [
216
+ _createElementVNode("i", {
217
+ class: "bkaidev-icon bkaidev-plus-circle"
218
+ }, null, -1 /* HOISTED */ ),
219
+ _createTextVNode(" 新建标签 ")
220
+ ])))
221
+ ]),
222
+ default: _withCtx(()=>[
223
+ (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(tags.value, (tag)=>{
224
+ return _openBlock(), _createBlock(_component_bk_option, {
225
+ key: tag,
226
+ id: tag,
227
+ name: tag
228
+ }, null, 8 /* PROPS */ , [
229
+ "id",
230
+ "name"
231
+ ]);
232
+ }), 128 /* KEYED_FRAGMENT */ ))
233
+ ]),
234
+ _: 1 /* STABLE */
235
+ }, 8 /* PROPS */ , [
236
+ "popover-options",
237
+ "loading",
238
+ "model-value"
239
+ ]);
240
+ };
241
+ }
242
+ });
@@ -0,0 +1,39 @@
1
+
2
+ .plus-tag-input[data-v-twkrpsxi] {
3
+ padding: 7px 12px;
4
+ width: 100%;
5
+ }
6
+ .plus-tag-input .plus-tag-done[data-v-twkrpsxi] {
7
+ cursor: pointer;
8
+ font-size: 22px;
9
+ color: #2DCB56;
10
+ margin: 0 5px 0 10px;
11
+ }
12
+ .plus-tag-input .plus-tag-error[data-v-twkrpsxi] {
13
+ cursor: pointer;
14
+ font-size: 16px;
15
+ color: #C4C6CC;
16
+ margin-right: 5px;
17
+ }
18
+ .plus-tag-input .plus-tag-form[data-v-twkrpsxi] {
19
+ flex: 1;
20
+ }
21
+ .plus-tag-input .plus-tag-form-item[data-v-twkrpsxi] {
22
+ margin-bottom: 0;
23
+ }
24
+ .plus-tag[data-v-twkrpsxi] {
25
+ cursor: pointer;
26
+ width: 100%;
27
+ display: flex;
28
+ justify-content: center;
29
+ align-items: center;
30
+ font-size: 12px;
31
+ line-height: 20px;
32
+ }
33
+ .plus-tag .bkaidev-plus-circle[data-v-twkrpsxi] {
34
+ font-size: 14px;
35
+ margin-right: 6px;
36
+ }
37
+ .plus-tag[data-v-twkrpsxi]:hover {
38
+ color: #3A84FF;
39
+ }
@@ -0,0 +1,12 @@
1
+ interface IProps {
2
+ modelValue: string[];
3
+ apiPrefix: string;
4
+ spaceId?: string;
5
+ popoverOptions?: Record<string, unknown>;
6
+ }
7
+ declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
+ "update:modelValue": (value: string[]) => any;
9
+ }, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
10
+ "onUpdate:modelValue"?: (value: string[]) => any;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import script from './index.script.vue.js.js';
2
+ script.__scopeId = "data-v-twkrpsxi";
3
+ script.__file = "./src/components/render-choose-tag/index.vue";
4
+ import './index.vue.css';
5
+ export default script;
@@ -1,10 +1,10 @@
1
1
 
2
- .collapse-title[data-v-tqsuac7s] {
2
+ .collapse-title[data-v-g29wk2m2] {
3
3
  height: 28px;
4
4
  background: #F0F1F5;
5
5
  border-radius: 2px;
6
6
  padding: 0 12px;
7
7
  }
8
- .collapse-title .is-hidden[data-v-tqsuac7s] {
8
+ .collapse-title .is-hidden[data-v-g29wk2m2] {
9
9
  transform: rotate(-90deg);
10
10
  }
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-tqsuac7s";
2
+ script.__scopeId = "data-v-g29wk2m2";
3
3
  script.__file = "./src/components/render-collapse/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -90,7 +90,7 @@ const _hoisted_2 = {
90
90
  class: "value-content g-white-space-pre-line g-mb-16"
91
91
  };
92
92
  import { EditLine } from 'bkui-vue/lib/icon';
93
- import { ref, watch } from 'vue';
93
+ import { ref, toRef, watch } from 'vue';
94
94
  import RenderAutoHeightTextarea from '../../../render-auto-height-textarea/index.vue.js';
95
95
  import Collapse from '../../../render-collapse/index.vue.js';
96
96
  import { useDatasetHttp } from '../../../../hooks/use-dataset-http.ts.js';
@@ -99,7 +99,8 @@ export default /*@__PURE__*/ _defineComponent({
99
99
  props: {
100
100
  index: {},
101
101
  datasetId: {},
102
- apiPrefix: {}
102
+ apiPrefix: {},
103
+ spaceId: {}
103
104
  },
104
105
  emits: [
105
106
  "success-edit"
@@ -107,7 +108,7 @@ export default /*@__PURE__*/ _defineComponent({
107
108
  setup (__props, { emit: __emit }) {
108
109
  const props = __props;
109
110
  const emits = __emit;
110
- const { updateDatasetData, getDatasetDataList } = useDatasetHttp(props.apiPrefix);
111
+ const { updateDatasetData, getDatasetDataList } = useDatasetHttp(props.apiPrefix, toRef(props, 'spaceId'));
111
112
  const renderFormData = ref();
112
113
  const editFormData = ref();
113
114
  const isShow = ref(false);
@@ -1,15 +1,15 @@
1
1
 
2
- .content[data-v-soldneby] {
2
+ .content[data-v-i3ixw9pm] {
3
3
  padding: 18px 24px 0;
4
4
  height: 100%;
5
5
  overflow: auto;
6
6
  }
7
- .data-set-edit-slider .value-content[data-v-soldneby] {
7
+ .data-set-edit-slider .value-content[data-v-i3ixw9pm] {
8
8
  padding: 16px;
9
9
  border: 1px solid #DCDEE5;
10
10
  line-height: 22px;
11
11
  }
12
- .data-set-edit-slider[data-v-soldneby] .bk-sideslider-title {
12
+ .data-set-edit-slider[data-v-i3ixw9pm] .bk-sideslider-title {
13
13
  justify-content: space-between;
14
14
  width: 100%;
15
15
  }