pukaad-ui-lib 1.230.0 → 1.231.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
3
  "configKey": "pukaadUI",
4
- "version": "1.230.0",
4
+ "version": "1.231.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -21,17 +21,7 @@ type __VLS_Props = {
21
21
  id?: string;
22
22
  state?: string;
23
23
  };
24
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
25
- comment: () => any;
26
- like: (liked: boolean) => any;
27
- bookmark: (bookmarked: boolean) => any;
28
- share: () => any;
29
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
30
- onComment?: (() => any) | undefined;
31
- onLike?: ((liked: boolean) => any) | undefined;
32
- onBookmark?: ((bookmarked: boolean) => any) | undefined;
33
- onShare?: (() => any) | undefined;
34
- }>, {
24
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
35
25
  disabled: boolean;
36
26
  id: string;
37
27
  disabledPadding: boolean;
@@ -35,7 +35,6 @@ import { computed, reactive, ref, watch } from "vue";
35
35
  import { useApi } from "../../composables/useApi";
36
36
  const api = useApi();
37
37
  const isOpenModalShare = ref(false);
38
- const emit = defineEmits(["like", "bookmark", "comment", "share"]);
39
38
  const props = defineProps({
40
39
  itemCount: { type: Object, required: false, default: () => ({
41
40
  liked: 0,
@@ -119,7 +118,6 @@ async function toggleLike() {
119
118
  const previousLiked = reaction.liked;
120
119
  reaction.liked = !previousLiked;
121
120
  counts.liked += reaction.liked ? 1 : -1;
122
- emit("like", !!reaction.liked);
123
121
  if (props.state === "blog" && props.id) {
124
122
  try {
125
123
  await api(`/blogs/${props.id}/like`, {
@@ -135,14 +133,11 @@ async function toggleLike() {
135
133
  function toggleBookmark() {
136
134
  reaction.bookmarked = !reaction.bookmarked;
137
135
  counts.bookmarked += reaction.bookmarked ? 1 : -1;
138
- emit("bookmark", !!reaction.bookmarked);
139
136
  }
140
137
  function toggleComment() {
141
138
  console.log("comment ");
142
- emit("comment");
143
139
  }
144
140
  function toggleShared() {
145
141
  isOpenModalShare.value = !isOpenModalShare.value;
146
- emit("share");
147
142
  }
148
143
  </script>
@@ -21,17 +21,7 @@ type __VLS_Props = {
21
21
  id?: string;
22
22
  state?: string;
23
23
  };
24
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
25
- comment: () => any;
26
- like: (liked: boolean) => any;
27
- bookmark: (bookmarked: boolean) => any;
28
- share: () => any;
29
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
30
- onComment?: (() => any) | undefined;
31
- onLike?: ((liked: boolean) => any) | undefined;
32
- onBookmark?: ((bookmarked: boolean) => any) | undefined;
33
- onShare?: (() => any) | undefined;
34
- }>, {
24
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
35
25
  disabled: boolean;
36
26
  id: string;
37
27
  disabledPadding: boolean;
@@ -24,14 +24,8 @@ type __VLS_Props = {
24
24
  isMyProfile?: boolean;
25
25
  };
26
26
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
27
- comment: () => any;
28
- like: (liked: boolean) => any;
29
- share: () => any;
30
27
  "blog-edit": (item: CardUserBlogProps) => any;
31
28
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
32
- onComment?: (() => any) | undefined;
33
- onLike?: ((liked: boolean) => any) | undefined;
34
- onShare?: (() => any) | undefined;
35
29
  "onBlog-edit"?: ((item: CardUserBlogProps) => any) | undefined;
36
30
  }>, {
37
31
  isMyProfile: boolean;
@@ -62,6 +62,7 @@
62
62
  <CardReaction
63
63
  disabled-divider-top
64
64
  disabled-divider-bottom
65
+ :id="props.item.id"
65
66
  :item-count="{
66
67
  liked: props.item.like_count,
67
68
  commented: props.item.comment_count,
@@ -70,9 +71,7 @@
70
71
  :itemActive="{
71
72
  liked: props.item.liked
72
73
  }"
73
- @like="emit('like', $event)"
74
- @comment="emit('comment')"
75
- @share="emit('share')"
74
+ state="blog"
76
75
  />
77
76
  </div>
78
77
  </template>
@@ -87,7 +86,7 @@ const props = defineProps({
87
86
  isMyProfile: { type: Boolean, required: false, default: false }
88
87
  });
89
88
  const router = useRouter();
90
- const emit = defineEmits(["blog-edit", "like", "comment", "share"]);
89
+ const emit = defineEmits(["blog-edit"]);
91
90
  const isPinned = ref(props.item.ispinned);
92
91
  watch(
93
92
  () => props.item.ispinned,
@@ -24,14 +24,8 @@ type __VLS_Props = {
24
24
  isMyProfile?: boolean;
25
25
  };
26
26
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
27
- comment: () => any;
28
- like: (liked: boolean) => any;
29
- share: () => any;
30
27
  "blog-edit": (item: CardUserBlogProps) => any;
31
28
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
32
- onComment?: (() => any) | undefined;
33
- onLike?: ((liked: boolean) => any) | undefined;
34
- onShare?: (() => any) | undefined;
35
29
  "onBlog-edit"?: ((item: CardUserBlogProps) => any) | undefined;
36
30
  }>, {
37
31
  isMyProfile: 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;
@@ -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;
@@ -50,8 +50,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
50
50
  name: string;
51
51
  description: string;
52
52
  options: AutocompleteOption[] | string[] | number[];
53
- placeholder: string;
54
53
  limit: number;
54
+ placeholder: string;
55
55
  disabledErrorMessage: boolean;
56
56
  disabledBorder: boolean;
57
57
  showCounter: boolean;
@@ -50,8 +50,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
50
50
  name: string;
51
51
  description: string;
52
52
  options: AutocompleteOption[] | string[] | number[];
53
- placeholder: string;
54
53
  limit: number;
54
+ placeholder: string;
55
55
  disabledErrorMessage: boolean;
56
56
  disabledBorder: boolean;
57
57
  showCounter: boolean;
@@ -26,8 +26,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
26
26
  }>, {
27
27
  name: string;
28
28
  state: "user" | "admin";
29
- placeholder: string;
30
29
  limit: number;
30
+ placeholder: string;
31
31
  ignore: string[];
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
33
  declare const _default: typeof __VLS_export;
@@ -26,8 +26,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
26
26
  }>, {
27
27
  name: string;
28
28
  state: "user" | "admin";
29
- placeholder: string;
30
29
  limit: number;
30
+ placeholder: string;
31
31
  ignore: string[];
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
33
  declare const _default: typeof __VLS_export;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.230.0",
3
+ "version": "1.231.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",