pukaad-ui-lib 1.391.0 → 1.393.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.
- package/dist/module.json +1 -1
- package/dist/runtime/components/card/card-content/card-content-menu.d.vue.ts +4 -0
- package/dist/runtime/components/card/card-content/card-content-menu.vue +26 -8
- package/dist/runtime/components/card/card-content/card-content-menu.vue.d.ts +4 -0
- package/dist/runtime/components/card/card-content/card-content.vue +6 -2
- package/dist/runtime/components/image/image-cropper.d.vue.ts +2 -2
- package/dist/runtime/components/image/image-cropper.vue.d.ts +2 -2
- package/dist/runtime/components/input/input-autocomplete.d.vue.ts +2 -2
- package/dist/runtime/components/input/input-autocomplete.vue.d.ts +2 -2
- package/dist/runtime/components/input/input-file.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-file.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-link.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-link.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-localized-name.d.vue.ts +2 -2
- package/dist/runtime/components/input/input-localized-name.vue.d.ts +2 -2
- package/dist/runtime/components/input/input-suggest.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-suggest.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-tag.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-tag.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-text-field.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-text-field.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-textarea.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-textarea.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-typed-field.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-typed-field.vue.d.ts +1 -1
- package/dist/runtime/components/picker/picker-option-menu/picker-option-menu-user.vue +20 -12
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -4,6 +4,8 @@ type __VLS_Props = {
|
|
|
4
4
|
isPinned?: boolean;
|
|
5
5
|
isBookmarked?: boolean;
|
|
6
6
|
isShow?: boolean;
|
|
7
|
+
hidePin?: boolean;
|
|
8
|
+
hideBookmark?: boolean;
|
|
7
9
|
};
|
|
8
10
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
11
|
action: (name: string) => any;
|
|
@@ -13,6 +15,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
13
15
|
isPinned: boolean;
|
|
14
16
|
isBookmarked: boolean;
|
|
15
17
|
isShow: boolean;
|
|
18
|
+
hidePin: boolean;
|
|
19
|
+
hideBookmark: boolean;
|
|
16
20
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
21
|
declare const _default: typeof __VLS_export;
|
|
18
22
|
export default _default;
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
size="icon"
|
|
8
8
|
:color="action.color ?? 'primary'"
|
|
9
9
|
class="h-[40px] w-[40px] rounded-full"
|
|
10
|
-
|
|
10
|
+
:style="action.clickable === false ? { cursor: 'default' } : {}"
|
|
11
|
+
@click.stop="onActionClick(action)"
|
|
11
12
|
>
|
|
12
13
|
<Icon :name="action.icon" :size="20" />
|
|
13
14
|
</Button>
|
|
@@ -20,13 +21,20 @@ const props = defineProps({
|
|
|
20
21
|
state: { type: String, required: false },
|
|
21
22
|
isPinned: { type: Boolean, required: false, default: false },
|
|
22
23
|
isBookmarked: { type: Boolean, required: false, default: false },
|
|
23
|
-
isShow: { type: Boolean, required: false, default: false }
|
|
24
|
+
isShow: { type: Boolean, required: false, default: false },
|
|
25
|
+
hidePin: { type: Boolean, required: false, default: false },
|
|
26
|
+
hideBookmark: { type: Boolean, required: false, default: false }
|
|
24
27
|
});
|
|
25
28
|
const emit = defineEmits(["action"]);
|
|
29
|
+
const onActionClick = (action) => {
|
|
30
|
+
if (action.clickable === false) return;
|
|
31
|
+
emit("action", action.name);
|
|
32
|
+
};
|
|
26
33
|
const actions = computed(() => {
|
|
27
34
|
if (props.state === "my-content") {
|
|
35
|
+
const pinAction = props.hidePin ? [] : [{ name: "pin", icon: "lucide:pin", isActive: props.isPinned }];
|
|
28
36
|
return [
|
|
29
|
-
|
|
37
|
+
...pinAction,
|
|
30
38
|
{ name: "preview", icon: "lucide:tv-minimal-play" },
|
|
31
39
|
{
|
|
32
40
|
name: "delete",
|
|
@@ -37,14 +45,24 @@ const actions = computed(() => {
|
|
|
37
45
|
];
|
|
38
46
|
}
|
|
39
47
|
if (props.state === "content") {
|
|
40
|
-
|
|
41
|
-
|
|
48
|
+
const result = [];
|
|
49
|
+
if (props.isPinned) {
|
|
50
|
+
result.push({
|
|
51
|
+
name: "pin",
|
|
52
|
+
icon: "lucide:pin",
|
|
53
|
+
isActive: true,
|
|
54
|
+
clickable: false
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
if (!props.hideBookmark) {
|
|
58
|
+
result.push({
|
|
42
59
|
name: "bookmark",
|
|
43
60
|
icon: "lucide:bookmark",
|
|
44
61
|
isActive: props.isBookmarked
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
result.push({ name: "preview", icon: "lucide:tv-minimal-play" });
|
|
65
|
+
return result;
|
|
48
66
|
}
|
|
49
67
|
return [];
|
|
50
68
|
});
|
|
@@ -4,6 +4,8 @@ type __VLS_Props = {
|
|
|
4
4
|
isPinned?: boolean;
|
|
5
5
|
isBookmarked?: boolean;
|
|
6
6
|
isShow?: boolean;
|
|
7
|
+
hidePin?: boolean;
|
|
8
|
+
hideBookmark?: boolean;
|
|
7
9
|
};
|
|
8
10
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
9
11
|
action: (name: string) => any;
|
|
@@ -13,6 +15,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
13
15
|
isPinned: boolean;
|
|
14
16
|
isBookmarked: boolean;
|
|
15
17
|
isShow: boolean;
|
|
18
|
+
hidePin: boolean;
|
|
19
|
+
hideBookmark: boolean;
|
|
16
20
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
21
|
declare const _default: typeof __VLS_export;
|
|
18
22
|
export default _default;
|
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
:state="props.state"
|
|
29
29
|
:is-pinned="!!props.item.pinned"
|
|
30
30
|
:is-bookmarked="!!props.item.bookmarked"
|
|
31
|
+
:hide-pin="!!props.hidePin"
|
|
32
|
+
:hide-bookmark="!!props.hideBookmark"
|
|
31
33
|
:is-show="isMenuShow"
|
|
32
34
|
@action="onMenuAction"
|
|
33
35
|
/>
|
|
@@ -58,7 +60,9 @@ const props = defineProps({
|
|
|
58
60
|
state: { type: String, required: false },
|
|
59
61
|
selectable: { type: Boolean, required: false, default: false },
|
|
60
62
|
disabledNavigate: { type: Boolean, required: false, default: false },
|
|
61
|
-
disable: { type: Boolean, required: false, default: false }
|
|
63
|
+
disable: { type: Boolean, required: false, default: false },
|
|
64
|
+
hidePin: { type: Boolean, required: false },
|
|
65
|
+
hideBookmark: { type: Boolean, required: false }
|
|
62
66
|
});
|
|
63
67
|
const emit = defineEmits(["click", "action"]);
|
|
64
68
|
const selected = defineModel("selected", { type: Boolean, ...{ default: false } });
|
|
@@ -89,7 +93,7 @@ const showTime = computed(() => !!props.item.expireAt);
|
|
|
89
93
|
const hasMenu = computed(() => {
|
|
90
94
|
if (props.selectable || !props.state) return false;
|
|
91
95
|
if (props.disable) {
|
|
92
|
-
return !!(props.item.pinned || props.item.bookmarked);
|
|
96
|
+
return !!(props.item.pinned && !props.hidePin || props.item.bookmarked && !props.hideBookmark);
|
|
93
97
|
}
|
|
94
98
|
return true;
|
|
95
99
|
});
|
|
@@ -64,15 +64,15 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
|
|
|
64
64
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageCropperProps> & Readonly<{}>, {
|
|
65
65
|
src: string;
|
|
66
66
|
center: boolean;
|
|
67
|
-
background: boolean;
|
|
68
|
-
modal: boolean;
|
|
69
67
|
responsive: boolean;
|
|
70
68
|
restore: boolean;
|
|
71
69
|
checkCrossOrigin: boolean;
|
|
72
70
|
checkOrientation: boolean;
|
|
73
71
|
crossorigin: "" | "anonymous" | "use-credentials";
|
|
72
|
+
modal: boolean;
|
|
74
73
|
guides: boolean;
|
|
75
74
|
highlight: boolean;
|
|
75
|
+
background: boolean;
|
|
76
76
|
autoCrop: boolean;
|
|
77
77
|
movable: boolean;
|
|
78
78
|
rotatable: boolean;
|
|
@@ -64,15 +64,15 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
|
|
|
64
64
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageCropperProps> & Readonly<{}>, {
|
|
65
65
|
src: string;
|
|
66
66
|
center: boolean;
|
|
67
|
-
background: boolean;
|
|
68
|
-
modal: boolean;
|
|
69
67
|
responsive: boolean;
|
|
70
68
|
restore: boolean;
|
|
71
69
|
checkCrossOrigin: boolean;
|
|
72
70
|
checkOrientation: boolean;
|
|
73
71
|
crossorigin: "" | "anonymous" | "use-credentials";
|
|
72
|
+
modal: boolean;
|
|
74
73
|
guides: boolean;
|
|
75
74
|
highlight: boolean;
|
|
75
|
+
background: boolean;
|
|
76
76
|
autoCrop: boolean;
|
|
77
77
|
movable: boolean;
|
|
78
78
|
rotatable: boolean;
|
|
@@ -49,13 +49,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
49
49
|
name: string;
|
|
50
50
|
required: boolean;
|
|
51
51
|
description: string;
|
|
52
|
-
options: AutocompleteOption[] | string[] | number[];
|
|
53
52
|
labelKey: string;
|
|
54
53
|
placeholder: string;
|
|
54
|
+
options: AutocompleteOption[] | string[] | number[];
|
|
55
|
+
limit: number;
|
|
55
56
|
disabledErrorMessage: boolean;
|
|
56
57
|
disabledBorder: boolean;
|
|
57
58
|
showCounter: boolean;
|
|
58
|
-
limit: number;
|
|
59
59
|
returnObject: boolean;
|
|
60
60
|
freeText: boolean;
|
|
61
61
|
valueKey: string;
|
|
@@ -49,13 +49,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
49
49
|
name: string;
|
|
50
50
|
required: boolean;
|
|
51
51
|
description: string;
|
|
52
|
-
options: AutocompleteOption[] | string[] | number[];
|
|
53
52
|
labelKey: string;
|
|
54
53
|
placeholder: string;
|
|
54
|
+
options: AutocompleteOption[] | string[] | number[];
|
|
55
|
+
limit: number;
|
|
55
56
|
disabledErrorMessage: boolean;
|
|
56
57
|
disabledBorder: boolean;
|
|
57
58
|
showCounter: boolean;
|
|
58
|
-
limit: number;
|
|
59
59
|
returnObject: boolean;
|
|
60
60
|
freeText: boolean;
|
|
61
61
|
valueKey: string;
|
|
@@ -34,8 +34,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
34
34
|
name: string;
|
|
35
35
|
fullHeight: boolean;
|
|
36
36
|
fullWidth: boolean;
|
|
37
|
-
disabledErrorMessage: boolean;
|
|
38
37
|
limit: number;
|
|
38
|
+
disabledErrorMessage: boolean;
|
|
39
39
|
accept: string;
|
|
40
40
|
labelIcon: string;
|
|
41
41
|
disabledDrop: boolean;
|
|
@@ -34,8 +34,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
34
34
|
name: string;
|
|
35
35
|
fullHeight: boolean;
|
|
36
36
|
fullWidth: boolean;
|
|
37
|
-
disabledErrorMessage: boolean;
|
|
38
37
|
limit: number;
|
|
38
|
+
disabledErrorMessage: boolean;
|
|
39
39
|
accept: string;
|
|
40
40
|
labelIcon: string;
|
|
41
41
|
disabledDrop: boolean;
|
|
@@ -17,8 +17,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
17
17
|
label: string;
|
|
18
18
|
name: string;
|
|
19
19
|
modelValue: InputLinkItem[] | ContactChannel[];
|
|
20
|
-
showCounter: boolean;
|
|
21
20
|
limit: number;
|
|
21
|
+
showCounter: boolean;
|
|
22
22
|
format: "legacy" | "contact_channel";
|
|
23
23
|
hideType: boolean;
|
|
24
24
|
hideAddButton: boolean;
|
|
@@ -17,8 +17,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
17
17
|
label: string;
|
|
18
18
|
name: string;
|
|
19
19
|
modelValue: InputLinkItem[] | ContactChannel[];
|
|
20
|
-
showCounter: boolean;
|
|
21
20
|
limit: number;
|
|
21
|
+
showCounter: boolean;
|
|
22
22
|
format: "legacy" | "contact_channel";
|
|
23
23
|
hideType: boolean;
|
|
24
24
|
hideAddButton: boolean;
|
|
@@ -11,10 +11,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
11
11
|
label: string;
|
|
12
12
|
name: string;
|
|
13
13
|
modelValue: LocalizedNameItem[];
|
|
14
|
-
options: InputSelectItem[];
|
|
15
14
|
placeholder: string;
|
|
16
|
-
|
|
15
|
+
options: InputSelectItem[];
|
|
17
16
|
limit: number;
|
|
17
|
+
showCounter: boolean;
|
|
18
18
|
addLabel: string;
|
|
19
19
|
removable: boolean;
|
|
20
20
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -11,10 +11,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
11
11
|
label: string;
|
|
12
12
|
name: string;
|
|
13
13
|
modelValue: LocalizedNameItem[];
|
|
14
|
-
options: InputSelectItem[];
|
|
15
14
|
placeholder: string;
|
|
16
|
-
|
|
15
|
+
options: InputSelectItem[];
|
|
17
16
|
limit: number;
|
|
17
|
+
showCounter: boolean;
|
|
18
18
|
addLabel: string;
|
|
19
19
|
removable: boolean;
|
|
20
20
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -22,10 +22,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
22
22
|
description: string;
|
|
23
23
|
labelKey: string;
|
|
24
24
|
placeholder: string;
|
|
25
|
+
limit: number;
|
|
25
26
|
disabledErrorMessage: boolean;
|
|
26
27
|
disabledBorder: boolean;
|
|
27
28
|
showCounter: boolean;
|
|
28
|
-
limit: number;
|
|
29
29
|
descriptionKey: string;
|
|
30
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -22,10 +22,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
22
22
|
description: string;
|
|
23
23
|
labelKey: string;
|
|
24
24
|
placeholder: string;
|
|
25
|
+
limit: number;
|
|
25
26
|
disabledErrorMessage: boolean;
|
|
26
27
|
disabledBorder: boolean;
|
|
27
28
|
showCounter: boolean;
|
|
28
|
-
limit: number;
|
|
29
29
|
descriptionKey: string;
|
|
30
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -25,8 +25,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
25
25
|
"onUpdate:modelValue"?: ((value: SelectedTag[]) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
name: string;
|
|
28
|
-
state: "user" | "admin";
|
|
29
28
|
placeholder: string;
|
|
29
|
+
state: "user" | "admin";
|
|
30
30
|
limit: number;
|
|
31
31
|
ignore: string[];
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -25,8 +25,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
25
25
|
"onUpdate:modelValue"?: ((value: SelectedTag[]) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
name: string;
|
|
28
|
-
state: "user" | "admin";
|
|
29
28
|
placeholder: string;
|
|
29
|
+
state: "user" | "admin";
|
|
30
30
|
limit: number;
|
|
31
31
|
ignore: string[];
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -60,10 +60,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
60
60
|
name: string;
|
|
61
61
|
required: boolean;
|
|
62
62
|
readonly: boolean;
|
|
63
|
+
limit: number;
|
|
63
64
|
disabledErrorMessage: boolean;
|
|
64
65
|
disabledBorder: boolean;
|
|
65
66
|
showCounter: boolean;
|
|
66
|
-
limit: number;
|
|
67
67
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
68
68
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
69
69
|
declare const _default: typeof __VLS_export;
|
|
@@ -60,10 +60,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
60
60
|
name: string;
|
|
61
61
|
required: boolean;
|
|
62
62
|
readonly: boolean;
|
|
63
|
+
limit: number;
|
|
63
64
|
disabledErrorMessage: boolean;
|
|
64
65
|
disabledBorder: boolean;
|
|
65
66
|
showCounter: boolean;
|
|
66
|
-
limit: number;
|
|
67
67
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
68
68
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
69
69
|
declare const _default: typeof __VLS_export;
|
|
@@ -48,10 +48,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
48
48
|
fullWidth: boolean;
|
|
49
49
|
rows: number;
|
|
50
50
|
readonly: boolean;
|
|
51
|
+
limit: number;
|
|
51
52
|
disabledErrorMessage: boolean;
|
|
52
53
|
disabledBorder: boolean;
|
|
53
54
|
showCounter: boolean;
|
|
54
|
-
limit: number;
|
|
55
55
|
heightScroll: boolean;
|
|
56
56
|
spaceToComma: boolean;
|
|
57
57
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -48,10 +48,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
48
48
|
fullWidth: boolean;
|
|
49
49
|
rows: number;
|
|
50
50
|
readonly: boolean;
|
|
51
|
+
limit: number;
|
|
51
52
|
disabledErrorMessage: boolean;
|
|
52
53
|
disabledBorder: boolean;
|
|
53
54
|
showCounter: boolean;
|
|
54
|
-
limit: number;
|
|
55
55
|
heightScroll: boolean;
|
|
56
56
|
spaceToComma: boolean;
|
|
57
57
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
22
22
|
name: string;
|
|
23
23
|
required: boolean;
|
|
24
24
|
options: import("../../../types/components/input/input-select.js").InputSelectItem[];
|
|
25
|
-
showCounter: boolean;
|
|
26
25
|
limit: number;
|
|
26
|
+
showCounter: boolean;
|
|
27
27
|
removable: boolean;
|
|
28
28
|
selectClass: import("vue").HTMLAttributes["class"];
|
|
29
29
|
resetOnTypeChange: boolean;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
22
22
|
name: string;
|
|
23
23
|
required: boolean;
|
|
24
24
|
options: import("../../../types/components/input/input-select.js").InputSelectItem[];
|
|
25
|
-
showCounter: boolean;
|
|
26
25
|
limit: number;
|
|
26
|
+
showCounter: boolean;
|
|
27
27
|
removable: boolean;
|
|
28
28
|
selectClass: import("vue").HTMLAttributes["class"];
|
|
29
29
|
resetOnTypeChange: boolean;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
<script setup>
|
|
27
27
|
import { computed, ref } from "vue";
|
|
28
|
-
const emit = defineEmits(["profile-edit", "profile-share", "profile-follower-delete", "profile-block", "blog-pin", "blog-unpin", "blog-edit", "blog-delete", "report-blog", "report-place", "report-profile", "delete", "report", "report-review", "place-close-duplicate", "review-edit", "review-delete", "review-reply", "reply-edit", "reply-delete", "archive", "profile-name-updated", "report-submit"]);
|
|
28
|
+
const emit = defineEmits(["profile-edit", "profile-share", "profile-follower-delete", "profile-block", "blog-pin", "blog-unpin", "blog-edit", "blog-delete", "report-blog", "report-place", "report-profile", "report-content", "delete-content", "content-delete", "delete", "report", "report-review", "place-close-duplicate", "review-edit", "review-delete", "review-reply", "reply-edit", "reply-delete", "archive", "profile-name-updated", "report-submit"]);
|
|
29
29
|
const props = defineProps({
|
|
30
30
|
state: { type: String, required: false },
|
|
31
31
|
profileDetail: { type: Object, required: false },
|
|
@@ -115,11 +115,12 @@ const menu = [
|
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
|
-
label: "\u0E25\u0E1A\u0E1A\u0E25\u0E47\u0E2D\
|
|
118
|
+
label: "\u0E25\u0E1A\u0E1A\u0E25\u0E47\u0E2D\u0E01\u0E19\u0E35\u0E49",
|
|
119
119
|
name: "blog-delete",
|
|
120
120
|
icon: "lucide:trash-2",
|
|
121
121
|
action: () => {
|
|
122
122
|
emit("blog-delete");
|
|
123
|
+
emit("delete");
|
|
123
124
|
}
|
|
124
125
|
},
|
|
125
126
|
{
|
|
@@ -130,6 +131,7 @@ const menu = [
|
|
|
130
131
|
isOpenModalReport.value = true;
|
|
131
132
|
reportState.value = "blog";
|
|
132
133
|
emit("report-blog");
|
|
134
|
+
emit("report");
|
|
133
135
|
}
|
|
134
136
|
},
|
|
135
137
|
{
|
|
@@ -161,23 +163,24 @@ const menu = [
|
|
|
161
163
|
}
|
|
162
164
|
},
|
|
163
165
|
{
|
|
164
|
-
label: "\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19",
|
|
165
|
-
name: "report",
|
|
166
|
+
label: "\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E40\u0E19\u0E37\u0E49\u0E2D\u0E2B\u0E32\u0E19\u0E35\u0E49",
|
|
167
|
+
name: "report-content",
|
|
166
168
|
icon: "fa6-regular:flag",
|
|
167
169
|
action: () => {
|
|
168
170
|
isOpenModalReport.value = true;
|
|
169
171
|
reportState.value = "content";
|
|
172
|
+
emit("report-content");
|
|
170
173
|
emit("report");
|
|
171
|
-
emit("report-blog");
|
|
172
174
|
}
|
|
173
175
|
},
|
|
174
176
|
{
|
|
175
|
-
label: "\u0E25\u0E1A",
|
|
176
|
-
name: "delete",
|
|
177
|
+
label: "\u0E25\u0E1A\u0E40\u0E19\u0E37\u0E49\u0E2D\u0E2B\u0E32\u0E19\u0E35\u0E49",
|
|
178
|
+
name: "delete-content",
|
|
177
179
|
icon: "lucide:trash-2",
|
|
178
180
|
action: () => {
|
|
181
|
+
emit("delete-content");
|
|
182
|
+
emit("content-delete");
|
|
179
183
|
emit("delete");
|
|
180
|
-
emit("blog-delete");
|
|
181
184
|
}
|
|
182
185
|
},
|
|
183
186
|
// ลำดับใน array นี้ = ลำดับที่แสดงในเมนู (items ใช้ menu.filter ซึ่งคงลำดับเดิมไว้)
|
|
@@ -289,14 +292,19 @@ const items = computed(() => {
|
|
|
289
292
|
}
|
|
290
293
|
];
|
|
291
294
|
}
|
|
292
|
-
if (props.state === "
|
|
295
|
+
if (props.state === "delete-blog") {
|
|
296
|
+
return menu.filter(
|
|
297
|
+
(fil) => ["blog-delete"].includes(fil.name)
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
if (props.state === "content") {
|
|
293
301
|
return menu.filter(
|
|
294
|
-
(item) => ["report"].includes(item.name)
|
|
302
|
+
(item) => ["report-content"].includes(item.name)
|
|
295
303
|
);
|
|
296
304
|
}
|
|
297
|
-
if (props.state === "delete") {
|
|
305
|
+
if (props.state === "delete-content") {
|
|
298
306
|
return menu.filter(
|
|
299
|
-
(item) => ["delete"].includes(item.name)
|
|
307
|
+
(item) => ["delete-content", "content-delete"].includes(item.name)
|
|
300
308
|
);
|
|
301
309
|
}
|
|
302
310
|
return [];
|