@ukpc-lib/react 0.2.8 → 0.2.9

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 (32) hide show
  1. package/dist/assets/icons/notification-icon.svg +7 -0
  2. package/dist/components/Notification/NotificationList/components/AllContent.d.ts +4 -0
  3. package/dist/components/Notification/NotificationList/components/CustomOpenListContext.d.ts +9 -0
  4. package/dist/components/Notification/NotificationList/components/NotitficationItem.d.ts +7 -0
  5. package/dist/components/Notification/NotificationList/index.d.ts +3 -0
  6. package/dist/components/Notification/Tabs/index.d.ts +13 -0
  7. package/dist/components/Notification/firebase/firebaseConfig.d.ts +3 -2
  8. package/dist/components/Notification/index.d.ts +8 -0
  9. package/dist/components/Notification/models/NotiticationDto.d.ts +43 -0
  10. package/dist/components/Topbar/icons/NotificationIcon.d.ts +3 -1
  11. package/dist/components/Topbar/index.d.ts +2 -1
  12. package/dist/components/index.cjs +28 -26
  13. package/dist/components/index.js +3652 -3349
  14. package/dist/{index.module-331f7b11.js → index.module-7d653d97.js} +5285 -5306
  15. package/dist/{index.module-4e0ade57.cjs → index.module-ff8a71df.cjs} +98 -98
  16. package/dist/share/index.cjs +1 -1
  17. package/dist/share/index.js +13 -13
  18. package/package.json +1 -1
  19. package/web-components-bundle/global-menu/index.cjs +1 -1
  20. package/web-components-bundle/global-menu/index.js +1 -2
  21. package/web-components-bundle/global-topbar/index.cjs +1 -2
  22. package/web-components-bundle/global-topbar/index.js +3 -234
  23. package/web-components-bundle/has-permission/index.cjs +1 -1046
  24. package/web-components-bundle/has-permission/index.js +4 -17739
  25. package/web-components-bundle/index-11fd22c1.cjs +884 -0
  26. package/web-components-bundle/index-374bf205.cjs +106 -0
  27. package/web-components-bundle/index-51fef28a.js +17668 -0
  28. package/web-components-bundle/index-75324537.js +17036 -0
  29. package/web-components-bundle/index-5a2ec4da.cjs +0 -38
  30. package/web-components-bundle/index-8330a770.js +0 -7687
  31. package/web-components-bundle/react-to-web-component-287abfaf.cjs +0 -69
  32. package/web-components-bundle/react-to-web-component-8933be15.js +0 -9353
@@ -0,0 +1,7 @@
1
+ <svg width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="4" y="4" width="48" height="48" rx="24" fill="#D1FADF"/>
3
+ <rect x="4" y="4" width="48" height="48" rx="24" stroke="#ECFDF3" stroke-width="8"/>
4
+ <path d="M28 22.4399V25.7699" stroke="#009D4F" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"/>
5
+ <path d="M28.0199 18C24.3399 18 21.3599 20.98 21.3599 24.66V26.76C21.3599 27.44 21.0799 28.46 20.7299 29.04L19.4599 31.16C18.6799 32.47 19.2199 33.93 20.6599 34.41C25.4399 36 30.6099 36 35.3899 34.41C36.7399 33.96 37.3199 32.38 36.5899 31.16L35.3199 29.04C34.9699 28.46 34.6899 27.43 34.6899 26.76V24.66C34.6799 21 31.6799 18 28.0199 18Z" stroke="#009D4F" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"/>
6
+ <path d="M31.3299 34.8201C31.3299 36.6501 29.8299 38.1501 27.9999 38.1501C27.0899 38.1501 26.2499 37.7701 25.6499 37.1701C25.0499 36.5701 24.6699 35.7301 24.6699 34.8201" stroke="#009D4F" stroke-width="1.5" stroke-miterlimit="10"/>
7
+ </svg>
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { NotificationItemProps } from '../../models/NotiticationDto';
3
+ declare const AllContent: FC<NotificationItemProps>;
4
+ export default AllContent;
@@ -0,0 +1,9 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ type CustomProps = {
3
+ isOpen: boolean;
4
+ toggleOpen: () => void;
5
+ setShowModalFalse: () => void;
6
+ };
7
+ export declare const CustomOpenList: import("react").Context<CustomProps>;
8
+ export declare const CustomOpenListProvider: FC<PropsWithChildren>;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ import { NotificationItemDto } from '../../models/NotiticationDto';
2
+ type ItemProps = {
3
+ notification: NotificationItemDto;
4
+ handleUpdateRead: (id: number, isRead: boolean) => void;
5
+ };
6
+ declare const NotitficationItem: ({ notification, handleUpdateRead }: ItemProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default NotitficationItem;
@@ -0,0 +1,3 @@
1
+ import { NotificationApiProps } from '../models/NotiticationDto';
2
+ declare const NotificationList: ({ baseUrl, notiPath }: NotificationApiProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default NotificationList;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ export type TabsProps = {
3
+ id: string;
4
+ tabTitle: string;
5
+ children?: React.ReactNode;
6
+ };
7
+ type GroupProps = React.PropsWithChildren<{
8
+ tabs: TabsProps[];
9
+ setCurrentTab: (index: string) => void;
10
+ currentTab: string;
11
+ }>;
12
+ declare const Tabs: (props: GroupProps) => import("react/jsx-runtime").JSX.Element;
13
+ export default Tabs;
@@ -1,2 +1,3 @@
1
- export declare const requestForToken: (path: string) => void;
2
- export declare const onMessageListener: () => Promise<unknown>;
1
+ import { firebaseProps } from '../../main';
2
+ export declare const requestForToken: (props: firebaseProps) => void;
3
+ export declare const onMessageListener: (props: firebaseProps) => Promise<unknown>;
@@ -1,4 +1,12 @@
1
1
  export type firebaseProps = {
2
2
  path: string;
3
+ apiKey: string;
4
+ authDomain: string;
5
+ projectId: string;
6
+ storageBucket: string;
7
+ messagingSenderId: string;
8
+ appId: string;
9
+ measurementId: string;
10
+ vapidKey: string;
3
11
  };
4
12
  export declare const NotificationBase: (props: firebaseProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,43 @@
1
+ export interface NotificationItemProps {
2
+ notidata: NotificationItemDto[];
3
+ handleUpdateReadAll?: () => void;
4
+ handleUpdateRead: (id: number, isRead: boolean) => void;
5
+ }
6
+ export declare class Paging<T> {
7
+ rows: T[];
8
+ total: number;
9
+ page: number;
10
+ pageSize: number;
11
+ totalPages: number;
12
+ }
13
+ export declare const DEFAULT_PAGE_SIZE = 10;
14
+ export interface NotificationItemDto {
15
+ id: number;
16
+ message: string;
17
+ context: string;
18
+ contextUrl: string;
19
+ userName: string;
20
+ userAvatarUrl: string;
21
+ createdAt: Date | null;
22
+ isRead?: boolean;
23
+ }
24
+ export type UpdateRead = {
25
+ id: number;
26
+ isRead: UpdateReadDto;
27
+ };
28
+ export type UpdateReadDto = {
29
+ isRead: boolean;
30
+ };
31
+ export type NotificationApiProps = {
32
+ baseUrl: string;
33
+ notiPath?: string;
34
+ };
35
+ type NotificationType = {
36
+ rows: NotificationItemDto[];
37
+ total: number;
38
+ };
39
+ export type AllNotificationType = {
40
+ all: NotificationType;
41
+ unread: NotificationType;
42
+ };
43
+ export {};
@@ -1,3 +1,5 @@
1
- export default function NotificationIcon({ primaryColor, }: {
1
+ export default function NotificationIcon({ primaryColor, baseUrl, notiPath, }: {
2
2
  primaryColor?: string;
3
+ baseUrl: string;
4
+ notiPath?: string;
3
5
  }): import("react/jsx-runtime").JSX.Element;
@@ -18,10 +18,11 @@ type User = {
18
18
  isEnable?: boolean;
19
19
  lastLogin?: Date;
20
20
  };
21
- export declare function TopBar({ logo, user, baseUrl, style, classNames, customColors, }: {
21
+ export declare function TopBar({ logo, user, baseUrl, notiPath, style, classNames, customColors, }: {
22
22
  logo: string;
23
23
  user: User;
24
24
  baseUrl: string;
25
+ notiPath?: string;
25
26
  style?: CSSProperties;
26
27
  classNames?: string;
27
28
  customColors?: CustomColors;