pukaad-ui-lib 1.229.0 → 1.230.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.229.0",
4
+ "version": "1.230.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -21,7 +21,17 @@ 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, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
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
+ }>, {
25
35
  disabled: boolean;
26
36
  id: string;
27
37
  disabledPadding: boolean;
@@ -35,6 +35,7 @@ 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"]);
38
39
  const props = defineProps({
39
40
  itemCount: { type: Object, required: false, default: () => ({
40
41
  liked: 0,
@@ -118,6 +119,7 @@ async function toggleLike() {
118
119
  const previousLiked = reaction.liked;
119
120
  reaction.liked = !previousLiked;
120
121
  counts.liked += reaction.liked ? 1 : -1;
122
+ emit("like", !!reaction.liked);
121
123
  if (props.state === "blog" && props.id) {
122
124
  try {
123
125
  await api(`/blogs/${props.id}/like`, {
@@ -133,11 +135,14 @@ async function toggleLike() {
133
135
  function toggleBookmark() {
134
136
  reaction.bookmarked = !reaction.bookmarked;
135
137
  counts.bookmarked += reaction.bookmarked ? 1 : -1;
138
+ emit("bookmark", !!reaction.bookmarked);
136
139
  }
137
140
  function toggleComment() {
138
141
  console.log("comment ");
142
+ emit("comment");
139
143
  }
140
144
  function toggleShared() {
141
145
  isOpenModalShare.value = !isOpenModalShare.value;
146
+ emit("share");
142
147
  }
143
148
  </script>
@@ -21,7 +21,17 @@ 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, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
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
+ }>, {
25
35
  disabled: boolean;
26
36
  id: string;
27
37
  disabledPadding: boolean;
@@ -24,8 +24,14 @@ 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;
27
30
  "blog-edit": (item: CardUserBlogProps) => any;
28
31
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
32
+ onComment?: (() => any) | undefined;
33
+ onLike?: ((liked: boolean) => any) | undefined;
34
+ onShare?: (() => any) | undefined;
29
35
  "onBlog-edit"?: ((item: CardUserBlogProps) => any) | undefined;
30
36
  }>, {
31
37
  isMyProfile: boolean;
@@ -70,6 +70,9 @@
70
70
  :itemActive="{
71
71
  liked: props.item.liked
72
72
  }"
73
+ @like="emit('like', $event)"
74
+ @comment="emit('comment')"
75
+ @share="emit('share')"
73
76
  />
74
77
  </div>
75
78
  </template>
@@ -84,7 +87,7 @@ const props = defineProps({
84
87
  isMyProfile: { type: Boolean, required: false, default: false }
85
88
  });
86
89
  const router = useRouter();
87
- const emit = defineEmits(["blog-edit"]);
90
+ const emit = defineEmits(["blog-edit", "like", "comment", "share"]);
88
91
  const isPinned = ref(props.item.ispinned);
89
92
  watch(
90
93
  () => props.item.ispinned,
@@ -106,6 +109,5 @@ const onBlogClick = () => {
106
109
  };
107
110
  const onBlogEdit = () => {
108
111
  emit("blog-edit", props.item);
109
- console.log(props.item);
110
112
  };
111
113
  </script>
@@ -24,8 +24,14 @@ 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;
27
30
  "blog-edit": (item: CardUserBlogProps) => any;
28
31
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
32
+ onComment?: (() => any) | undefined;
33
+ onLike?: ((liked: boolean) => any) | undefined;
34
+ onShare?: (() => any) | undefined;
29
35
  "onBlog-edit"?: ((item: CardUserBlogProps) => any) | undefined;
30
36
  }>, {
31
37
  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;
67
69
  responsive: boolean;
68
70
  restore: boolean;
69
71
  checkCrossOrigin: boolean;
70
72
  checkOrientation: boolean;
71
73
  crossorigin: "" | "anonymous" | "use-credentials";
72
- modal: boolean;
73
74
  guides: boolean;
74
75
  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;
67
69
  responsive: boolean;
68
70
  restore: boolean;
69
71
  checkCrossOrigin: boolean;
70
72
  checkOrientation: boolean;
71
73
  crossorigin: "" | "anonymous" | "use-credentials";
72
- modal: boolean;
73
74
  guides: boolean;
74
75
  highlight: boolean;
75
- background: boolean;
76
76
  autoCrop: boolean;
77
77
  movable: boolean;
78
78
  rotatable: boolean;
@@ -35,8 +35,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
35
35
  fullHeight: boolean;
36
36
  name: string;
37
37
  limit: number;
38
- accept: string;
39
38
  disabledErrorMessage: boolean;
39
+ accept: string;
40
40
  labelIcon: string;
41
41
  disabledDrop: boolean;
42
42
  column: boolean;
@@ -35,8 +35,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
35
35
  fullHeight: boolean;
36
36
  name: string;
37
37
  limit: number;
38
- accept: string;
39
38
  disabledErrorMessage: boolean;
39
+ accept: string;
40
40
  labelIcon: string;
41
41
  disabledDrop: boolean;
42
42
  column: boolean;
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
22
22
  }>, {
23
23
  id: string;
24
24
  name: string;
25
- disabledForgotPassword: boolean;
26
25
  new: boolean;
26
+ disabledForgotPassword: boolean;
27
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
28
  declare const _default: typeof __VLS_export;
29
29
  export default _default;
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
22
22
  }>, {
23
23
  id: string;
24
24
  name: string;
25
- disabledForgotPassword: boolean;
26
25
  new: boolean;
26
+ disabledForgotPassword: boolean;
27
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
28
  declare const _default: typeof __VLS_export;
29
29
  export default _default;
@@ -24,8 +24,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
24
24
  }) => any) | undefined;
25
25
  }>, {
26
26
  title: string;
27
- confirmText: string;
28
27
  disabledForgotPassword: boolean;
28
+ confirmText: string;
29
29
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
30
  declare const _default: typeof __VLS_export;
31
31
  export default _default;
@@ -24,8 +24,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
24
24
  }) => any) | undefined;
25
25
  }>, {
26
26
  title: string;
27
- confirmText: string;
28
27
  disabledForgotPassword: boolean;
28
+ confirmText: string;
29
29
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
30
  declare const _default: typeof __VLS_export;
31
31
  export default _default;
@@ -28,8 +28,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
28
28
  }>, {
29
29
  title: string;
30
30
  mode: "login" | "secure";
31
- confirmText: string;
32
31
  disabledForgotPassword: boolean;
32
+ confirmText: string;
33
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
34
  declare const _default: typeof __VLS_export;
35
35
  export default _default;
@@ -28,8 +28,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
28
28
  }>, {
29
29
  title: string;
30
30
  mode: "login" | "secure";
31
- confirmText: string;
32
31
  disabledForgotPassword: boolean;
32
+ confirmText: string;
33
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
34
34
  declare const _default: typeof __VLS_export;
35
35
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.229.0",
3
+ "version": "1.230.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",