pukaad-ui-lib 1.466.0 → 1.467.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 (94) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +12 -7
  3. package/dist/runtime/assets/css/core.css +1 -1
  4. package/dist/runtime/components/card/card-blog.d.vue.ts +1 -1
  5. package/dist/runtime/components/card/card-blog.vue.d.ts +1 -1
  6. package/dist/runtime/components/card/card-content/card-content-menu.d.vue.ts +0 -2
  7. package/dist/runtime/components/card/card-content/card-content-menu.vue +14 -14
  8. package/dist/runtime/components/card/card-content/card-content-menu.vue.d.ts +0 -2
  9. package/dist/runtime/components/card/card-profile/card-profile-header.d.vue.ts +1 -1
  10. package/dist/runtime/components/card/card-profile/card-profile-header.vue.d.ts +1 -1
  11. package/dist/runtime/components/card/card-reaction.d.vue.ts +1 -1
  12. package/dist/runtime/components/card/card-reaction.vue.d.ts +1 -1
  13. package/dist/runtime/components/card/card-review.d.vue.ts +4 -4
  14. package/dist/runtime/components/card/card-review.vue.d.ts +4 -4
  15. package/dist/runtime/components/chat/chat-conversation-item.d.vue.ts +1 -1
  16. package/dist/runtime/components/chat/chat-conversation-item.vue.d.ts +1 -1
  17. package/dist/runtime/components/display/display-video.vue +2 -1
  18. package/dist/runtime/components/input/input-address.d.vue.ts +1 -1
  19. package/dist/runtime/components/input/input-address.vue.d.ts +1 -1
  20. package/dist/runtime/components/input/input-autocomplete.d.vue.ts +1 -1
  21. package/dist/runtime/components/input/input-autocomplete.vue.d.ts +1 -1
  22. package/dist/runtime/components/input/input-birth-date.d.vue.ts +1 -1
  23. package/dist/runtime/components/input/input-birth-date.vue.d.ts +1 -1
  24. package/dist/runtime/components/input/input-comment.d.vue.ts +1 -1
  25. package/dist/runtime/components/input/input-comment.vue.d.ts +1 -1
  26. package/dist/runtime/components/input/input-date-picker.d.vue.ts +1 -1
  27. package/dist/runtime/components/input/input-date-picker.vue.d.ts +1 -1
  28. package/dist/runtime/components/input/input-localized-name.d.vue.ts +1 -1
  29. package/dist/runtime/components/input/input-localized-name.vue.d.ts +1 -1
  30. package/dist/runtime/components/input/input-select.vue +1 -1
  31. package/dist/runtime/components/input/input-tag-modal.d.vue.ts +1 -1
  32. package/dist/runtime/components/input/input-tag-modal.vue.d.ts +1 -1
  33. package/dist/runtime/components/input/input-tag.d.vue.ts +1 -1
  34. package/dist/runtime/components/input/input-tag.vue.d.ts +1 -1
  35. package/dist/runtime/components/modal/modal-phone-OTP.d.vue.ts +1 -1
  36. package/dist/runtime/components/modal/modal-phone-OTP.vue.d.ts +1 -1
  37. package/dist/runtime/components/modal/modal-secure.d.vue.ts +1 -1
  38. package/dist/runtime/components/modal/modal-secure.vue.d.ts +1 -1
  39. package/dist/runtime/components/modal/suggest-edit-place/place-address.d.vue.ts +2 -2
  40. package/dist/runtime/components/modal/suggest-edit-place/place-address.vue.d.ts +2 -2
  41. package/dist/runtime/components/picker/picker-option-menu/picker-option-menu-user.vue +2 -0
  42. package/dist/runtime/components/preview/preview-content.d.vue.ts +1 -1
  43. package/dist/runtime/components/preview/preview-content.vue +53 -32
  44. package/dist/runtime/components/preview/preview-content.vue.d.ts +1 -1
  45. package/dist/runtime/components/ui/alert-dialog/AlertDialogContent.d.vue.ts +4 -4
  46. package/dist/runtime/components/ui/alert-dialog/AlertDialogContent.vue.d.ts +4 -4
  47. package/dist/runtime/components/ui/dialog/DialogContent.d.vue.ts +4 -4
  48. package/dist/runtime/components/ui/dialog/DialogContent.vue.d.ts +4 -4
  49. package/dist/runtime/components/ui/dialog/DialogScrollContent.d.vue.ts +4 -4
  50. package/dist/runtime/components/ui/dialog/DialogScrollContent.vue.d.ts +4 -4
  51. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.d.vue.ts +2 -2
  52. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +2 -2
  53. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.d.vue.ts +4 -4
  54. package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +4 -4
  55. package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.d.vue.ts +2 -2
  56. package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.vue.d.ts +2 -2
  57. package/dist/runtime/components/ui/native-select/NativeSelectOption.d.vue.ts +2 -2
  58. package/dist/runtime/components/ui/native-select/NativeSelectOption.vue.d.ts +2 -2
  59. package/dist/runtime/components/ui/popover/PopoverContent.d.vue.ts +4 -4
  60. package/dist/runtime/components/ui/popover/PopoverContent.vue.d.ts +4 -4
  61. package/dist/runtime/components/ui/select/SelectContent.d.vue.ts +2 -2
  62. package/dist/runtime/components/ui/select/SelectContent.vue.d.ts +2 -2
  63. package/dist/runtime/components/ui/select/SelectItem.vue +1 -1
  64. package/dist/runtime/components/ui/select/SelectTrigger.vue +1 -1
  65. package/dist/runtime/components/ui/sheet/SheetContent.d.vue.ts +4 -4
  66. package/dist/runtime/components/ui/sheet/SheetContent.vue.d.ts +4 -4
  67. package/dist/runtime/components/video.vue +2 -1
  68. package/dist/runtime/composables/store-notification.d.ts +1 -1
  69. package/dist/runtime/composables/useSso.d.ts +1 -0
  70. package/dist/runtime/composables/useSso.js +27 -2
  71. package/package.json +3 -2
  72. package/dist/runtime/assets/css/fonts/Anuphan/Anuphan-Bold.ttf +0 -0
  73. package/dist/runtime/assets/css/fonts/Anuphan/Anuphan-ExtraLight.ttf +0 -0
  74. package/dist/runtime/assets/css/fonts/Anuphan/Anuphan-Light.ttf +0 -0
  75. package/dist/runtime/assets/css/fonts/Anuphan/Anuphan-Medium.ttf +0 -0
  76. package/dist/runtime/assets/css/fonts/Anuphan/Anuphan-Regular.ttf +0 -0
  77. package/dist/runtime/assets/css/fonts/Anuphan/Anuphan-SemiBold.ttf +0 -0
  78. package/dist/runtime/assets/css/fonts/Anuphan/Anuphan-Thin.ttf +0 -0
  79. package/dist/runtime/assets/css/fonts/Sarabun/Sarabun-Bold.ttf +0 -0
  80. package/dist/runtime/assets/css/fonts/Sarabun/Sarabun-BoldItalic.ttf +0 -0
  81. package/dist/runtime/assets/css/fonts/Sarabun/Sarabun-ExtraBold.ttf +0 -0
  82. package/dist/runtime/assets/css/fonts/Sarabun/Sarabun-ExtraBoldItalic.ttf +0 -0
  83. package/dist/runtime/assets/css/fonts/Sarabun/Sarabun-ExtraLight.ttf +0 -0
  84. package/dist/runtime/assets/css/fonts/Sarabun/Sarabun-ExtraLightItalic.ttf +0 -0
  85. package/dist/runtime/assets/css/fonts/Sarabun/Sarabun-Italic.ttf +0 -0
  86. package/dist/runtime/assets/css/fonts/Sarabun/Sarabun-Light.ttf +0 -0
  87. package/dist/runtime/assets/css/fonts/Sarabun/Sarabun-LightItalic.ttf +0 -0
  88. package/dist/runtime/assets/css/fonts/Sarabun/Sarabun-Medium.ttf +0 -0
  89. package/dist/runtime/assets/css/fonts/Sarabun/Sarabun-MediumItalic.ttf +0 -0
  90. package/dist/runtime/assets/css/fonts/Sarabun/Sarabun-Regular.ttf +0 -0
  91. package/dist/runtime/assets/css/fonts/Sarabun/Sarabun-SemiBold.ttf +0 -0
  92. package/dist/runtime/assets/css/fonts/Sarabun/Sarabun-SemiBoldItalic.ttf +0 -0
  93. package/dist/runtime/assets/css/fonts/Sarabun/Sarabun-Thin.ttf +0 -0
  94. package/dist/runtime/assets/css/fonts/Sarabun/Sarabun-ThinItalic.ttf +0 -0
@@ -13,21 +13,21 @@ type __VLS_Slots = {} & {
13
13
  declare const __VLS_base: import("vue").DefineComponent<SheetContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
14
  submit: (event: Event) => any;
15
15
  close: () => any;
16
+ openAutoFocus: (event: Event) => any;
17
+ closeAutoFocus: (event: Event) => any;
16
18
  escapeKeyDown: (event: KeyboardEvent) => any;
17
19
  pointerDownOutside: (event: import("reka-ui").PointerDownOutsideEvent) => any;
18
20
  focusOutside: (event: import("reka-ui").FocusOutsideEvent) => any;
19
21
  interactOutside: (event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => any;
20
- openAutoFocus: (event: Event) => any;
21
- closeAutoFocus: (event: Event) => any;
22
22
  }, string, import("vue").PublicProps, Readonly<SheetContentProps> & Readonly<{
23
23
  onSubmit?: ((event: Event) => any) | undefined;
24
24
  onClose?: (() => any) | undefined;
25
+ onOpenAutoFocus?: ((event: Event) => any) | undefined;
26
+ onCloseAutoFocus?: ((event: Event) => any) | undefined;
25
27
  onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
26
28
  onPointerDownOutside?: ((event: import("reka-ui").PointerDownOutsideEvent) => any) | undefined;
27
29
  onFocusOutside?: ((event: import("reka-ui").FocusOutsideEvent) => any) | undefined;
28
30
  onInteractOutside?: ((event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => any) | undefined;
29
- onOpenAutoFocus?: ((event: Event) => any) | undefined;
30
- onCloseAutoFocus?: ((event: Event) => any) | undefined;
31
31
  }>, {
32
32
  side: "top" | "right" | "bottom" | "left";
33
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -29,7 +29,8 @@ function onMouseEnter() {
29
29
  if (!props.hoverPlay) return;
30
30
  const el = videoRef.value;
31
31
  if (!el) return;
32
- el.play();
32
+ el.play().catch(() => {
33
+ });
33
34
  }
34
35
  function onMouseLeave() {
35
36
  if (!props.hoverPlay) return;
@@ -71,7 +71,7 @@ export declare const useNotificationStore: import("pinia").StoreDefinition<"noti
71
71
  openDrawer: () => void;
72
72
  closeDrawer: () => void;
73
73
  toggleDrawer: () => void;
74
- }, "unreadCount" | "unreadByTab" | "isOpenDrawer" | "activeTab" | "lists" | "hasMore" | "isLoadingList" | "isLoadingMore">, Pick<{
74
+ }, "unreadCount" | "hasMore" | "isLoadingMore" | "activeTab" | "unreadByTab" | "isOpenDrawer" | "lists" | "isLoadingList">, Pick<{
75
75
  unreadCount: import("vue").Ref<number, number>;
76
76
  unreadByTab: {
77
77
  general: number;
@@ -12,4 +12,5 @@ export declare function useSso(): {
12
12
  clearSession: () => Promise<boolean>;
13
13
  revokeToken: (secId: string) => Promise<void>;
14
14
  syncSession: (localSecId: string | null | undefined, isValid: (secId: string) => Promise<boolean>) => Promise<SsoSyncResult>;
15
+ watchSession: (onChange: () => void) => (() => void);
15
16
  };
@@ -1,5 +1,5 @@
1
1
  import { useRuntimeConfig } from "#imports";
2
- import { useEventListener, useTimeoutFn } from "@vueuse/core";
2
+ import { tryOnScopeDispose, useEventListener, useTimeoutFn } from "@vueuse/core";
3
3
  const SSO_TIMEOUT_MS = 3e3;
4
4
  const toOrigin = (url) => {
5
5
  try {
@@ -81,5 +81,30 @@ export function useSso() {
81
81
  }
82
82
  return { secId: null, changed: true };
83
83
  };
84
- return { readSession, saveSession, clearSession, revokeToken, syncSession };
84
+ const watchSession = (onChange) => {
85
+ if (typeof window === "undefined" || typeof document === "undefined" || !ssoOrigin) {
86
+ return () => {
87
+ };
88
+ }
89
+ const iframe = document.createElement("iframe");
90
+ iframe.style.display = "none";
91
+ iframe.src = `${ssoBase}/watch`;
92
+ const stopMessage = useEventListener(window, "message", (event) => {
93
+ if (event.origin !== ssoOrigin) return;
94
+ if (event.source !== iframe.contentWindow) return;
95
+ if (event.data?.type === "SSO_CHANGED") onChange();
96
+ });
97
+ const stopLoad = useEventListener(iframe, "load", () => {
98
+ iframe.contentWindow?.postMessage({ type: "SSO_WATCH" }, ssoOrigin);
99
+ });
100
+ document.body.appendChild(iframe);
101
+ const stop = () => {
102
+ stopMessage();
103
+ stopLoad();
104
+ iframe.remove();
105
+ };
106
+ tryOnScopeDispose(stop);
107
+ return stop;
108
+ };
109
+ return { readSession, saveSession, clearSession, revokeToken, syncSession, watchSession };
85
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.466.0",
3
+ "version": "1.467.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,7 +38,8 @@
38
38
  "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
39
39
  },
40
40
  "dependencies": {
41
- "@nuxt/fonts": "^0.13.0",
41
+ "@fontsource/anuphan": "^5.3.0",
42
+ "@fontsource/sarabun": "^5.3.0",
42
43
  "@nuxt/icon": "^1.10.3",
43
44
  "@nuxt/image": "^1.9.0",
44
45
  "@nuxt/kit": "^4.0.0",