@sdata/web-vue 3.16.1 → 3.17.0

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 (69) hide show
  1. package/dist/sd.css +81 -0
  2. package/dist/sd.min.css +1 -1
  3. package/es/button/button.vue.d.ts +8 -4
  4. package/es/button/button.vue_vue_type_script_setup_true_lang.js +33 -14
  5. package/es/button/index.d.ts +4 -0
  6. package/es/button/style/index.css +11 -0
  7. package/es/button/style/index.scss +12 -0
  8. package/es/cascader/base-cascader-panel.js +1 -1
  9. package/es/cascader/cascader-column.js +1 -1
  10. package/es/cascader/cascader-search-panel.js +1 -1
  11. package/es/components.d.ts +1 -0
  12. package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +1 -1
  13. package/es/icon/icon-list/icon-list.js +5 -0
  14. package/es/icon/icon-list/icon-list.vue_vue_type_script_setup_true_lang.js +52 -0
  15. package/es/icon/icon-list/index.js +9 -0
  16. package/es/index.css +81 -0
  17. package/es/index.d.ts +2 -0
  18. package/es/index.js +3 -2
  19. package/es/index.scss +1 -0
  20. package/es/kv-list/constants.d.ts +1 -0
  21. package/es/kv-list/constants.js +127 -0
  22. package/es/kv-list/index.d.ts +302 -0
  23. package/es/kv-list/index.js +10 -0
  24. package/es/kv-list/kv-list-row.js +5 -0
  25. package/es/kv-list/kv-list-row.vue.d.ts +29 -0
  26. package/es/kv-list/kv-list-row.vue_vue_type_script_setup_true_lang.js +123 -0
  27. package/es/kv-list/kv-list.js +5 -0
  28. package/es/kv-list/kv-list.vue.d.ts +34 -0
  29. package/es/kv-list/kv-list.vue_vue_type_script_setup_true_lang.js +262 -0
  30. package/es/kv-list/style/css.js +2 -0
  31. package/es/kv-list/style/index.css +86 -0
  32. package/es/kv-list/style/index.d.ts +2 -0
  33. package/es/kv-list/style/index.js +2 -0
  34. package/es/kv-list/style/index.scss +93 -0
  35. package/es/kv-list/style/token.scss +14 -0
  36. package/es/kv-list/types.d.ts +29 -0
  37. package/es/kv-list/utils.d.ts +8 -0
  38. package/es/kv-list/utils.js +32 -0
  39. package/es/list/list.js +1 -1
  40. package/es/locale/interface.d.ts +11 -0
  41. package/es/locale/lang/ar-eg.js +2 -0
  42. package/es/locale/lang/de-de.js +2 -0
  43. package/es/locale/lang/en-us.js +2 -0
  44. package/es/locale/lang/es-es.js +2 -0
  45. package/es/locale/lang/fr-fr.js +2 -0
  46. package/es/locale/lang/id-id.js +2 -0
  47. package/es/locale/lang/it-it.js +2 -0
  48. package/es/locale/lang/ja-jp.js +2 -0
  49. package/es/locale/lang/km-kh.js +2 -0
  50. package/es/locale/lang/ko-kr.js +2 -0
  51. package/es/locale/lang/kv-list.d.ts +2 -0
  52. package/es/locale/lang/kv-list.js +14 -0
  53. package/es/locale/lang/ms-my.js +2 -0
  54. package/es/locale/lang/nl-nl.js +2 -0
  55. package/es/locale/lang/pt-pt.js +2 -0
  56. package/es/locale/lang/ru-ru.js +2 -0
  57. package/es/locale/lang/th-th.js +2 -0
  58. package/es/locale/lang/vi-vn.js +2 -0
  59. package/es/locale/lang/zh-cn.js +11 -0
  60. package/es/locale/lang/zh-tw.js +11 -0
  61. package/es/sd-vue.js +3 -1
  62. package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +2 -1
  63. package/es/table/table.js +1 -1
  64. package/es/transfer/transfer-view.vue_vue_type_script_setup_true_lang.js +1 -1
  65. package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +2 -1
  66. package/json/vetur-attributes.json +17 -0
  67. package/json/vetur-tags.json +9 -0
  68. package/json/web-types.json +48 -1
  69. package/package.json +3 -2
@@ -0,0 +1,302 @@
1
+ import type { App } from 'vue';
2
+ import type { SDOptions } from '../_utils/types';
3
+ import _KvList from './kv-list.vue';
4
+ declare const KvList: {
5
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<{
6
+ type?: import("./types").KvListType;
7
+ keyProps?: Partial<Omit<Partial<{
8
+ type: "text" | "password";
9
+ error: boolean;
10
+ readonly: string | boolean;
11
+ disabled: boolean;
12
+ defaultValue: string;
13
+ allowClear: boolean;
14
+ maxLength: number | {
15
+ length: number;
16
+ errorOnly?: boolean;
17
+ };
18
+ showWordLimit: boolean;
19
+ }> & Omit<{
20
+ readonly type: "text" | "password";
21
+ readonly error: boolean;
22
+ readonly readonly: string | boolean;
23
+ readonly disabled: boolean;
24
+ readonly defaultValue: string;
25
+ readonly allowClear: boolean;
26
+ readonly maxLength: number | {
27
+ length: number;
28
+ errorOnly?: boolean;
29
+ };
30
+ readonly showWordLimit: boolean;
31
+ readonly size?: "small" | "mini" | "medium" | "large" | undefined;
32
+ readonly modelValue?: string | undefined;
33
+ readonly placeholder?: string | undefined;
34
+ readonly prepend?: string | undefined;
35
+ readonly append?: string | undefined;
36
+ readonly wordLength?: ((value: string) => number) | undefined;
37
+ readonly wordSlice?: ((value: string, maxLength: number) => string) | undefined;
38
+ readonly inputAttrs?: Record<string, any> | undefined;
39
+ readonly onFocus?: ((_ev: FocusEvent) => any) | undefined;
40
+ readonly onClear?: ((_ev: MouseEvent) => any) | undefined;
41
+ readonly onBlur?: ((_ev: FocusEvent) => any) | undefined;
42
+ readonly onChange?: ((_value: string, _ev: Event) => any) | undefined;
43
+ readonly onInput?: ((_value: string, _ev: Event) => any) | undefined;
44
+ readonly "onUpdate:modelValue"?: ((_value: string) => any) | undefined;
45
+ readonly onPressEnter?: ((_ev: KeyboardEvent) => any) | undefined;
46
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "error" | "readonly" | "disabled" | "defaultValue" | "allowClear" | "maxLength" | "showWordLimit"> & Partial<{
47
+ readonly: string | boolean;
48
+ data: (string | number | import("../index.ts").SelectOptionData | import("../index.ts").SelectOptionGroup)[];
49
+ disabled: boolean;
50
+ defaultValue: string;
51
+ modelValue: string;
52
+ allowClear: boolean;
53
+ filterOption: import("../index.ts").FilterOption;
54
+ strict: boolean;
55
+ }> & Omit<{
56
+ readonly readonly: string | boolean;
57
+ readonly data: (string | number | import("../index.ts").SelectOptionData | import("../index.ts").SelectOptionGroup)[];
58
+ readonly disabled: boolean;
59
+ readonly defaultValue: string;
60
+ readonly allowClear: boolean;
61
+ readonly filterOption: import("../index.ts").FilterOption;
62
+ readonly strict: boolean;
63
+ readonly popupContainer?: string | HTMLElement | null | undefined;
64
+ readonly modelValue?: string | undefined;
65
+ readonly triggerProps?: import("../index.ts").TriggerProps | undefined;
66
+ readonly virtualListProps?: import("../_components/virtual-list/interface.ts").VirtualListProps | undefined;
67
+ readonly onSearch?: ((_value: string) => any) | undefined;
68
+ readonly onClear?: ((_ev: Event) => any) | undefined;
69
+ readonly onChange?: ((_value: string) => any) | undefined;
70
+ readonly onSelect?: ((_value: string) => any) | undefined;
71
+ readonly "onUpdate:modelValue"?: ((_value: string) => any) | undefined;
72
+ readonly onDropdownScroll?: ((_ev: Event) => any) | undefined;
73
+ readonly onDropdownReachBottom?: ((_ev: Event) => any) | undefined;
74
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "readonly" | "data" | "disabled" | "defaultValue" | "modelValue" | "allowClear" | "filterOption" | "strict">, "defaultValue" | "modelValue" | "onUpdate:modelValue">>;
75
+ valueProps?: Partial<Omit<Partial<{
76
+ type: "text" | "password";
77
+ error: boolean;
78
+ readonly: string | boolean;
79
+ disabled: boolean;
80
+ defaultValue: string;
81
+ allowClear: boolean;
82
+ maxLength: number | {
83
+ length: number;
84
+ errorOnly?: boolean;
85
+ };
86
+ showWordLimit: boolean;
87
+ }> & Omit<{
88
+ readonly type: "text" | "password";
89
+ readonly error: boolean;
90
+ readonly readonly: string | boolean;
91
+ readonly disabled: boolean;
92
+ readonly defaultValue: string;
93
+ readonly allowClear: boolean;
94
+ readonly maxLength: number | {
95
+ length: number;
96
+ errorOnly?: boolean;
97
+ };
98
+ readonly showWordLimit: boolean;
99
+ readonly size?: "small" | "mini" | "medium" | "large" | undefined;
100
+ readonly modelValue?: string | undefined;
101
+ readonly placeholder?: string | undefined;
102
+ readonly prepend?: string | undefined;
103
+ readonly append?: string | undefined;
104
+ readonly wordLength?: ((value: string) => number) | undefined;
105
+ readonly wordSlice?: ((value: string, maxLength: number) => string) | undefined;
106
+ readonly inputAttrs?: Record<string, any> | undefined;
107
+ readonly onFocus?: ((_ev: FocusEvent) => any) | undefined;
108
+ readonly onClear?: ((_ev: MouseEvent) => any) | undefined;
109
+ readonly onBlur?: ((_ev: FocusEvent) => any) | undefined;
110
+ readonly onChange?: ((_value: string, _ev: Event) => any) | undefined;
111
+ readonly onInput?: ((_value: string, _ev: Event) => any) | undefined;
112
+ readonly "onUpdate:modelValue"?: ((_value: string) => any) | undefined;
113
+ readonly onPressEnter?: ((_ev: KeyboardEvent) => any) | undefined;
114
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "error" | "readonly" | "disabled" | "defaultValue" | "allowClear" | "maxLength" | "showWordLimit"> & Partial<{
115
+ visibility: boolean;
116
+ defaultVisibility: boolean;
117
+ invisibleButton: boolean;
118
+ }> & Omit<{
119
+ readonly defaultVisibility: boolean;
120
+ readonly invisibleButton: boolean;
121
+ readonly visibility?: boolean | undefined;
122
+ readonly "onVisibility-change"?: ((_visible: boolean) => any) | undefined;
123
+ readonly "onUpdate:visibility"?: ((_visible: boolean) => any) | undefined;
124
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "visibility" | "defaultVisibility" | "invisibleButton">, "defaultValue" | "modelValue" | "onUpdate:modelValue">>;
125
+ disabled?: boolean;
126
+ bulkEditable?: boolean;
127
+ } & {
128
+ json?: import("./types").KvListItem[];
129
+ bulk?: string;
130
+ }> & Readonly<{
131
+ "onUpdate:json"?: ((value: import("./types").KvListItem[]) => any) | undefined;
132
+ "onUpdate:bulk"?: ((value: string) => any) | undefined;
133
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
134
+ "update:json": (value: import("./types").KvListItem[]) => any;
135
+ "update:bulk": (value: string) => any;
136
+ }, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
137
+ P: {};
138
+ B: {};
139
+ D: {};
140
+ C: {};
141
+ M: {};
142
+ Defaults: {};
143
+ }, Readonly<{
144
+ type?: import("./types").KvListType;
145
+ keyProps?: Partial<Omit<Partial<{
146
+ type: "text" | "password";
147
+ error: boolean;
148
+ readonly: string | boolean;
149
+ disabled: boolean;
150
+ defaultValue: string;
151
+ allowClear: boolean;
152
+ maxLength: number | {
153
+ length: number;
154
+ errorOnly?: boolean;
155
+ };
156
+ showWordLimit: boolean;
157
+ }> & Omit<{
158
+ readonly type: "text" | "password";
159
+ readonly error: boolean;
160
+ readonly readonly: string | boolean;
161
+ readonly disabled: boolean;
162
+ readonly defaultValue: string;
163
+ readonly allowClear: boolean;
164
+ readonly maxLength: number | {
165
+ length: number;
166
+ errorOnly?: boolean;
167
+ };
168
+ readonly showWordLimit: boolean;
169
+ readonly size?: "small" | "mini" | "medium" | "large" | undefined;
170
+ readonly modelValue?: string | undefined;
171
+ readonly placeholder?: string | undefined;
172
+ readonly prepend?: string | undefined;
173
+ readonly append?: string | undefined;
174
+ readonly wordLength?: ((value: string) => number) | undefined;
175
+ readonly wordSlice?: ((value: string, maxLength: number) => string) | undefined;
176
+ readonly inputAttrs?: Record<string, any> | undefined;
177
+ readonly onFocus?: ((_ev: FocusEvent) => any) | undefined;
178
+ readonly onClear?: ((_ev: MouseEvent) => any) | undefined;
179
+ readonly onBlur?: ((_ev: FocusEvent) => any) | undefined;
180
+ readonly onChange?: ((_value: string, _ev: Event) => any) | undefined;
181
+ readonly onInput?: ((_value: string, _ev: Event) => any) | undefined;
182
+ readonly "onUpdate:modelValue"?: ((_value: string) => any) | undefined;
183
+ readonly onPressEnter?: ((_ev: KeyboardEvent) => any) | undefined;
184
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "error" | "readonly" | "disabled" | "defaultValue" | "allowClear" | "maxLength" | "showWordLimit"> & Partial<{
185
+ readonly: string | boolean;
186
+ data: (string | number | import("../index.ts").SelectOptionData | import("../index.ts").SelectOptionGroup)[];
187
+ disabled: boolean;
188
+ defaultValue: string;
189
+ modelValue: string;
190
+ allowClear: boolean;
191
+ filterOption: import("../index.ts").FilterOption;
192
+ strict: boolean;
193
+ }> & Omit<{
194
+ readonly readonly: string | boolean;
195
+ readonly data: (string | number | import("../index.ts").SelectOptionData | import("../index.ts").SelectOptionGroup)[];
196
+ readonly disabled: boolean;
197
+ readonly defaultValue: string;
198
+ readonly allowClear: boolean;
199
+ readonly filterOption: import("../index.ts").FilterOption;
200
+ readonly strict: boolean;
201
+ readonly popupContainer?: string | HTMLElement | null | undefined;
202
+ readonly modelValue?: string | undefined;
203
+ readonly triggerProps?: import("../index.ts").TriggerProps | undefined;
204
+ readonly virtualListProps?: import("../_components/virtual-list/interface.ts").VirtualListProps | undefined;
205
+ readonly onSearch?: ((_value: string) => any) | undefined;
206
+ readonly onClear?: ((_ev: Event) => any) | undefined;
207
+ readonly onChange?: ((_value: string) => any) | undefined;
208
+ readonly onSelect?: ((_value: string) => any) | undefined;
209
+ readonly "onUpdate:modelValue"?: ((_value: string) => any) | undefined;
210
+ readonly onDropdownScroll?: ((_ev: Event) => any) | undefined;
211
+ readonly onDropdownReachBottom?: ((_ev: Event) => any) | undefined;
212
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "readonly" | "data" | "disabled" | "defaultValue" | "modelValue" | "allowClear" | "filterOption" | "strict">, "defaultValue" | "modelValue" | "onUpdate:modelValue">>;
213
+ valueProps?: Partial<Omit<Partial<{
214
+ type: "text" | "password";
215
+ error: boolean;
216
+ readonly: string | boolean;
217
+ disabled: boolean;
218
+ defaultValue: string;
219
+ allowClear: boolean;
220
+ maxLength: number | {
221
+ length: number;
222
+ errorOnly?: boolean;
223
+ };
224
+ showWordLimit: boolean;
225
+ }> & Omit<{
226
+ readonly type: "text" | "password";
227
+ readonly error: boolean;
228
+ readonly readonly: string | boolean;
229
+ readonly disabled: boolean;
230
+ readonly defaultValue: string;
231
+ readonly allowClear: boolean;
232
+ readonly maxLength: number | {
233
+ length: number;
234
+ errorOnly?: boolean;
235
+ };
236
+ readonly showWordLimit: boolean;
237
+ readonly size?: "small" | "mini" | "medium" | "large" | undefined;
238
+ readonly modelValue?: string | undefined;
239
+ readonly placeholder?: string | undefined;
240
+ readonly prepend?: string | undefined;
241
+ readonly append?: string | undefined;
242
+ readonly wordLength?: ((value: string) => number) | undefined;
243
+ readonly wordSlice?: ((value: string, maxLength: number) => string) | undefined;
244
+ readonly inputAttrs?: Record<string, any> | undefined;
245
+ readonly onFocus?: ((_ev: FocusEvent) => any) | undefined;
246
+ readonly onClear?: ((_ev: MouseEvent) => any) | undefined;
247
+ readonly onBlur?: ((_ev: FocusEvent) => any) | undefined;
248
+ readonly onChange?: ((_value: string, _ev: Event) => any) | undefined;
249
+ readonly onInput?: ((_value: string, _ev: Event) => any) | undefined;
250
+ readonly "onUpdate:modelValue"?: ((_value: string) => any) | undefined;
251
+ readonly onPressEnter?: ((_ev: KeyboardEvent) => any) | undefined;
252
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "type" | "error" | "readonly" | "disabled" | "defaultValue" | "allowClear" | "maxLength" | "showWordLimit"> & Partial<{
253
+ visibility: boolean;
254
+ defaultVisibility: boolean;
255
+ invisibleButton: boolean;
256
+ }> & Omit<{
257
+ readonly defaultVisibility: boolean;
258
+ readonly invisibleButton: boolean;
259
+ readonly visibility?: boolean | undefined;
260
+ readonly "onVisibility-change"?: ((_visible: boolean) => any) | undefined;
261
+ readonly "onUpdate:visibility"?: ((_visible: boolean) => any) | undefined;
262
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "visibility" | "defaultVisibility" | "invisibleButton">, "defaultValue" | "modelValue" | "onUpdate:modelValue">>;
263
+ disabled?: boolean;
264
+ bulkEditable?: boolean;
265
+ } & {
266
+ json?: import("./types").KvListItem[];
267
+ bulk?: string;
268
+ }> & Readonly<{
269
+ "onUpdate:json"?: ((value: import("./types").KvListItem[]) => any) | undefined;
270
+ "onUpdate:bulk"?: ((value: string) => any) | undefined;
271
+ }>, {}, {}, {}, {}, {}>;
272
+ __isFragment?: never;
273
+ __isTeleport?: never;
274
+ __isSuspense?: never;
275
+ } & import("vue").ComponentOptionsBase<Readonly<{
276
+ type?: import("./types").KvListType;
277
+ keyProps?: import("./types").KvListKeyProps;
278
+ valueProps?: import("./types").KvListValueProps;
279
+ disabled?: boolean;
280
+ bulkEditable?: boolean;
281
+ } & {
282
+ json?: import("./types").KvListItem[];
283
+ bulk?: string;
284
+ }> & Readonly<{
285
+ "onUpdate:json"?: ((value: import("./types").KvListItem[]) => any) | undefined;
286
+ "onUpdate:bulk"?: ((value: string) => any) | undefined;
287
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
288
+ "update:json": (value: import("./types").KvListItem[]) => any;
289
+ "update:bulk": (value: string) => any;
290
+ }, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
291
+ $slots: {
292
+ key?: (props: import("./types").KvListFieldSlotProps) => unknown;
293
+ value?: (props: import("./types").KvListFieldSlotProps) => unknown;
294
+ 'toolbar-extra'?: () => unknown;
295
+ 'row-actions'?: (props: import("./types").KvListRowActionsSlotProps) => unknown;
296
+ };
297
+ }) & {
298
+ install: (app: App, options?: SDOptions) => void;
299
+ };
300
+ export type KvListInstance = InstanceType<typeof _KvList>;
301
+ export type { KvListFieldSlotProps, KvListItem, KvListKeyProps, KvListRowActionsSlotProps, KvListType, KvListValueProps, } from './types';
302
+ export default KvList;
@@ -0,0 +1,10 @@
1
+ import { getComponentPrefix, setGlobalConfig } from "../_utils/global-config.js";
2
+ import kv_list_default from "./kv-list.js";
3
+ //#region components/kv-list/index.ts
4
+ var KvList = Object.assign(kv_list_default, { install: (app, options) => {
5
+ setGlobalConfig(app, options);
6
+ const componentPrefix = getComponentPrefix(options);
7
+ app.component(componentPrefix + kv_list_default.name, kv_list_default);
8
+ } });
9
+ //#endregion
10
+ export { KvList as default };
@@ -0,0 +1,5 @@
1
+ import kv_list_row_vue_vue_type_script_setup_true_lang_default from "./kv-list-row.vue_vue_type_script_setup_true_lang.js";
2
+ //#region components/kv-list/kv-list-row.vue
3
+ var kv_list_row_default = kv_list_row_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { kv_list_row_default as default };
@@ -0,0 +1,29 @@
1
+ import type { KvListFieldSlotProps, KvListKeyProps, KvListType, KvListValueProps, KvListWorkingItem } from './types';
2
+ type __VLS_Props = {
3
+ item: KvListWorkingItem;
4
+ index: number;
5
+ type?: KvListType;
6
+ keyProps?: KvListKeyProps;
7
+ valueProps?: KvListValueProps;
8
+ disabled?: boolean;
9
+ };
10
+ type __VLS_Slots = {
11
+ key?: (props: KvListFieldSlotProps) => unknown;
12
+ value?: (props: KvListFieldSlotProps) => unknown;
13
+ actions?: () => unknown;
14
+ };
15
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ update: (item: KvListWorkingItem) => any;
17
+ remove: () => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
19
+ onUpdate?: ((item: KvListWorkingItem) => any) | undefined;
20
+ onRemove?: (() => any) | undefined;
21
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -0,0 +1,123 @@
1
+ import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
2
+ import { getPrefixCls } from "../_utils/global-config.js";
3
+ import { useI18n } from "../locale/index.js";
4
+ import input_password_default from "../input/input-password.js";
5
+ import Button from "../button/index.js";
6
+ import Input from "../input/index.js";
7
+ import AutoComplete from "../auto-complete/index.js";
8
+ import IconDragDotVertical from "../icon/icon-drag-dot-vertical/index.js";
9
+ import IconDelete from "../icon/icon-delete/index.js";
10
+ import { COMMON_HTTP_HEADERS } from "./constants.js";
11
+ import { computed, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, renderSlot, toDisplayString, unref, withCtx } from "vue";
12
+ //#region components/kv-list/kv-list-row.vue?vue&type=script&setup=true&lang.ts
13
+ var kv_list_row_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "KvListRow" }), {}, {
14
+ __name: "kv-list-row",
15
+ props: {
16
+ item: {},
17
+ index: {},
18
+ type: {},
19
+ keyProps: {},
20
+ valueProps: {},
21
+ disabled: {
22
+ type: Boolean,
23
+ default: false
24
+ }
25
+ },
26
+ emits: ["update", "remove"],
27
+ setup(__props, { emit: __emit }) {
28
+ const emit = __emit;
29
+ const prefixCls = getPrefixCls("kv-list");
30
+ const { t } = useI18n();
31
+ const publicItem = computed(() => ({
32
+ key: __props.item.key,
33
+ value: __props.item.value
34
+ }));
35
+ const keyModel = computed({
36
+ get: () => __props.item.key,
37
+ set: (value) => updateKey(value)
38
+ });
39
+ const valueModel = computed({
40
+ get: () => __props.item.value,
41
+ set: (value) => updateValue(value)
42
+ });
43
+ const mergedKeyProps = computed(() => {
44
+ var _props$keyProps;
45
+ return _objectSpread2(_objectSpread2(_objectSpread2({ placeholder: t("kvList.keyPlaceholder") }, __props.type === "http-header" ? { data: [...COMMON_HTTP_HEADERS] } : {}), __props.keyProps), {}, { disabled: __props.disabled || Boolean((_props$keyProps = __props.keyProps) === null || _props$keyProps === void 0 ? void 0 : _props$keyProps.disabled) });
46
+ });
47
+ const mergedValueProps = computed(() => {
48
+ var _props$valueProps;
49
+ return _objectSpread2(_objectSpread2({ placeholder: t("kvList.valuePlaceholder") }, __props.valueProps), {}, { disabled: __props.disabled || Boolean((_props$valueProps = __props.valueProps) === null || _props$valueProps === void 0 ? void 0 : _props$valueProps.disabled) });
50
+ });
51
+ function updateKey(value) {
52
+ emit("update", _objectSpread2(_objectSpread2({}, __props.item), {}, { key: value }));
53
+ }
54
+ function updateValue(value) {
55
+ emit("update", _objectSpread2(_objectSpread2({}, __props.item), {}, { value }));
56
+ }
57
+ return (_ctx, _cache) => {
58
+ return openBlock(), createElementBlock("div", {
59
+ class: normalizeClass(`${unref(prefixCls)}-row`),
60
+ "data-testid": "kv-list-row"
61
+ }, [
62
+ createElementVNode("span", { class: normalizeClass(`${unref(prefixCls)}-drag-handle`) }, [createVNode(unref(Button), {
63
+ type: "text",
64
+ shape: "circle",
65
+ size: "small",
66
+ disabled: __props.disabled
67
+ }, {
68
+ icon: withCtx(() => [createVNode(unref(IconDragDotVertical))]),
69
+ "sr-only": withCtx(() => [createTextVNode(toDisplayString(unref(t)("kvList.dragSort")), 1)]),
70
+ _: 1
71
+ }, 8, ["disabled"])], 2),
72
+ createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-key`) }, [_ctx.$slots.key ? renderSlot(_ctx.$slots, "key", {
73
+ key: 0,
74
+ value: __props.item.key,
75
+ item: publicItem.value,
76
+ index: __props.index,
77
+ props: mergedKeyProps.value,
78
+ update: updateKey
79
+ }) : __props.type === "http-header" ? (openBlock(), createBlock(unref(AutoComplete), mergeProps({ key: 1 }, mergedKeyProps.value, {
80
+ modelValue: keyModel.value,
81
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => keyModel.value = $event)
82
+ }), null, 16, ["modelValue"])) : (openBlock(), createBlock(unref(Input), mergeProps({ key: 2 }, mergedKeyProps.value, {
83
+ modelValue: keyModel.value,
84
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => keyModel.value = $event)
85
+ }), null, 16, ["modelValue"]))], 2),
86
+ createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-value`) }, [_ctx.$slots.value ? renderSlot(_ctx.$slots, "value", {
87
+ key: 0,
88
+ value: __props.item.value,
89
+ item: publicItem.value,
90
+ index: __props.index,
91
+ props: mergedValueProps.value,
92
+ update: updateValue
93
+ }) : __props.type === "secret" ? (openBlock(), createBlock(unref(input_password_default), mergeProps({ key: 1 }, mergedValueProps.value, {
94
+ modelValue: valueModel.value,
95
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => valueModel.value = $event)
96
+ }), null, 16, ["modelValue"])) : (openBlock(), createBlock(unref(Input), mergeProps({ key: 2 }, mergedValueProps.value, {
97
+ modelValue: valueModel.value,
98
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => valueModel.value = $event)
99
+ }), null, 16, ["modelValue"]))], 2),
100
+ createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-row-actions`) }, [renderSlot(_ctx.$slots, "actions"), createVNode(unref(Button), {
101
+ type: "text",
102
+ shape: "circle",
103
+ size: "small",
104
+ status: "danger",
105
+ tooltip: unref(t)("kvList.remove"),
106
+ "aria-label": unref(t)("kvList.remove"),
107
+ disabled: __props.disabled,
108
+ onClick: _cache[4] || (_cache[4] = ($event) => emit("remove"))
109
+ }, {
110
+ icon: withCtx(() => [createVNode(unref(IconDelete))]),
111
+ "sr-only": withCtx(() => [createTextVNode(toDisplayString(unref(t)("kvList.remove")), 1)]),
112
+ _: 1
113
+ }, 8, [
114
+ "tooltip",
115
+ "aria-label",
116
+ "disabled"
117
+ ])], 2)
118
+ ], 2);
119
+ };
120
+ }
121
+ }));
122
+ //#endregion
123
+ export { kv_list_row_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,5 @@
1
+ import kv_list_vue_vue_type_script_setup_true_lang_default from "./kv-list.vue_vue_type_script_setup_true_lang.js";
2
+ //#region components/kv-list/kv-list.vue
3
+ var kv_list_default = kv_list_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { kv_list_default as default };
@@ -0,0 +1,34 @@
1
+ import type { KvListFieldSlotProps, KvListItem, KvListKeyProps, KvListRowActionsSlotProps, KvListType, KvListValueProps } from './types';
2
+ type __VLS_Props = {
3
+ type?: KvListType;
4
+ keyProps?: KvListKeyProps;
5
+ valueProps?: KvListValueProps;
6
+ disabled?: boolean;
7
+ bulkEditable?: boolean;
8
+ };
9
+ type __VLS_Slots = {
10
+ 'key'?: (props: KvListFieldSlotProps) => unknown;
11
+ 'value'?: (props: KvListFieldSlotProps) => unknown;
12
+ 'toolbar-extra'?: () => unknown;
13
+ 'row-actions'?: (props: KvListRowActionsSlotProps) => unknown;
14
+ };
15
+ type __VLS_ModelProps = {
16
+ 'json'?: KvListItem[];
17
+ 'bulk'?: string;
18
+ };
19
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
20
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
+ "update:json": (value: KvListItem[]) => any;
22
+ "update:bulk": (value: string) => any;
23
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
+ "onUpdate:json"?: ((value: KvListItem[]) => any) | undefined;
25
+ "onUpdate:bulk"?: ((value: string) => any) | undefined;
26
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
30
+ type __VLS_WithSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };