@unsource/ui 2.7.6 → 2.7.8
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.
- package/dist/module.json +1 -1
- package/dist/runtime/components/UnProfile.d.vue.ts +3 -2
- package/dist/runtime/components/UnProfile.vue +1 -0
- package/dist/runtime/components/UnProfile.vue.d.ts +3 -2
- package/dist/runtime/components/UnTable.d.vue.ts +1 -5
- package/dist/runtime/components/UnTable.vue +2 -0
- package/dist/runtime/components/UnTable.vue.d.ts +1 -5
- package/dist/runtime/components/UnTableRow.d.vue.ts +1 -0
- package/dist/runtime/components/UnTableRow.vue +9 -5
- package/dist/runtime/components/UnTableRow.vue.d.ts +1 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -17,6 +17,7 @@ type __VLS_Props = {
|
|
|
17
17
|
disable?: boolean;
|
|
18
18
|
appendIcon?: string;
|
|
19
19
|
to?: string;
|
|
20
|
+
handler: () => void;
|
|
20
21
|
})[];
|
|
21
22
|
version?: string;
|
|
22
23
|
developer?: string;
|
|
@@ -25,9 +26,9 @@ type __VLS_Props = {
|
|
|
25
26
|
owner?: string;
|
|
26
27
|
customClass?: ProfileCustomClass;
|
|
27
28
|
};
|
|
28
|
-
declare var
|
|
29
|
+
declare var __VLS_15: {};
|
|
29
30
|
type __VLS_Slots = {} & {
|
|
30
|
-
default?: (props: typeof
|
|
31
|
+
default?: (props: typeof __VLS_15) => any;
|
|
31
32
|
};
|
|
32
33
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -17,6 +17,7 @@ type __VLS_Props = {
|
|
|
17
17
|
disable?: boolean;
|
|
18
18
|
appendIcon?: string;
|
|
19
19
|
to?: string;
|
|
20
|
+
handler: () => void;
|
|
20
21
|
})[];
|
|
21
22
|
version?: string;
|
|
22
23
|
developer?: string;
|
|
@@ -25,9 +26,9 @@ type __VLS_Props = {
|
|
|
25
26
|
owner?: string;
|
|
26
27
|
customClass?: ProfileCustomClass;
|
|
27
28
|
};
|
|
28
|
-
declare var
|
|
29
|
+
declare var __VLS_15: {};
|
|
29
30
|
type __VLS_Slots = {} & {
|
|
30
|
-
default?: (props: typeof
|
|
31
|
+
default?: (props: typeof __VLS_15) => any;
|
|
31
32
|
};
|
|
32
33
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -34,11 +34,7 @@ declare var __VLS_2: any, __VLS_3: {
|
|
|
34
34
|
type __VLS_Slots = {} & {
|
|
35
35
|
[K in NonNullable<typeof __VLS_2>]?: (props: typeof __VLS_3) => any;
|
|
36
36
|
};
|
|
37
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
38
|
-
"update:modelValue": (value: any) => any;
|
|
39
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
40
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
41
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
37
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
42
38
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
43
39
|
declare const _default: typeof __VLS_export;
|
|
44
40
|
export default _default;
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
v-for="(item, index) in items?.filter((e) => !parentKey || parentNotExist(e))"
|
|
71
71
|
:key="index"
|
|
72
72
|
v-model="selected"
|
|
73
|
+
:level="0"
|
|
73
74
|
:item="item"
|
|
74
75
|
:items
|
|
75
76
|
:cols="cols"
|
|
@@ -105,6 +106,7 @@ const { parentKey, idKey, cols = [], items = [], thClass = "bg-gray-100 border-g
|
|
|
105
106
|
idKey: { type: String, required: false },
|
|
106
107
|
selectable: { type: Boolean, required: false }
|
|
107
108
|
});
|
|
109
|
+
defineEmits(["click:row", "dbclick:row", "add:row"]);
|
|
108
110
|
const selected = defineModel();
|
|
109
111
|
const parentNotExist = (item) => !item[parentKey] || !items.find((e) => e[idKey || "id"] === item[parentKey]);
|
|
110
112
|
</script>
|
|
@@ -34,11 +34,7 @@ declare var __VLS_2: any, __VLS_3: {
|
|
|
34
34
|
type __VLS_Slots = {} & {
|
|
35
35
|
[K in NonNullable<typeof __VLS_2>]?: (props: typeof __VLS_3) => any;
|
|
36
36
|
};
|
|
37
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
38
|
-
"update:modelValue": (value: any) => any;
|
|
39
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
40
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
41
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
37
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
42
38
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
43
39
|
declare const _default: typeof __VLS_export;
|
|
44
40
|
export default _default;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<tr
|
|
3
3
|
class="children:p-3 <md:children:p-1 text-center border-b-(2 solid border) hover:bg-primary/10"
|
|
4
|
-
:class="{ '!bg-primary/20': selected?.
|
|
4
|
+
:class="{ '!bg-primary/20': selected?.[idKey] === item[idKey] }"
|
|
5
5
|
@click="$emit('click:row', item);
|
|
6
6
|
selected = item"
|
|
7
7
|
@dbclick="$emit('dbclick:row', item)"
|
|
8
8
|
>
|
|
9
9
|
<td
|
|
10
10
|
v-if="parentKey"
|
|
11
|
-
class="!max-w-1 !w-1
|
|
11
|
+
class="!max-w-1 !w-1"
|
|
12
|
+
:style="{ paddingInlineStart: level * 10 + 5 + 'px' }"
|
|
12
13
|
>
|
|
13
14
|
<UnNuxtIcon
|
|
14
15
|
v-if="subItems?.length"
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
v-for="col in cols.filter((e) => !e.disabled)"
|
|
22
23
|
:key="col.name + '-td'"
|
|
23
24
|
class="text-gray-400 text-sm text-center first:rounded-l-lg last:rounded-r-lg"
|
|
25
|
+
:style="{ paddingInlineStart: parentKey ? level * 10 + 5 + 'px' : 'unset' }"
|
|
24
26
|
:class="[col.class, { '<md:hidden': col.isDesktop, 'hidden <md:table-cell': col.isMobile }, tdClass]"
|
|
25
27
|
:dir="col.dir"
|
|
26
28
|
>
|
|
@@ -62,6 +64,7 @@
|
|
|
62
64
|
:items
|
|
63
65
|
:cols
|
|
64
66
|
:parent-key
|
|
67
|
+
:level="level + 1"
|
|
65
68
|
:id-key
|
|
66
69
|
:text-class
|
|
67
70
|
:td-class
|
|
@@ -74,15 +77,16 @@
|
|
|
74
77
|
|
|
75
78
|
<script setup>
|
|
76
79
|
import { _at, computed, ref } from "#imports";
|
|
77
|
-
defineEmits(["click:row", "dbclick:row"]);
|
|
78
|
-
const { parentKey, idKey = "id", item = {}, items = [] } = defineProps({
|
|
80
|
+
defineEmits(["click:row", "dbclick:row", "add:row"]);
|
|
81
|
+
const { level = 0, parentKey, idKey = "id", item = {}, items = [] } = defineProps({
|
|
79
82
|
item: { type: null, required: false },
|
|
80
83
|
items: { type: Array, required: false },
|
|
81
84
|
cols: { type: Array, required: true },
|
|
82
85
|
textClass: { type: String, required: false },
|
|
83
86
|
parentKey: { type: String, required: false },
|
|
84
87
|
idKey: { type: String, required: false },
|
|
85
|
-
tdClass: { type: String, required: false }
|
|
88
|
+
tdClass: { type: String, required: false },
|
|
89
|
+
level: { type: Number, required: false }
|
|
86
90
|
});
|
|
87
91
|
const open = ref(false);
|
|
88
92
|
const selected = defineModel();
|