@blueking/ai-ui-sdk 0.1.2-beta.9 → 0.1.2

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 (121) 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 +113 -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.vue.css +8 -8
  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/edit-dataset-data/index.script.vue.js.js +159 -168
  17. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.css +3 -3
  18. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.d.ts +3 -0
  19. package/dist/components/render-dataset/components/edit-dataset-data/index.vue.js +1 -1
  20. package/dist/components/render-dataset/components/operation-record/index.script.vue.js.js +85 -89
  21. package/dist/components/render-dataset/components/operation-record/index.vue.css +4 -4
  22. package/dist/components/render-dataset/components/operation-record/index.vue.d.ts +6 -1
  23. package/dist/components/render-dataset/components/operation-record/index.vue.js +1 -1
  24. package/dist/components/render-dataset/components/operation-record/table/index.vue.css +1 -1
  25. package/dist/components/render-dataset/components/operation-record/table/index.vue.js +1 -1
  26. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.css +2 -2
  27. package/dist/components/render-dataset/components/operation-record/view-op-result/index.vue.js +1 -1
  28. package/dist/components/render-dataset/components/plus-dataset/dataset-footer.vue.d.ts +2 -2
  29. package/dist/components/render-dataset/components/plus-dataset/dataset-form.script.vue.js +2 -1
  30. package/dist/components/render-dataset/components/plus-dataset/index.script.vue.js.js +54 -65
  31. package/dist/components/render-dataset/components/plus-dataset/index.vue.css +2 -2
  32. package/dist/components/render-dataset/components/plus-dataset/index.vue.d.ts +3 -0
  33. package/dist/components/render-dataset/components/plus-dataset/index.vue.js +1 -1
  34. package/dist/components/render-dataset/components/plus-dataset-data/form/dataset.script.vue.js.js +8 -2
  35. package/dist/components/render-dataset/components/plus-dataset-data/form/dataset.vue.d.ts +1 -0
  36. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.css +1 -1
  37. package/dist/components/render-dataset/components/plus-dataset-data/form/footer.vue.js +1 -1
  38. package/dist/components/render-dataset/components/plus-dataset-data/form/index.script.vue.js.js +11 -4
  39. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.css +2 -2
  40. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.d.ts +1 -0
  41. package/dist/components/render-dataset/components/plus-dataset-data/form/index.vue.js +1 -1
  42. package/dist/components/render-dataset/components/plus-dataset-data/form/manual.script.vue.js +11 -5
  43. package/dist/components/render-dataset/components/plus-dataset-data/form/manual.vue.css +1 -1
  44. package/dist/components/render-dataset/components/plus-dataset-data/index.script.vue.js.js +46 -7
  45. package/dist/components/render-dataset/components/plus-dataset-data/index.vue.d.ts +2 -0
  46. package/dist/components/render-dataset/components/search-dataset/index.script.vue.js.js +3 -3
  47. package/dist/components/render-dataset/components/source-type-icon/index.script.vue.js.js +2 -2
  48. package/dist/components/render-dataset/components/source-type-icon/index.vue.js +0 -2
  49. package/dist/components/render-dataset/index.script.vue.js.js +28 -5
  50. package/dist/components/render-dataset/index.vue.css +1 -1
  51. package/dist/components/render-dataset/index.vue.d.ts +1 -0
  52. package/dist/components/render-dataset/index.vue.js +1 -1
  53. package/dist/components/render-dataset-detail/components/header.script.vue.js.js +10 -36
  54. package/dist/components/render-dataset-detail/components/header.vue.d.ts +1 -3
  55. package/dist/components/render-dataset-detail/index.script.vue.js.js +97 -15
  56. package/dist/components/render-dataset-detail/index.vue.d.ts +1 -0
  57. package/dist/components/render-dataset-detail-origin-data/components/batch-operation/index.script.vue.js.js +46 -15
  58. package/dist/components/render-dataset-detail-origin-data/components/batch-operation/index.vue.d.ts +3 -0
  59. package/dist/components/render-dataset-detail-origin-data/components/table/index.script.vue.js +258 -172
  60. package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.css +1 -1
  61. package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.d.ts +2 -0
  62. package/dist/components/render-dataset-detail-origin-data/components/table/index.vue.js +1 -1
  63. package/dist/components/render-dataset-detail-origin-data/index.script.vue.js.js +24 -4
  64. package/dist/components/render-dataset-detail-origin-data/index.vue.css +3 -3
  65. package/dist/components/render-dataset-detail-origin-data/index.vue.d.ts +2 -0
  66. package/dist/components/render-dataset-detail-origin-data/index.vue.js +1 -1
  67. package/dist/components/render-dataset-list/components/main.script.vue.js.js +39 -14
  68. package/dist/components/render-dataset-list/components/main.vue.css +3 -3
  69. package/dist/components/render-dataset-list/components/main.vue.d.ts +2 -0
  70. package/dist/components/render-dataset-list/components/main.vue.js +1 -1
  71. package/dist/components/render-dataset-list/components/table.script.vue.js.js +399 -266
  72. package/dist/components/render-dataset-list/components/table.vue.d.ts +2 -0
  73. package/dist/components/render-dataset-list/index.script.vue.js.js +5 -2
  74. package/dist/components/render-dataset-list/index.vue.d.ts +2 -0
  75. package/dist/components/render-expand-collapse/index.vue.css +3 -3
  76. package/dist/components/render-expand-collapse/index.vue.js +1 -1
  77. package/dist/components/render-file-card/index.vue.css +11 -11
  78. package/dist/components/render-file-card/index.vue.js +1 -1
  79. package/dist/components/render-file-type-icon/index.vue.css +5 -5
  80. package/dist/components/render-file-type-icon/index.vue.js +1 -1
  81. package/dist/components/render-header/index.vue.css +5 -5
  82. package/dist/components/render-header/index.vue.js +1 -1
  83. package/dist/components/render-router-tab/index.vue.css +3 -3
  84. package/dist/components/render-router-tab/index.vue.js +1 -1
  85. package/dist/{component.d.ts → components.d.ts} +3 -1
  86. package/dist/{component.ts.js → components.ts.js} +3 -1
  87. package/dist/enums.d.ts +1 -0
  88. package/dist/enums.ts.js +1 -0
  89. package/dist/event/index.d.ts +3 -3
  90. package/dist/event/index.ts.js +2 -2
  91. package/dist/events.d.ts +1 -0
  92. package/dist/events.ts.js +1 -0
  93. package/dist/helpers.d.ts +1 -0
  94. package/dist/helpers.ts.js +1 -0
  95. package/dist/hooks/use-chat.d.ts +16 -0
  96. package/dist/hooks/use-chat.ts.js +1 -1
  97. package/dist/hooks/use-dataset-http.d.ts +1 -1
  98. package/dist/hooks/use-dataset-http.ts.js +6 -3
  99. package/dist/hooks/use-permission-http.d.ts +7 -0
  100. package/dist/hooks/use-permission-http.ts.js +26 -0
  101. package/dist/hooks/use-permission.d.ts +9 -0
  102. package/dist/hooks/use-permission.ts.js +100 -0
  103. package/dist/hooks.d.ts +9 -0
  104. package/dist/hooks.ts.js +9 -0
  105. package/dist/http/helper/dataset.ts.js +7 -2
  106. package/dist/http/helper/permission.d.ts +7 -1
  107. package/dist/http/helper/permission.ts.js +11 -1
  108. package/dist/https.d.ts +2 -0
  109. package/dist/https.ts.js +2 -0
  110. package/dist/transforms.d.ts +4 -0
  111. package/dist/transforms.ts.js +4 -0
  112. package/dist/types/dataset.d.ts +7 -1
  113. package/dist/types/enum.d.ts +37 -1
  114. package/dist/types/enum.ts.js +38 -0
  115. package/dist/types/permission.d.ts +43 -0
  116. package/dist/types.d.ts +6 -0
  117. package/dist/types.ts.js +6 -0
  118. package/package.json +33 -9
  119. package/dist/components/render-dataset/components/source-type-icon/index.vue.css +0 -10
  120. package/dist/main.d.ts +0 -22
  121. package/dist/main.ts.js +0 -28
@@ -1,44 +1,39 @@
1
1
  import { defineComponent as _defineComponent } from 'vue';
2
- import { createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
2
+ import { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createBlock as _createBlock } from "vue";
3
3
  const _hoisted_1 = {
4
4
  class: "content"
5
5
  };
6
6
  const _hoisted_2 = {
7
7
  class: "toolbar"
8
8
  };
9
- import { ref, toRef } from 'vue';
9
+ import { ref, toRef, watch } from 'vue';
10
10
  import RenderSearchOperationRecord from '../search-operation-record/index.vue.js';
11
11
  import RenderTable from './table/index.vue.js';
12
12
  import { useDatasetHttp } from '../../../../hooks/use-dataset-http.ts.js';
13
13
  export default /*@__PURE__*/ _defineComponent({
14
14
  props: {
15
+ modelValue: {
16
+ type: Boolean
17
+ },
15
18
  apiPrefix: {},
16
19
  datasetId: {},
17
20
  datasetDataId: {},
18
21
  spaceId: {}
19
22
  },
20
- setup (__props) {
23
+ emits: [
24
+ "update:modelValue"
25
+ ],
26
+ setup (__props, { emit: __emit }) {
21
27
  const props = __props;
28
+ const emits = __emit;
22
29
  const { getDataset } = useDatasetHttp(props.apiPrefix, toRef(props, 'spaceId'));
23
30
  const search = ref({
24
31
  resourceTypeId: 'dataset_item'
25
32
  });
26
- const isShow = ref(false);
27
33
  const datasetName = ref('');
28
34
  const loading = ref(false);
29
- const handleShow = ()=>{
30
- isShow.value = true;
31
- search.value = {
32
- resourceTypeId: 'dataset_item',
33
- parentId: props.datasetId
34
- };
35
- if (props.datasetDataId) {
36
- search.value.instanceId = props.datasetDataId;
37
- }
38
- handleGetDatasetName();
39
- };
40
35
  const handleClose = ()=>{
41
- isShow.value = false;
36
+ emits('update:modelValue', false);
42
37
  return true;
43
38
  };
44
39
  const handleDateChange = (value)=>{
@@ -55,88 +50,89 @@ export default /*@__PURE__*/ _defineComponent({
55
50
  loading.value = false;
56
51
  });
57
52
  };
53
+ const handleInit = ()=>{
54
+ search.value = {
55
+ resourceTypeId: 'dataset_item',
56
+ parentId: props.datasetId
57
+ };
58
+ if (props.datasetDataId) {
59
+ search.value.instanceId = props.datasetDataId;
60
+ }
61
+ handleGetDatasetName();
62
+ };
63
+ watch(()=>props.modelValue, (val)=>{
64
+ if (val) {
65
+ handleInit();
66
+ }
67
+ });
58
68
  return (_ctx, _cache)=>{
59
- const _component_bk_button = _resolveComponent("bk-button");
60
69
  const _component_bk_loading = _resolveComponent("bk-loading");
61
70
  const _component_bk_date_picker = _resolveComponent("bk-date-picker");
62
71
  const _component_bk_sideslider = _resolveComponent("bk-sideslider");
63
- return _openBlock(), _createElementBlock(_Fragment, null, [
64
- _createVNode(_component_bk_button, _mergeProps(_ctx.$attrs, {
65
- onClick: handleShow
66
- }), {
67
- default: _withCtx(()=>_cache[1] || (_cache[1] = [
68
- _createTextVNode(" 操作记录 ")
69
- ])),
70
- _: 1 /* STABLE */ ,
71
- __: [
72
- 1
73
- ]
74
- }, 16 /* FULL_PROPS */ ),
75
- _createVNode(_component_bk_sideslider, {
76
- class: "record-slider",
77
- width: 960,
78
- "is-show": isShow.value,
79
- "before-close": handleClose
80
- }, {
81
- header: _withCtx(()=>[
82
- _createVNode(_component_bk_loading, {
83
- loading: loading.value
84
- }, {
85
- default: _withCtx(()=>[
86
- _createTextVNode(" 数据集【" + _toDisplayString(datasetName.value) + "】操作记录 ", 1 /* TEXT */ )
87
- ]),
88
- _: 1 /* STABLE */
89
- }, 8 /* PROPS */ , [
90
- "loading"
91
- ])
92
- ]),
93
- default: _withCtx(()=>{
94
- var _search_value_date, _search_value_date1;
95
- return [
96
- _createElementVNode("section", _hoisted_1, [
97
- _createElementVNode("section", _hoisted_2, [
98
- _createVNode(RenderSearchOperationRecord, {
99
- modelValue: search.value,
100
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>search.value = $event),
101
- "dataset-id": _ctx.datasetId,
102
- class: "record-search"
103
- }, null, 8 /* PROPS */ , [
104
- "modelValue",
105
- "dataset-id"
106
- ]),
107
- _createVNode(_component_bk_date_picker, {
108
- clearable: "",
109
- class: "record-data-picker",
110
- type: "daterange",
111
- format: "yyyy-MM-dd",
112
- "model-value": [
113
- (_search_value_date = search.value.date) === null || _search_value_date === void 0 ? void 0 : _search_value_date.start,
114
- (_search_value_date1 = search.value.date) === null || _search_value_date1 === void 0 ? void 0 : _search_value_date1.end
115
- ],
116
- onChange: handleDateChange
117
- }, null, 8 /* PROPS */ , [
118
- "model-value"
119
- ])
72
+ return _openBlock(), _createBlock(_component_bk_sideslider, {
73
+ class: "record-slider",
74
+ width: 960,
75
+ "is-show": _ctx.modelValue,
76
+ "before-close": handleClose
77
+ }, {
78
+ header: _withCtx(()=>[
79
+ _createVNode(_component_bk_loading, {
80
+ loading: loading.value
81
+ }, {
82
+ default: _withCtx(()=>[
83
+ _createTextVNode(" 数据集【" + _toDisplayString(datasetName.value) + "】操作记录 ", 1 /* TEXT */ )
120
84
  ]),
121
- _createVNode(RenderTable, {
85
+ _: 1 /* STABLE */
86
+ }, 8 /* PROPS */ , [
87
+ "loading"
88
+ ])
89
+ ]),
90
+ default: _withCtx(()=>{
91
+ var _search_value_date, _search_value_date1;
92
+ return [
93
+ _createElementVNode("section", _hoisted_1, [
94
+ _createElementVNode("section", _hoisted_2, [
95
+ _createVNode(RenderSearchOperationRecord, {
96
+ modelValue: search.value,
97
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>search.value = $event),
122
98
  "dataset-id": _ctx.datasetId,
123
- search: search.value,
124
- "api-prefix": _ctx.apiPrefix,
125
- "space-id": _ctx.spaceId
99
+ class: "record-search"
100
+ }, null, 8 /* PROPS */ , [
101
+ "modelValue",
102
+ "dataset-id"
103
+ ]),
104
+ _createVNode(_component_bk_date_picker, {
105
+ clearable: "",
106
+ class: "record-data-picker",
107
+ type: "daterange",
108
+ format: "yyyy-MM-dd",
109
+ "model-value": [
110
+ (_search_value_date = search.value.date) === null || _search_value_date === void 0 ? void 0 : _search_value_date.start,
111
+ (_search_value_date1 = search.value.date) === null || _search_value_date1 === void 0 ? void 0 : _search_value_date1.end
112
+ ],
113
+ onChange: handleDateChange
126
114
  }, null, 8 /* PROPS */ , [
127
- "dataset-id",
128
- "search",
129
- "api-prefix",
130
- "space-id"
115
+ "model-value"
131
116
  ])
117
+ ]),
118
+ _createVNode(RenderTable, {
119
+ "dataset-id": _ctx.datasetId,
120
+ search: search.value,
121
+ "api-prefix": _ctx.apiPrefix,
122
+ "space-id": _ctx.spaceId
123
+ }, null, 8 /* PROPS */ , [
124
+ "dataset-id",
125
+ "search",
126
+ "api-prefix",
127
+ "space-id"
132
128
  ])
133
- ];
134
- }),
135
- _: 1 /* STABLE */
136
- }, 8 /* PROPS */ , [
137
- "is-show"
138
- ])
139
- ], 64 /* STABLE_FRAGMENT */ );
129
+ ])
130
+ ];
131
+ }),
132
+ _: 1 /* STABLE */
133
+ }, 8 /* PROPS */ , [
134
+ "is-show"
135
+ ]);
140
136
  };
141
137
  }
142
138
  });
@@ -1,18 +1,18 @@
1
1
 
2
- .content[data-v-x1id1vf7] {
2
+ .content[data-v-qhh5812l] {
3
3
  padding: 0 24px 0px 32px;
4
4
  height: 100%;
5
5
  }
6
- .content .toolbar[data-v-x1id1vf7] {
6
+ .content .toolbar[data-v-qhh5812l] {
7
7
  margin: 16px 0;
8
8
  display: flex;
9
9
  align-items: center;
10
10
  justify-content: right;
11
11
  gap: 8px;
12
12
  }
13
- .content .toolbar .record-search[data-v-x1id1vf7] {
13
+ .content .toolbar .record-search[data-v-qhh5812l] {
14
14
  width: 360px;
15
15
  }
16
- .content .toolbar .record-data-picker[data-v-x1id1vf7] {
16
+ .content .toolbar .record-data-picker[data-v-qhh5812l] {
17
17
  width: 260px;
18
18
  }
@@ -1,8 +1,13 @@
1
1
  interface IProps {
2
+ modelValue: boolean;
2
3
  apiPrefix: string;
3
4
  datasetId: number;
4
5
  datasetDataId?: number;
5
6
  spaceId?: string;
6
7
  }
7
- declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
+ "update:modelValue": (modelValue: boolean) => any;
10
+ }, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
11
+ "onUpdate:modelValue"?: (modelValue: boolean) => any;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
13
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-x1id1vf7";
2
+ script.__scopeId = "data-v-qhh5812l";
3
3
  script.__file = "./src/components/render-dataset/components/operation-record/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,5 +1,5 @@
1
1
 
2
- .text[data-v-buakvoe5] {
2
+ .text[data-v-avjggwwh] {
3
3
  display: -webkit-box;
4
4
  -webkit-line-clamp: 2;
5
5
  -webkit-box-orient: vertical;
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-buakvoe5";
2
+ script.__scopeId = "data-v-avjggwwh";
3
3
  script.__file = "./src/components/render-dataset/components/operation-record/table/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -1,10 +1,10 @@
1
1
 
2
- .content[data-v-spmc1qh3] {
2
+ .content[data-v-yylfaf3z] {
3
3
  padding: 18px 24px 0;
4
4
  height: 100%;
5
5
  overflow: auto;
6
6
  }
7
- .content .value-content[data-v-spmc1qh3] {
7
+ .content .value-content[data-v-yylfaf3z] {
8
8
  margin-top: 8px;
9
9
  padding: 16px;
10
10
  border: 1px solid #DCDEE5;
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-spmc1qh3";
2
+ script.__scopeId = "data-v-yylfaf3z";
3
3
  script.__file = "./src/components/render-dataset/components/operation-record/view-op-result/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -7,10 +7,10 @@ interface IProps {
7
7
  spaceId?: string;
8
8
  }
9
9
  declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
- cancel: () => any;
11
10
  success: (data: IDataset) => any;
11
+ cancel: () => any;
12
12
  }, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
13
- onCancel?: () => any;
14
13
  onSuccess?: (data: IDataset) => any;
14
+ onCancel?: () => any;
15
15
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
16
  export default _default;
@@ -238,7 +238,8 @@ export default /*@__PURE__*/ _defineComponent({
238
238
  ],
239
239
  border: [
240
240
  'row',
241
- 'col'
241
+ 'col',
242
+ 'outer'
242
243
  ]
243
244
  }, {
244
245
  default: _withCtx(()=>[
@@ -27,7 +27,7 @@ function _object_spread(target) {
27
27
  return target;
28
28
  }
29
29
  import { defineComponent as _defineComponent } from 'vue';
30
- import { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, Fragment as _Fragment } from "vue";
30
+ import { createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createBlock as _createBlock } from "vue";
31
31
  const _hoisted_1 = {
32
32
  key: 0,
33
33
  class: "dataset-data-content"
@@ -38,6 +38,9 @@ import DatasetForm from './dataset-form.vue.js';
38
38
  import { useFormLeaveConfirm } from '../../../../hooks/use-form-leave-confirm.ts.js';
39
39
  export default /*@__PURE__*/ _defineComponent({
40
40
  props: {
41
+ modelValue: {
42
+ type: Boolean
43
+ },
41
44
  apiPrefix: {},
42
45
  dataset: {},
43
46
  spaceId: {},
@@ -46,6 +49,7 @@ export default /*@__PURE__*/ _defineComponent({
46
49
  }
47
50
  },
48
51
  emits: [
52
+ "update:modelValue",
49
53
  "success-plus"
50
54
  ],
51
55
  setup (__props, { emit: __emit }) {
@@ -54,18 +58,14 @@ export default /*@__PURE__*/ _defineComponent({
54
58
  const { handleInitFormLeaveConfirm, handleFormLeaveConfirm } = useFormLeaveConfirm();
55
59
  const formRef = useTemplateRef('formRef');
56
60
  const formData = ref();
57
- const isShow = ref(false);
58
61
  const validate = ()=>formRef.value.validate();
59
- const handleShow = ()=>{
60
- isShow.value = true;
61
- };
62
62
  const handleSuccess = (data)=>{
63
63
  emits('success-plus', data);
64
64
  handleClose(true);
65
65
  };
66
66
  const handleClose = (noValidate)=>{
67
67
  const close = ()=>{
68
- isShow.value = false;
68
+ emits('update:modelValue', false);
69
69
  };
70
70
  handleFormLeaveConfirm(close, formData.value, noValidate);
71
71
  return true;
@@ -86,7 +86,7 @@ export default /*@__PURE__*/ _defineComponent({
86
86
  formRef.value.clearValidate();
87
87
  });
88
88
  };
89
- watch(()=>isShow.value, (val)=>{
89
+ watch(()=>props.modelValue, (val)=>{
90
90
  if (val) {
91
91
  handleInitFormData();
92
92
  handleInitFormLeaveConfirm(formData.value);
@@ -94,72 +94,61 @@ export default /*@__PURE__*/ _defineComponent({
94
94
  }
95
95
  });
96
96
  return (_ctx, _cache)=>{
97
- const _component_bk_button = _resolveComponent("bk-button");
98
97
  const _component_bk_sideslider = _resolveComponent("bk-sideslider");
99
- return _openBlock(), _createElementBlock(_Fragment, null, [
100
- _createVNode(_component_bk_button, _mergeProps(_ctx.$attrs, {
101
- onClick: handleShow
102
- }), {
103
- default: _withCtx(()=>[
104
- _createTextVNode(_toDisplayString(_ctx.dataset ? '编辑数据集' : '创建数据集'), 1 /* TEXT */ )
105
- ]),
106
- _: 1 /* STABLE */
107
- }, 16 /* FULL_PROPS */ ),
108
- _createVNode(_component_bk_sideslider, {
109
- title: _ctx.dataset ? '编辑数据集' : '创建数据集',
110
- width: 960,
111
- "is-show": isShow.value,
112
- "before-close": handleClose,
113
- class: "dataset-data-slider"
114
- }, {
115
- footer: _withCtx(()=>{
116
- var _ctx_dataset;
117
- return [
118
- _createVNode(DatasetFooter, {
119
- "form-data": formData.value,
98
+ return _openBlock(), _createBlock(_component_bk_sideslider, {
99
+ title: _ctx.dataset ? '编辑数据集' : '创建数据集',
100
+ width: 960,
101
+ "is-show": _ctx.modelValue,
102
+ "before-close": handleClose,
103
+ class: "dataset-data-slider"
104
+ }, {
105
+ footer: _withCtx(()=>{
106
+ var _ctx_dataset;
107
+ return [
108
+ _createVNode(DatasetFooter, {
109
+ "form-data": formData.value,
110
+ id: (_ctx_dataset = _ctx.dataset) === null || _ctx_dataset === void 0 ? void 0 : _ctx_dataset.id,
111
+ "api-prefix": _ctx.apiPrefix,
112
+ "space-id": _ctx.spaceId,
113
+ validate: validate,
114
+ onSuccess: handleSuccess,
115
+ onCancel: handleClose
116
+ }, null, 8 /* PROPS */ , [
117
+ "form-data",
118
+ "id",
119
+ "api-prefix",
120
+ "space-id"
121
+ ])
122
+ ];
123
+ }),
124
+ default: _withCtx(()=>{
125
+ var _ctx_dataset;
126
+ return [
127
+ formData.value ? (_openBlock(), _createElementBlock("section", _hoisted_1, [
128
+ _createVNode(DatasetForm, {
129
+ ref_key: "formRef",
130
+ ref: formRef,
120
131
  id: (_ctx_dataset = _ctx.dataset) === null || _ctx_dataset === void 0 ? void 0 : _ctx_dataset.id,
121
132
  "api-prefix": _ctx.apiPrefix,
122
133
  "space-id": _ctx.spaceId,
123
- validate: validate,
124
- onSuccess: handleSuccess,
125
- onCancel: handleClose
134
+ "is-internal": _ctx.isInternal,
135
+ "form-data": formData.value,
136
+ "onUpdate:formData": _cache[0] || (_cache[0] = ($event)=>formData.value = $event)
126
137
  }, null, 8 /* PROPS */ , [
127
- "form-data",
128
138
  "id",
129
139
  "api-prefix",
130
- "space-id"
140
+ "space-id",
141
+ "is-internal",
142
+ "form-data"
131
143
  ])
132
- ];
133
- }),
134
- default: _withCtx(()=>{
135
- var _ctx_dataset;
136
- return [
137
- formData.value ? (_openBlock(), _createElementBlock("section", _hoisted_1, [
138
- _createVNode(DatasetForm, {
139
- ref_key: "formRef",
140
- ref: formRef,
141
- id: (_ctx_dataset = _ctx.dataset) === null || _ctx_dataset === void 0 ? void 0 : _ctx_dataset.id,
142
- "api-prefix": _ctx.apiPrefix,
143
- "space-id": _ctx.spaceId,
144
- "is-internal": _ctx.isInternal,
145
- "form-data": formData.value,
146
- "onUpdate:formData": _cache[0] || (_cache[0] = ($event)=>formData.value = $event)
147
- }, null, 8 /* PROPS */ , [
148
- "id",
149
- "api-prefix",
150
- "space-id",
151
- "is-internal",
152
- "form-data"
153
- ])
154
- ])) : _createCommentVNode("v-if", true)
155
- ];
156
- }),
157
- _: 1 /* STABLE */
158
- }, 8 /* PROPS */ , [
159
- "title",
160
- "is-show"
161
- ])
162
- ], 64 /* STABLE_FRAGMENT */ );
144
+ ])) : _createCommentVNode("v-if", true)
145
+ ];
146
+ }),
147
+ _: 1 /* STABLE */
148
+ }, 8 /* PROPS */ , [
149
+ "title",
150
+ "is-show"
151
+ ]);
163
152
  };
164
153
  }
165
154
  });
@@ -1,8 +1,8 @@
1
1
 
2
- .dataset-data-content[data-v-z8zlmy61] {
2
+ .dataset-data-content[data-v-xsua8eow] {
3
3
  padding: 20px 24px;
4
4
  height: 100%;
5
5
  }
6
- .dataset-data-slider[data-v-z8zlmy61] .bk-modal-content {
6
+ .dataset-data-slider[data-v-xsua8eow] .bk-modal-content {
7
7
  scrollbar-gutter: inherit !important;
8
8
  }
@@ -1,13 +1,16 @@
1
1
  import type { IDataset } from '@/types/dataset';
2
2
  interface IProps {
3
+ modelValue: boolean;
3
4
  apiPrefix: string;
4
5
  dataset?: IDataset;
5
6
  spaceId?: string;
6
7
  isInternal?: boolean;
7
8
  }
8
9
  declare const _default: import("vue").DefineComponent<IProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
10
+ "update:modelValue": (modelValue: boolean) => any;
9
11
  "success-plus": (data: IDataset) => any;
10
12
  }, string, import("vue").PublicProps, Readonly<IProps> & Readonly<{
13
+ "onUpdate:modelValue"?: (modelValue: boolean) => any;
11
14
  "onSuccess-plus"?: (data: IDataset) => any;
12
15
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
16
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import script from './index.script.vue.js.js';
2
- script.__scopeId = "data-v-z8zlmy61";
2
+ script.__scopeId = "data-v-xsua8eow";
3
3
  script.__file = "./src/components/render-dataset/components/plus-dataset/index.vue";
4
4
  import './index.vue.css';
5
5
  export default script;
@@ -61,7 +61,10 @@ export default /*@__PURE__*/ _defineComponent({
61
61
  disabledChooseDataset: {
62
62
  type: Boolean
63
63
  },
64
- spaceId: {}
64
+ spaceId: {},
65
+ isInternal: {
66
+ type: Boolean
67
+ }
65
68
  },
66
69
  emits: [
67
70
  "update:modelValue"
@@ -84,7 +87,10 @@ export default /*@__PURE__*/ _defineComponent({
84
87
  const handleGetDatasetList = ()=>{
85
88
  loading.value = true;
86
89
  getDatasetList().then((data)=>{
87
- datasets.value = data.results;
90
+ datasets.value = data.results.filter((dataset)=>{
91
+ var _dataset_permission;
92
+ return ((_dataset_permission = dataset.permission) === null || _dataset_permission === void 0 ? void 0 : _dataset_permission.manageDataset) || !props.isInternal;
93
+ });
88
94
  }).finally(()=>{
89
95
  loading.value = false;
90
96
  });
@@ -4,6 +4,7 @@ interface IProps {
4
4
  apiPrefix: string;
5
5
  disabledChooseDataset?: boolean;
6
6
  spaceId?: string;
7
+ isInternal?: boolean;
7
8
  }
8
9
  declare const _default: import("vue").DefineComponent<IProps, {
9
10
  validate: () => Promise<unknown>;
@@ -1,5 +1,5 @@
1
1
 
2
- .footer-button[data-v-9bkd05i5] {
2
+ .footer-button[data-v-5dreb2jq] {
3
3
  width: 88px;
4
4
  margin-right: 8px;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import script from './footer.script.vue.js.js';
2
- script.__scopeId = "data-v-9bkd05i5";
2
+ script.__scopeId = "data-v-5dreb2jq";
3
3
  script.__file = "./src/components/render-dataset/components/plus-dataset-data/form/footer.vue";
4
4
  import './footer.vue.css';
5
5
  export default script;
@@ -50,7 +50,10 @@ export default /*@__PURE__*/ _defineComponent({
50
50
  disabledChooseDataset: {
51
51
  type: Boolean
52
52
  },
53
- spaceId: {}
53
+ spaceId: {},
54
+ isInternal: {
55
+ type: Boolean
56
+ }
54
57
  },
55
58
  emits: [
56
59
  "update:isShow",
@@ -98,9 +101,11 @@ export default /*@__PURE__*/ _defineComponent({
98
101
  }, props.datasetData);
99
102
  };
100
103
  watch(()=>props.isShow, ()=>{
101
- handleInitData();
102
- handleInitFormLeaveConfirm(renderDatasetData.value);
103
- handleClearValidate();
104
+ if (props.isShow) {
105
+ handleInitData();
106
+ handleInitFormLeaveConfirm(renderDatasetData.value);
107
+ handleClearValidate();
108
+ }
104
109
  });
105
110
  return (_ctx, _cache)=>{
106
111
  const _component_bk_sideslider = _resolveComponent("bk-sideslider");
@@ -163,6 +168,7 @@ export default /*@__PURE__*/ _defineComponent({
163
168
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event)=>renderDatasetData.value = $event),
164
169
  "api-prefix": _ctx.apiPrefix,
165
170
  "space-id": _ctx.spaceId,
171
+ "is-internal": _ctx.isInternal,
166
172
  "disabled-choose-dataset": _ctx.disabledChooseDataset,
167
173
  ref_key: "datasetRef",
168
174
  ref: datasetRef
@@ -170,6 +176,7 @@ export default /*@__PURE__*/ _defineComponent({
170
176
  "modelValue",
171
177
  "api-prefix",
172
178
  "space-id",
179
+ "is-internal",
173
180
  "disabled-choose-dataset"
174
181
  ])
175
182
  ])) : _createCommentVNode("v-if", true)
@@ -1,7 +1,7 @@
1
1
 
2
- .plus-dataset-data[data-v-l9vdg3rx] {
2
+ .plus-dataset-data[data-v-qoa994rt] {
3
3
  padding: 20px 24px;
4
4
  }
5
- .plus-dataset-sideslider[data-v-l9vdg3rx] .bk-modal-content {
5
+ .plus-dataset-sideslider[data-v-qoa994rt] .bk-modal-content {
6
6
  scrollbar-gutter: inherit !important;
7
7
  }