sea-react-components 1.3.25 → 1.3.26

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 (103) hide show
  1. package/dist/components/cards-list/index.d.ts.map +1 -1
  2. package/dist/components/cards-list/index.js +4 -3
  3. package/dist/components/comments-container/comment-item/index.d.ts.map +1 -1
  4. package/dist/components/comments-container/comment-item/index.js +11 -4
  5. package/dist/components/comments-container/comments-list/index.js +1 -1
  6. package/dist/components/comments-container/index.js +1 -1
  7. package/dist/components/comments-container copy/comment-event-bus/index.d.ts +4 -0
  8. package/dist/components/comments-container copy/comment-event-bus/index.d.ts.map +1 -0
  9. package/dist/components/comments-container copy/comment-event-bus/index.js +4 -0
  10. package/dist/components/comments-container copy/comment-form/index.d.ts +39 -0
  11. package/dist/components/comments-container copy/comment-form/index.d.ts.map +1 -0
  12. package/dist/components/comments-container copy/comment-form/index.js +83 -0
  13. package/dist/components/comments-container copy/comment-item/index.d.ts +13 -0
  14. package/dist/components/comments-container copy/comment-item/index.d.ts.map +1 -0
  15. package/dist/components/comments-container copy/comment-item/index.js +20 -0
  16. package/dist/components/comments-container copy/comments-list/index.d.ts +24 -0
  17. package/dist/components/comments-container copy/comments-list/index.d.ts.map +1 -0
  18. package/dist/components/comments-container copy/comments-list/index.js +35 -0
  19. package/dist/components/comments-container copy/constants/index.d.ts +5 -0
  20. package/dist/components/comments-container copy/constants/index.d.ts.map +1 -0
  21. package/dist/components/comments-container copy/constants/index.js +5 -0
  22. package/dist/components/comments-container copy/index.d.ts +21 -0
  23. package/dist/components/comments-container copy/index.d.ts.map +1 -0
  24. package/dist/components/comments-container copy/index.js +27 -0
  25. package/dist/components/comments-container copy/use-comments/index.d.ts +17 -0
  26. package/dist/components/comments-container copy/use-comments/index.d.ts.map +1 -0
  27. package/dist/components/comments-container copy/use-comments/index.js +59 -0
  28. package/dist/components/form/index.d.ts +13 -7
  29. package/dist/components/form/index.d.ts.map +1 -1
  30. package/dist/components/form/index.js +84 -3
  31. package/dist/components/icon/index.d.ts +3 -3
  32. package/dist/components/icon/index.d.ts.map +1 -1
  33. package/dist/components/icon/index.js +2 -2
  34. package/dist/components/list-item/index.d.ts.map +1 -1
  35. package/dist/components/list-item/index.js +2 -2
  36. package/dist/components/log-activities-container/activity-message/index.d.ts +7 -0
  37. package/dist/components/log-activities-container/activity-message/index.d.ts.map +1 -0
  38. package/dist/components/log-activities-container/activity-message/index.js +63 -0
  39. package/dist/components/log-activities-container/comment-event-bus/index.d.ts +4 -0
  40. package/dist/components/log-activities-container/comment-event-bus/index.d.ts.map +1 -0
  41. package/dist/components/log-activities-container/comment-event-bus/index.js +4 -0
  42. package/dist/components/log-activities-container/comment-form/index.d.ts +39 -0
  43. package/dist/components/log-activities-container/comment-form/index.d.ts.map +1 -0
  44. package/dist/components/log-activities-container/comment-form/index.js +83 -0
  45. package/dist/components/log-activities-container/comment-item/index.d.ts +13 -0
  46. package/dist/components/log-activities-container/comment-item/index.d.ts.map +1 -0
  47. package/dist/components/log-activities-container/comment-item/index.js +20 -0
  48. package/dist/components/log-activities-container/comments-list/index.d.ts +24 -0
  49. package/dist/components/log-activities-container/comments-list/index.d.ts.map +1 -0
  50. package/dist/components/log-activities-container/comments-list/index.js +35 -0
  51. package/dist/components/log-activities-container/constants/index.d.ts +5 -0
  52. package/dist/components/log-activities-container/constants/index.d.ts.map +1 -0
  53. package/dist/components/log-activities-container/constants/index.js +5 -0
  54. package/dist/components/log-activities-container/index.d.ts +10 -0
  55. package/dist/components/log-activities-container/index.d.ts.map +1 -0
  56. package/dist/components/log-activities-container/index.js +9 -0
  57. package/dist/components/log-activities-container/log-activities-list/index.d.ts +11 -0
  58. package/dist/components/log-activities-container/log-activities-list/index.d.ts.map +1 -0
  59. package/dist/components/log-activities-container/log-activities-list/index.js +13 -0
  60. package/dist/components/log-activities-container/log-activity-item/index.d.ts +7 -0
  61. package/dist/components/log-activities-container/log-activity-item/index.d.ts.map +1 -0
  62. package/dist/components/log-activities-container/log-activity-item/index.js +63 -0
  63. package/dist/components/log-activities-container/use-comments/index.d.ts +17 -0
  64. package/dist/components/log-activities-container/use-comments/index.d.ts.map +1 -0
  65. package/dist/components/log-activities-container/use-comments/index.js +59 -0
  66. package/dist/components/log-activities-container/use-log-activities/index.d.ts +14 -0
  67. package/dist/components/log-activities-container/use-log-activities/index.d.ts.map +1 -0
  68. package/dist/components/log-activities-container/use-log-activities/index.js +41 -0
  69. package/dist/components/modal/index.js +1 -1
  70. package/dist/components/native-menu/index.d.ts +3 -1
  71. package/dist/components/native-menu/index.d.ts.map +1 -1
  72. package/dist/components/native-menu/index.js +22 -4
  73. package/dist/components/native-menu/native-menu-item/index.js +1 -1
  74. package/dist/components/notifications-menu/index.d.ts.map +1 -1
  75. package/dist/components/notifications-menu/index.js +53 -10
  76. package/dist/components/radio-button/index.d.ts +4 -8
  77. package/dist/components/radio-button/index.d.ts.map +1 -1
  78. package/dist/components/radio-button/index.js +3 -2
  79. package/dist/components/select/index.d.ts +2 -1
  80. package/dist/components/select/index.d.ts.map +1 -1
  81. package/dist/components/select/index.js +2 -2
  82. package/dist/components/tab/index.d.ts.map +1 -1
  83. package/dist/components/tab/index.js +1 -1
  84. package/dist/index.d.ts +3 -1
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.js +4 -1
  87. package/dist/services/index.d.ts +2 -0
  88. package/dist/services/index.d.ts.map +1 -0
  89. package/dist/services/index.js +1 -0
  90. package/dist/services/remote-action/index.d.ts +14 -0
  91. package/dist/services/remote-action/index.d.ts.map +1 -0
  92. package/dist/services/remote-action/index.js +21 -0
  93. package/dist/services/remote-service/index.d.ts +31 -0
  94. package/dist/services/remote-service/index.d.ts.map +1 -0
  95. package/dist/services/remote-service/index.js +45 -0
  96. package/dist/tsconfig.tsbuildinfo +1 -1
  97. package/dist/utils/axios/index.d.ts +1 -0
  98. package/dist/utils/axios/index.d.ts.map +1 -1
  99. package/dist/utils/axios/index.js +7 -2
  100. package/dist/utils/remote-action/index.d.ts +14 -0
  101. package/dist/utils/remote-action/index.d.ts.map +1 -0
  102. package/dist/utils/remote-action/index.js +21 -0
  103. package/package.json +2 -2
@@ -0,0 +1,63 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { CONSTANTS, Utils } from "sea-platform-helpers";
4
+ const NONE = "N/A";
5
+ export default function LogActivityItem({ activity }) {
6
+ var _a, _b, _c, _d, _e, _f;
7
+ let message = null;
8
+ switch (activity.type) {
9
+ case CONSTANTS.Activity.ActivityTypes.SystemAction: {
10
+ break;
11
+ }
12
+ case CONSTANTS.Activity.ActivityTypes.NewCommentAdded: {
13
+ const metadata = activity.metadata;
14
+ message = (_jsxs("p", { children: ["New comment added", " ", _jsx("span", { className: "font-semibold", children: metadata.description })] }));
15
+ break;
16
+ }
17
+ case CONSTANTS.Activity.ActivityTypes.CommentGetUpdated: {
18
+ const metadata = activity.metadata;
19
+ message = (_jsxs("div", { className: "flex flex-col gap-[1px]", children: [_jsx("p", { children: "Comment updated" }), _jsxs("div", { className: "text-sm", children: [_jsxs("p", { children: ["From:", " ", _jsx("span", { className: "font-semibold", children: metadata.description.from })] }), _jsxs("p", { children: ["To:", " ", _jsx("span", { className: "font-semibold", children: metadata.description.to })] })] })] }));
20
+ break;
21
+ }
22
+ case CONSTANTS.Activity.ActivityTypes.CommentGetDeleted: {
23
+ const metadata = activity.metadata;
24
+ message = (_jsxs("p", { children: ["Comment delete", " ", _jsx("span", { className: "font-semibold", children: metadata.description })] }));
25
+ break;
26
+ }
27
+ case CONSTANTS.Activity.ActivityTypes.NewProjectCreated: {
28
+ const metadata = activity.metadata;
29
+ message = (_jsxs("p", { children: ["New project created", " ", _jsx("span", { className: "font-semibold", children: metadata.title })] }));
30
+ break;
31
+ }
32
+ case CONSTANTS.Activity.ActivityTypes.ProjectGetUpdated: {
33
+ const metadata = activity.metadata;
34
+ message = (_jsxs("div", { className: "flex flex-col gap-[1px]", children: [_jsx("p", { children: "Project updated" }), _jsxs("div", { className: "text-sm", children: [metadata.title && (_jsx("div", { className: "flex gap-1", children: _jsxs("p", { children: ["Title:", " ", _jsx("span", { className: "font-semibold", children: metadata.title.to })] }) })), metadata.description && (_jsx("div", { className: "flex gap-1", children: _jsxs("p", { children: ["Description:", " ", _jsx("span", { className: "font-semibold", children: metadata.description.to })] }) })), metadata.budget && (_jsx("div", { className: "flex gap-1", children: _jsxs("p", { children: ["Budget:", " ", _jsx("span", { className: "font-semibold", children: Utils.Number.numeralUtils(metadata.budget.to).format(`0,0.00`) })] }) })), metadata.owner && (_jsx("div", { className: "flex gap-1", children: _jsxs("p", { children: ["Owner:", " ", _jsx("span", { className: "font-semibold", children: (_b = (_a = metadata.owner.to) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : NONE })] }) })), metadata.startDate && (_jsx("div", { className: "flex gap-1", children: _jsxs("p", { children: ["Start Date:", " ", _jsx("span", { className: "font-semibold", children: Utils.Moment.formatDate(metadata.startDate.to) })] }) })), metadata.endDate && (_jsx("div", { className: "flex gap-1", children: _jsxs("p", { children: ["End Date:", " ", _jsx("span", { className: "font-semibold", children: Utils.Moment.formatDate(metadata.endDate.to) })] }) }))] })] }));
35
+ break;
36
+ }
37
+ case CONSTANTS.Activity.ActivityTypes.ProjectGetDeleted: {
38
+ const metadata = activity.metadata;
39
+ message = (_jsxs("p", { children: ["Project deleted", " ", _jsx("span", { className: "font-semibold", children: metadata.title })] }));
40
+ break;
41
+ }
42
+ case CONSTANTS.Activity.ActivityTypes.NewTaskCreated: {
43
+ const metadata = activity.metadata;
44
+ message = (_jsxs("p", { children: ["New task created", " ", _jsx("span", { className: "font-semibold", children: metadata.title })] }));
45
+ break;
46
+ }
47
+ case CONSTANTS.Activity.ActivityTypes.TaskGetUpdated: {
48
+ const metadata = activity.metadata;
49
+ message = (_jsxs("div", { className: "flex flex-col gap-[1px]", children: [_jsx("p", { children: "Task updated" }), _jsxs("div", { className: "text-sm", children: [metadata.title && (_jsx("div", { className: "flex gap-1", children: _jsxs("p", { children: ["Title:", " ", _jsx("span", { className: "font-semibold", children: metadata.title.to })] }) })), metadata.description && (_jsx("div", { className: "flex gap-1", children: _jsxs("p", { children: ["Description:", " ", _jsx("span", { className: "font-semibold", children: metadata.description.to })] }) })), metadata.section && (_jsx("div", { className: "flex gap-1", children: _jsxs("p", { children: ["Section:", " ", _jsx("span", { className: "font-semibold", children: (_d = (_c = metadata.section.to) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : NONE })] }) })), metadata.milestone && (_jsx("div", { className: "flex gap-1", children: _jsxs("p", { children: ["Milestone:", " ", _jsx("span", { className: "font-semibold", children: (_f = (_e = metadata.milestone.to) === null || _e === void 0 ? void 0 : _e.title) !== null && _f !== void 0 ? _f : NONE })] }) })), metadata.priority && (_jsx("div", { className: "flex gap-1", children: _jsxs("p", { children: ["Priority:", " ", _jsx("span", { className: "font-semibold", children: metadata.priority.to })] }) })), metadata.dueDate && (_jsx("div", { className: "flex gap-1", children: _jsxs("p", { children: ["Due date:", " ", _jsx("span", { className: "font-semibold", children: Utils.Moment.formatDate(metadata.dueDate.to) })] }) })), metadata.isCompleted && (_jsx("div", { className: "flex gap-1", children: _jsxs("p", { children: ["Completed:", " ", _jsx("span", { className: "font-semibold", children: metadata.isCompleted.to ? "Yes" : "No" })] }) }))] })] }));
50
+ break;
51
+ }
52
+ case CONSTANTS.Activity.ActivityTypes.TaskGetDeleted: {
53
+ const metadata = activity.metadata;
54
+ message = (_jsxs("p", { children: ["Task deleted ", _jsx("span", { className: "font-semibold", children: metadata.title })] }));
55
+ break;
56
+ }
57
+ default: {
58
+ message = _jsxs("p", { children: ["Activity type ", activity.type, " is not supported."] });
59
+ break;
60
+ }
61
+ }
62
+ return _jsxs("div", { className: "text-text line-clamp-2 truncate", children: [" ", message, " "] });
63
+ }
@@ -0,0 +1,17 @@
1
+ import { DTO } from "sea-platform-helpers";
2
+ export declare function useComments({ commentsBaseUrl, objectId, limit, parentCommentId, }: {
3
+ commentsBaseUrl: string;
4
+ objectId: string;
5
+ limit?: number;
6
+ parentCommentId?: string;
7
+ }): {
8
+ comments: DTO.Comment.IComment[];
9
+ loading: boolean;
10
+ totalCount: number;
11
+ totalPages: number;
12
+ pushNewComment: (comment: DTO.Comment.IComment) => void;
13
+ updateComment: (comment: DTO.Comment.IComment) => void;
14
+ loadMoreComments: () => void;
15
+ hasMoreComments: boolean;
16
+ };
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/log-activities-container/use-comments/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAS,MAAM,sBAAsB,CAAC;AAGlD,wBAAgB,WAAW,CAAC,EAC1B,eAAe,EACf,QAAQ,EACR,KAAU,EACV,eAAe,GAChB,EAAE;IACD,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;;;;;8BA0CkC,GAAG,CAAC,OAAO,CAAC,QAAQ;6BAkBrB,GAAG,CAAC,OAAO,CAAC,QAAQ;;;EAkBrD"}
@@ -0,0 +1,59 @@
1
+ "use client";
2
+ import { useEffect, useState } from "react";
3
+ import { Utils } from "sea-platform-helpers";
4
+ import { authAxiosInstance } from "../../../utils/auth-axios";
5
+ export function useComments({ commentsBaseUrl, objectId, limit = 10, parentCommentId, }) {
6
+ const [loading, setLoading] = useState(false);
7
+ const [page, setPage] = useState(1);
8
+ const [totalCount, setTotalCount] = useState(0);
9
+ const [totalPages, setTotalPages] = useState(1);
10
+ const [comments, setComments] = useState([]);
11
+ useEffect(() => {
12
+ setLoading(true);
13
+ const params = new URLSearchParams({
14
+ page: String(page),
15
+ limit: String(limit),
16
+ objectId,
17
+ ...(parentCommentId ? { parentCommentId } : {}),
18
+ });
19
+ authAxiosInstance
20
+ .get(`${commentsBaseUrl}?${params.toString()}`)
21
+ .then((response) => {
22
+ const { data, totalCount: tc, totalPages: tp } = response.data;
23
+ setTotalCount(tc);
24
+ setTotalPages(tp);
25
+ setComments((prev) => Utils.Array.concatWithoutDuplicates(prev, data, (a, b) => a.id === b.id));
26
+ })
27
+ .finally(() => {
28
+ setLoading(false);
29
+ });
30
+ }, [commentsBaseUrl, limit, objectId, page]);
31
+ const pushNewComment = (comment) => {
32
+ setComments((prev) => {
33
+ if (comment.isReply && !parentCommentId) {
34
+ return prev.map((c) => c.id === comment.parentCommentId
35
+ ? { ...c, repliesCount: c.repliesCount + 1 }
36
+ : c);
37
+ }
38
+ else {
39
+ return Utils.Array.concatWithoutDuplicates([comment], prev, (a, b) => a.id === b.id);
40
+ }
41
+ });
42
+ };
43
+ const updateComment = (comment) => {
44
+ setComments((prev) => prev.map((c) => (c.id === comment.id ? comment : c)));
45
+ };
46
+ const loadMoreComments = () => {
47
+ setPage((prev) => Math.min(prev + 1, totalPages));
48
+ };
49
+ return {
50
+ comments,
51
+ loading,
52
+ totalCount,
53
+ totalPages,
54
+ pushNewComment,
55
+ updateComment,
56
+ loadMoreComments,
57
+ hasMoreComments: totalCount !== comments.length,
58
+ };
59
+ }
@@ -0,0 +1,14 @@
1
+ import { DTO } from "sea-platform-helpers";
2
+ export declare function useLogActivities({ logActivitiesBaseUrl, objectId, limit, }: {
3
+ logActivitiesBaseUrl: string;
4
+ objectId: string;
5
+ limit?: number;
6
+ }): {
7
+ logActivities: DTO.Activity.IActivity[];
8
+ loading: boolean;
9
+ totalCount: number;
10
+ totalPages: number;
11
+ loadMoreLogActivities: () => void;
12
+ hasMoreLogActivities: boolean;
13
+ };
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/log-activities-container/use-log-activities/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAS,MAAM,sBAAsB,CAAC;AAGlD,wBAAgB,gBAAgB,CAAC,EAC/B,oBAAoB,EACpB,QAAQ,EACR,KAAU,GACX,EAAE;IACD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;;;;;;;EAuDA"}
@@ -0,0 +1,41 @@
1
+ "use client";
2
+ import { useEffect, useState } from "react";
3
+ import { Utils } from "sea-platform-helpers";
4
+ import { authAxiosInstance } from "../../../utils/auth-axios";
5
+ export function useLogActivities({ logActivitiesBaseUrl, objectId, limit = 10, }) {
6
+ const [loading, setLoading] = useState(false);
7
+ const [page, setPage] = useState(1);
8
+ const [totalCount, setTotalCount] = useState(0);
9
+ const [totalPages, setTotalPages] = useState(1);
10
+ const [logActivities, setLogActivities] = useState([]);
11
+ useEffect(() => {
12
+ setLoading(true);
13
+ const params = new URLSearchParams({
14
+ page: String(page),
15
+ limit: String(limit),
16
+ objectId,
17
+ });
18
+ authAxiosInstance
19
+ .get(`${logActivitiesBaseUrl}?${params.toString()}`)
20
+ .then((response) => {
21
+ const { data, totalCount: tc, totalPages: tp } = response.data;
22
+ setTotalCount(tc);
23
+ setTotalPages(tp);
24
+ setLogActivities((prev) => Utils.Array.concatWithoutDuplicates(prev, data, (a, b) => a.id === b.id));
25
+ })
26
+ .finally(() => {
27
+ setLoading(false);
28
+ });
29
+ }, [logActivitiesBaseUrl, limit, objectId, page]);
30
+ const loadMoreLogActivities = () => {
31
+ setPage((prev) => Math.min(prev + 1, totalPages));
32
+ };
33
+ return {
34
+ logActivities,
35
+ loading,
36
+ totalCount,
37
+ totalPages,
38
+ loadMoreLogActivities,
39
+ hasMoreLogActivities: totalCount !== logActivities.length,
40
+ };
41
+ }
@@ -5,7 +5,7 @@ import clsx from "clsx";
5
5
  import { useEffect, useState } from "react";
6
6
  const sizeClasses = {
7
7
  sm: "w-1/2 md:w-1/4",
8
- md: "w-1/2 md:w-1/3",
8
+ md: "w-5/6 md:w-1/3 md:min-w-[600px]",
9
9
  lg: "w-5/6 md:w-1/2",
10
10
  xl: "w-5/6 md:w-3/4",
11
11
  };
@@ -6,6 +6,8 @@ export type Props = {
6
6
  size?: MenuSize;
7
7
  maxHeight?: number;
8
8
  onReachBottom?: () => void;
9
+ closeMenu: boolean;
10
+ setCloseMenu: (close: boolean) => void;
9
11
  } & React.HTMLAttributes<HTMLDivElement>;
10
- export default function NativeMenu({ menuButton, children, className, size, maxHeight, onReachBottom, ...props }: Props): import("react/jsx-runtime").JSX.Element;
12
+ export default function NativeMenu({ menuButton, children, className, size, maxHeight, onReachBottom, setCloseMenu, closeMenu, ...props }: Props): import("react/jsx-runtime").JSX.Element;
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/native-menu/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAGpE,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AASjD,MAAM,MAAM,KAAK,GAAG;IAClB,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAEzC,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,UAAU,EACV,QAAQ,EACR,SAAS,EACT,IAAW,EACX,SAAe,EACf,aAAa,EACb,GAAG,KAAK,EACT,EAAE,KAAK,2CA+DP"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/native-menu/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAGpE,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AASjD,MAAM,MAAM,KAAK,GAAG;IAClB,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAEzC,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,UAAU,EACV,QAAQ,EACR,SAAS,EACT,IAAW,EACX,SAAe,EACf,aAAa,EACb,YAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,2CAqFP"}
@@ -8,7 +8,7 @@ const sizeClasses = {
8
8
  lg: "w-80",
9
9
  xl: "w-96",
10
10
  };
11
- export default function NativeMenu({ menuButton, children, className, size = "md", maxHeight = 200, onReachBottom, ...props }) {
11
+ export default function NativeMenu({ menuButton, children, className, size = "md", maxHeight = 200, onReachBottom, setCloseMenu, closeMenu, ...props }) {
12
12
  const [open, setOpen] = useState(false);
13
13
  const menuRef = useRef(null);
14
14
  const scrollRef = useRef(null);
@@ -16,7 +16,7 @@ export default function NativeMenu({ menuButton, children, className, size = "md
16
16
  useEffect(() => {
17
17
  const handleClickOutside = (event) => {
18
18
  if (menuRef.current && !menuRef.current.contains(event.target)) {
19
- setOpen(false);
19
+ handleClose();
20
20
  }
21
21
  };
22
22
  document.addEventListener("mousedown", handleClickOutside);
@@ -33,14 +33,32 @@ export default function NativeMenu({ menuButton, children, className, size = "md
33
33
  onReachBottom();
34
34
  }
35
35
  };
36
+ const handleOpen = () => {
37
+ setCloseMenu(false);
38
+ setOpen(true);
39
+ };
40
+ const handleClose = () => {
41
+ setCloseMenu(true);
42
+ setOpen(false);
43
+ };
44
+ useEffect(() => {
45
+ if (closeMenu) {
46
+ handleClose();
47
+ }
48
+ }, [closeMenu]);
36
49
  // Trigger onReachBottom when menu opens if already at bottom
37
50
  useEffect(() => {
38
51
  if (open && onReachBottom && checkBottom()) {
39
52
  onReachBottom();
40
53
  }
41
54
  }, [open]);
42
- return (_jsxs("div", { className: clsx("relative inline-block text-left", className), ref: menuRef, ...props, children: [_jsx("div", { onClick: () => setOpen((prev) => !prev), className: "cursor-pointer", children: menuButton }), open && (_jsx("div", { ref: scrollRef, onScroll: handleScroll, className: clsx("absolute right-0 mt-2 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 z-50 overflow-x-hidden", sizeClasses[size]), style: {
55
+ return (_jsxs("div", { className: clsx("relative inline-block text-left", className), ref: menuRef, ...props, children: [_jsx("div", { onClick: () => {
56
+ if (!open)
57
+ handleOpen();
58
+ else
59
+ handleClose();
60
+ }, className: "cursor-pointer", children: menuButton }), open && (_jsx("div", { ref: scrollRef, onScroll: handleScroll, className: clsx("absolute right-0 mt-1 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 z-50 overflow-x-hidden", sizeClasses[size]), style: {
43
61
  maxHeight: maxHeight,
44
62
  overflowY: "auto",
45
- }, children: _jsx("div", { className: "py-1", children: children }) }))] }));
63
+ }, children: _jsx("div", { children: children }) }))] }));
46
64
  }
@@ -2,5 +2,5 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import clsx from "clsx";
4
4
  export default function NativeMenuItem({ children, className, selected = false, disabled = false, ...props }) {
5
- return (_jsx("div", { className: clsx("rounded-md transition-all duration-300 ease-in-out", selected && "bg-primary", !disabled ? "hover:bg-primary hover:bg-opacity-50" : "bg-gray-200", className), ...props, children: children }));
5
+ return (_jsx("div", { className: clsx("transition-all duration-200 ease-in-out", selected && "bg-primary", !disabled ? "hover:bg-primary/20 hover:bg-opacity-50" : "bg-gray-200", className), ...props, children: children }));
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/notifications-menu/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAc,MAAM,sBAAsB,CAAC;AAkB7D,MAAM,MAAM,KAAK,GAAG;IAClB,cAAc,EACV,SAAS,CAAC,WAAW,CAAC,eAAe,GACrC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,MAAM,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAC3B,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,eAAe,EAAE,MAAM,CAAC,CACtD,CAAC;IACF,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,CAAC;AACF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,cAAc,EACd,mBAAmB,EACnB,KAAyC,EACzC,oBAAoB,EACpB,QAAQ,GACT,EAAE,KAAK,2CA8UP"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/notifications-menu/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAc,MAAM,sBAAsB,CAAC;AAmB7D,MAAM,MAAM,KAAK,GAAG;IAClB,cAAc,EACV,SAAS,CAAC,WAAW,CAAC,eAAe,GACrC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,MAAM,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAC3B,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,eAAe,EAAE,MAAM,CAAC,CACtD,CAAC;IACF,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,CAAC;AACF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,cAAc,EACd,mBAAmB,EACnB,KAAyC,EACzC,oBAAoB,EACpB,QAAQ,GACT,EAAE,KAAK,2CAuaP"}
@@ -11,12 +11,14 @@ import axios from "axios";
11
11
  import Skeleton from "../skeleton";
12
12
  import * as NotificationLocalStorageUtils from "../../utils/notification-localstorage";
13
13
  const DEFAULT_FETCH_NOTIFICATIONS_LIMIT = 50;
14
+ const ICON_SIZE = "h-5 w-5";
14
15
  const axiosOptions = {
15
16
  headers: {
16
17
  Authorization: `Bearer ${getCookie(CONSTANTS.JWT.JWTCookieKey)}`,
17
18
  },
18
19
  };
19
20
  export default function NotificationMenu({ applicationKey, notificationBaseUrl, limit = DEFAULT_FETCH_NOTIFICATIONS_LIMIT, applicationsBaseUrls, navigate, }) {
21
+ const [closeMenu, setCloseMenu] = useState(true);
20
22
  const [loading, setLoading] = useState(false);
21
23
  const [page, setPage] = useState(1);
22
24
  const [totalCount, setTotalCount] = useState(0);
@@ -111,7 +113,7 @@ export default function NotificationMenu({ applicationKey, notificationBaseUrl,
111
113
  switch (notification.type) {
112
114
  case CONSTANTS.AccountAlertSetting.AlertActions.TaskAssignedToYou: {
113
115
  const task = ((_a = notification.objects) !== null && _a !== void 0 ? _a : {}).task;
114
- icon = (_jsx(Icon, { icon: "fluent-mdl2:assign", className: "h-10 w-10 transform" }));
116
+ icon = _jsx(Icon, { icon: "fluent-mdl2:assign", className: "h-5 w-5 transform" });
115
117
  title = (_jsx("p", { className: "font-semibold line-clamp-2", children: "New task assigned to you" }));
116
118
  description = (_jsxs("p", { className: "text-text text-sm line-clamp-2", children: [_jsx("span", { className: "font-bold", children: task === null || task === void 0 ? void 0 : task.title }), " assigned to you, check it!", " "] }));
117
119
  link = `${applicationsBaseUrls[CONSTANTS.Application.ApplicationKeys.StrategyApplication]}/tasks/${task.id}`;
@@ -119,7 +121,7 @@ export default function NotificationMenu({ applicationKey, notificationBaseUrl,
119
121
  }
120
122
  case CONSTANTS.AccountAlertSetting.AlertActions.TaskUnassignedFromYou: {
121
123
  const task = ((_b = notification.objects) !== null && _b !== void 0 ? _b : {}).task;
122
- icon = (_jsx(Icon, { icon: "fluent-mdl2:assign", className: "h-10 w-10 transform scale-x-[-1]" }));
124
+ icon = (_jsx(Icon, { icon: "fluent-mdl2:assign", className: `${ICON_SIZE} transform scale-x-[-1]` }));
123
125
  title = (_jsx("p", { className: "font-semibold line-clamp-2", children: "Task unassigned from you" }));
124
126
  description = (_jsxs("p", { className: "text-text text-sm line-clamp-2", children: ["Task ", _jsx("span", { className: "font-bold", children: task === null || task === void 0 ? void 0 : task.title }), " unassigned from you, check it!", " "] }));
125
127
  link = `${applicationsBaseUrls[CONSTANTS.Application.ApplicationKeys.StrategyApplication]}/tasks/${task.id}`;
@@ -130,20 +132,58 @@ export default function NotificationMenu({ applicationKey, notificationBaseUrl,
130
132
  .addedBy;
131
133
  const objectName = ((_d = notification.objects) !== null && _d !== void 0 ? _d : {}).objectName;
132
134
  const model = ((_e = notification.objects) !== null && _e !== void 0 ? _e : {}).model;
133
- icon = (_jsx(Icon, { icon: "weui:comment-outlined", className: "h-10 w-10 transform" }));
135
+ icon = (_jsx(Icon, { icon: "weui:comment-outlined", className: `${ICON_SIZE} transform` }));
134
136
  title = _jsx("p", { className: "font-semibold line-clamp-2", children: "New comment" });
135
137
  description = (_jsxs("p", { className: "text-text text-sm line-clamp-2", children: ["A new comment by ", _jsx("span", { className: "font-bold", children: addedBy === null || addedBy === void 0 ? void 0 : addedBy.name }), " ", "on ", _jsx("span", { className: "font-bold", children: objectName }), " ", model] }));
136
138
  switch (model) {
137
- case DTO.Comment.CommentSupportedModels.Project: {
138
- link = `${applicationsBaseUrls[CONSTANTS.Application.ApplicationKeys.StrategyApplication]}/projects/${notification.objects.objectId}?comments=true&commentId=${notification.objects.commentId}`;
139
+ case DTO.Comment.CommentSupportedModels.Goal: {
140
+ link = CONSTANTS.Routes.Strategy.default.detailsPage(applicationsBaseUrls[CONSTANTS.Application.ApplicationKeys.StrategyApplication], notification.objects.objectId, "goals", {
141
+ commentsOpen: true,
142
+ highlightedCommentId: notification.objects.commentId,
143
+ });
144
+ break;
145
+ }
146
+ case DTO.Comment.CommentSupportedModels.Objective: {
147
+ link = CONSTANTS.Routes.Strategy.default.detailsPage(applicationsBaseUrls[CONSTANTS.Application.ApplicationKeys.StrategyApplication], notification.objects.objectId, "objectives", {
148
+ commentsOpen: true,
149
+ highlightedCommentId: notification.objects.commentId,
150
+ });
139
151
  break;
140
152
  }
141
153
  case DTO.Comment.CommentSupportedModels.Initiative: {
142
- link = `${applicationsBaseUrls[CONSTANTS.Application.ApplicationKeys.StrategyApplication]}/initiatives/${notification.objects.objectId}?comments=true&commentId=${notification.objects.commentId}`;
154
+ link = CONSTANTS.Routes.Strategy.default.detailsPage(applicationsBaseUrls[CONSTANTS.Application.ApplicationKeys.StrategyApplication], notification.objects.objectId, "initiatives", {
155
+ commentsOpen: true,
156
+ highlightedCommentId: notification.objects.commentId,
157
+ });
158
+ break;
159
+ }
160
+ case DTO.Comment.CommentSupportedModels.Program: {
161
+ link = CONSTANTS.Routes.Strategy.default.detailsPage(applicationsBaseUrls[CONSTANTS.Application.ApplicationKeys.StrategyApplication], notification.objects.objectId, "programs", {
162
+ commentsOpen: true,
163
+ highlightedCommentId: notification.objects.commentId,
164
+ });
165
+ break;
166
+ }
167
+ case DTO.Comment.CommentSupportedModels.Project: {
168
+ link = CONSTANTS.Routes.Strategy.default.detailsPage(applicationsBaseUrls[CONSTANTS.Application.ApplicationKeys.StrategyApplication], notification.objects.objectId, "projects", {
169
+ commentsOpen: true,
170
+ highlightedCommentId: notification.objects.commentId,
171
+ });
143
172
  break;
144
173
  }
145
174
  case DTO.Comment.CommentSupportedModels.Task: {
146
- link = `${applicationsBaseUrls[CONSTANTS.Application.ApplicationKeys.StrategyApplication]}/tasks/${notification.objects.objectId}?comments=true&commentId=${notification.objects.commentId}`;
175
+ link = CONSTANTS.Routes.Strategy.default.detailsPage(applicationsBaseUrls[CONSTANTS.Application.ApplicationKeys.StrategyApplication], notification.objects.objectId, "tasks", {
176
+ commentsOpen: true,
177
+ highlightedCommentId: notification.objects.commentId,
178
+ taskId: notification.objects.objectId,
179
+ });
180
+ break;
181
+ }
182
+ case DTO.Comment.CommentSupportedModels.Activity: {
183
+ link = CONSTANTS.Routes.Strategy.default.detailsPage(applicationsBaseUrls[CONSTANTS.Application.ApplicationKeys.StrategyApplication], notification.objects.objectId, "activities", {
184
+ commentsOpen: true,
185
+ highlightedCommentId: notification.objects.commentId,
186
+ });
147
187
  break;
148
188
  }
149
189
  default:
@@ -154,15 +194,18 @@ export default function NotificationMenu({ applicationKey, notificationBaseUrl,
154
194
  default:
155
195
  break;
156
196
  }
157
- return (_jsxs("div", { className: clsx("flex items-center gap-1 px-2 py-1 cursor-pointer", {
197
+ return (_jsx("div", { className: clsx("flex items-center gap-1 px-2 py-1 cursor-pointer", {
158
198
  "bg-primary bg-opacity-25": notification.readAt === undefined,
159
199
  }), onClick: () => {
160
200
  markAsRead(notification);
161
201
  if (link && navigate)
162
202
  navigate(link);
163
- }, children: [_jsx("div", { children: icon }), _jsxs("div", { className: "flex-1", children: [_jsx("div", { children: title }), _jsx("div", { children: description }), _jsx("div", { className: "flex justify-end", children: _jsx("p", { className: "text-text text-xs", children: Utils.Moment.formatDateAsLabel(notification.createdAt) }) })] })] }));
203
+ setTimeout(() => {
204
+ setCloseMenu(true);
205
+ }, 200);
206
+ }, children: _jsxs("div", { className: "flex-1 p-2", children: [_jsxs("div", { className: "flex flex-row items-center justify-between ", children: [_jsxs("div", { className: "flex flex-row items-center gap-2", children: [_jsx("div", { className: "font-semibold", children: icon }), " ", _jsxs("span", { className: "text-sm", children: [" ", title] })] }), _jsx("div", { className: "flex justify-end", children: _jsx("p", { className: "text-text text-xs", children: Utils.Moment.formatDateAsLabel(notification.createdAt) }) })] }), _jsx("div", { children: description })] }) }));
164
207
  };
165
- return (_jsx(NativeMenu, { size: "xl", menuButton: _jsxs("div", { className: "relative", children: [_jsx(Icon, { icon: "mingcute:notification-line", className: " hover:text-opacity-50 w-5 h-5 custom-animation" }), unreadCount !== 0 && (_jsx("div", { className: "absolute -top-2 -right-2 w-5 h-5 text-center rounded-full text-white bg-error shadow-md flex items-center justify-center", children: _jsx("p", { className: "text-xs select-none", children: unreadCount }) }))] }), maxHeight: 350, onReachBottom: () => LoadMoreNotifications(), children: _jsxs("div", { className: "flex flex-col gap-5 p-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-1", children: [_jsx("p", { className: "text-xl font-bold", children: "Notifications" }), _jsxs("button", { type: "button", className: "flex items-center gap-1 px-2 text-primary custom-animation hover:text-opacity-75", onClick: () => markAllAsRead(), children: [_jsx("p", { children: "Mare all as read" }), _jsx(Icon, { icon: "solar:check-read-linear", className: "h-5 w-5" })] })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [notifications.map((notification) => (_jsx(NativeMenuItem, { children: renderNotificationItem(notification) }, `notification-${notification.id}`))), loading && (_jsx(_Fragment, { children: Array(3)
208
+ return (_jsx(NativeMenu, { size: "xl", menuButton: _jsxs("div", { className: "relative", children: [_jsx(Icon, { icon: "mingcute:notification-line", className: " hover:text-opacity-50 w-5 h-5 custom-animation" }), unreadCount !== 0 && (_jsx("div", { className: "absolute -top-2 -right-2 w-5 h-5 text-center rounded-full text-white bg-error shadow-md flex items-center justify-center", children: _jsx("p", { className: "text-xs select-none", children: unreadCount }) }))] }), maxHeight: 350, onReachBottom: () => LoadMoreNotifications(), closeMenu: closeMenu, setCloseMenu: setCloseMenu, children: _jsxs("div", { className: "flex flex-col ", children: [_jsxs("div", { className: "flex items-center justify-between gap-1 p-2", children: [_jsx("p", { className: "text-xl font-bold", children: "Notifications" }), _jsxs("button", { type: "button", className: "flex items-center gap-1 px-2 text-primary custom-animation hover:text-opacity-75", onClick: () => markAllAsRead(), children: [_jsx("p", { children: "Mare all as read" }), _jsx(Icon, { icon: "solar:check-read-linear", className: ICON_SIZE })] })] }), _jsxs("div", { className: "flex flex-col ", children: [notifications.map((notification) => (_jsx(NativeMenuItem, { children: renderNotificationItem(notification) }, `notification-${notification.id}`))), loading && (_jsx(_Fragment, { children: Array(3)
166
209
  .fill({})
167
210
  .map((_, i) => (_jsx(Skeleton, { className: "h-24 w-full" }, `notification-loading-${i}`))) }))] }), !loading && notifications.length === 0 && (_jsx("p", { className: "text-text text-center text-xs", children: "There are no more notifications" }))] }) }));
168
211
  }
@@ -1,10 +1,6 @@
1
1
  import React from "react";
2
- export type Props = {
3
- id: string;
4
- name: string;
5
- checked: boolean;
6
- onChange: () => void;
7
- label: React.ReactElement;
8
- } & React.InputHTMLAttributes<HTMLInputElement>;
9
- export default function RadioButton({ id, name, checked, onChange, label, ...props }: Props): import("react/jsx-runtime").JSX.Element;
2
+ export type Props = Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> & {
3
+ label: React.ReactNode;
4
+ };
5
+ export default function RadioButton({ id, name, checked, onChange, label, className, ...props }: Props): import("react/jsx-runtime").JSX.Element;
10
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/radio-button/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC;CAC3B,GAAG,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;AAChD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,EAAE,EACF,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,2CAyBP"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/radio-button/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,MAAM,KAAK,GAAG,IAAI,CACtB,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,MAAM,CACP,GAAG;IACF,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,EAAE,EACF,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,2CA6BP"}
@@ -1,5 +1,6 @@
1
+ "use client";
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import clsx from "clsx";
3
- export default function RadioButton({ id, name, checked, onChange, label, ...props }) {
4
- return (_jsxs("label", { htmlFor: id, className: "flex items-center space-x-2 cursor-pointer", children: [_jsx("input", { ...props, type: "radio", id: id, name: name, checked: checked, onChange: onChange, className: "hidden" }), _jsx("div", { className: clsx("w-5 h-5 rounded-full border-2 flex items-center justify-center", checked ? "bg-primary border-primary" : "bg-white border-gray-300"), children: checked && _jsx("div", { className: "w-3 h-3 rounded-full bg-white" }) }), label] }));
4
+ export default function RadioButton({ id, name, checked, onChange, label, className, ...props }) {
5
+ return (_jsxs("label", { htmlFor: id, className: "flex items-center gap-2 cursor-pointer select-none", children: [_jsx("input", { ...props, id: id, name: name, type: "radio", checked: checked, onChange: onChange, className: "sr-only" }), _jsx("span", { className: clsx("w-5 h-5 rounded-full border-2 flex items-center justify-center transition-colors", checked ? "bg-primary border-primary" : "bg-white border-gray-300", className), children: checked && _jsx("span", { className: "w-2.5 h-2.5 rounded-full bg-white" }) }), _jsx("span", { className: "text-sm", children: label })] }));
5
6
  }
@@ -19,8 +19,9 @@ export type Props<T> = {
19
19
  onRemove?: () => void;
20
20
  searchDebounceTimeout?: number;
21
21
  isRemote?: boolean;
22
+ excludeIds?: string[];
22
23
  usePortal?: boolean;
23
24
  dropdownClassName?: string;
24
25
  };
25
- export default function Select<T>({ name, options, values, setValues, errorMessage, buttonClassName, placeholder, multiselect, disabled, label, isSearchable, required, IconPlaceholderLeft, onChangeSearchInput, onRemove, searchDebounceTimeout, isRemote, usePortal, dropdownClassName, }: Props<T>): import("react/jsx-runtime").JSX.Element;
26
+ export default function Select<T>({ name, options, values, setValues, errorMessage, buttonClassName, placeholder, multiselect, disabled, label, isSearchable, required, IconPlaceholderLeft, onChangeSearchInput, onRemove, searchDebounceTimeout, isRemote, usePortal, dropdownClassName, excludeIds, }: Props<T>): import("react/jsx-runtime").JSX.Element;
26
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/select/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAON,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAGlD,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAE3B,MAAM,EAAE,CAAC,EAAE,CAAC;IACZ,SAAS,EAAE,CAAC,SAAS,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IAEpC,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ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AE,KAAK,CAAC,SAAS,CAAC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAEtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,CAAC,EAAE,EAChC,IAAI,EACJ,OAAO,EACP,MAAM,EACN,SAAS,EACT,YAAY,EACZ,eAAe,EACf,WAAyB,EACzB,WAAmB,EACnB,QAAgB,EAChB,KAAK,EACL,YAAoB,EACpB,QAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,QAAQ,EACR,qBAA2B,EAC3B,QAAgB,EAChB,SAAgB,EAChB,iBAAiB,EACjB,UAAe,GAChB,EAAE,KAAK,CAAC,CAAC,CAAC,2CAsIV"}
@@ -3,7 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { useState, useRef, useEffect, useMemo, } from "react";
4
4
  import { useSelectPortal } from "./useSelectPortal";
5
5
  import SelectView from "./SelectView";
6
- export default function Select({ name, options, values, setValues, errorMessage, buttonClassName, placeholder = "Select...", multiselect = false, disabled = false, label, isSearchable = false, required = false, IconPlaceholderLeft, onChangeSearchInput, onRemove, searchDebounceTimeout = 500, isRemote = false, usePortal = true, dropdownClassName, }) {
6
+ export default function Select({ name, options, values, setValues, errorMessage, buttonClassName, placeholder = "Select...", multiselect = false, disabled = false, label, isSearchable = false, required = false, IconPlaceholderLeft, onChangeSearchInput, onRemove, searchDebounceTimeout = 500, isRemote = false, usePortal = true, dropdownClassName, excludeIds = [], }) {
7
7
  const [isOpen, setIsOpen] = useState(false);
8
8
  const [search, setSearch] = useState("");
9
9
  const [selectedCache, setSelectedCache] = useState([]);
@@ -28,7 +28,7 @@ export default function Select({ name, options, values, setValues, errorMessage,
28
28
  const mergedOptions = useMemo(() => [
29
29
  ...options,
30
30
  ...selectedCache.filter((cached) => !options.some((o) => Object.is(o.value, cached.value))),
31
- ], [options, selectedCache]);
31
+ ].filter((o) => !excludeIds.includes(String(o.value))), [options, selectedCache, excludeIds]);
32
32
  const selectedOptions = useMemo(() => mergedOptions.filter((o) => values.some((v) => Object.is(v, o.value))), [mergedOptions, values]);
33
33
  const filteredOptions = useMemo(() => {
34
34
  if (!isSearchable)
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tab/index.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;IACvB,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAC3E,GAAG,EAAE,CAAC,CAAC;IACP,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI;IACrB,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IAEb,0BAA0B;IAC1B,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IAEnB,sBAAsB;IACtB,MAAM,EAAE,CAAC,CAAC;IAEV,+BAA+B;IAC/B,SAAS,EAAE,CAAC,SAAS,EAAE,CAAC,KAAK,IAAI,CAAC;IAElC,sCAAsC;IACtC,YAAY,CAAC,EAAE,CAAC,O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tB,MAAM,EAAE,CAAC,CAAC;IAEV,+BAA+B;IAC/B,SAAS,EAAE,CAAC,SAAS,EAAE,CAAC,KAAK,IAAI,CAAC;IAElC,sCAAsC;IACtC,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACzD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAEvD,sCAAsC;IACtC,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE;QACpB,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QACnB,MAAM,EAAE,CAAC,CAAC;QACV,SAAS,EAAE,CAAC,SAAS,EAAE,CAAC,KAAK,IAAI,CAAC;QAClC,UAAU,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,CAAC;KACvE,KAAK,KAAK,CAAC,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,EAC5C,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,UAAU,GACX,EAAE,KAAK,CAAC,CAAC,CAAC,2CAmDV"}
@@ -31,7 +31,7 @@ export default function Tab({ name, tabs, tabKey, setTabKey, updateParams, getPa
31
31
  return _jsx(_Fragment, { children: renderTabs({ tabs, tabKey, setTabKey, renderItem }) });
32
32
  }
33
33
  // ✅ Default minimal UI
34
- return (_jsx("div", { className: "flex items-center justify-around gap-1", children: tabs.map((t, i) => (_jsx("button", { disabled: t.isDisabled, className: clsx("pb-1 disabled:text-gray-300", {
34
+ return (_jsx("div", { className: "flex items-center justify-around gap-1", children: tabs.map((t, i) => (_jsx("button", { disabled: t.isDisabled, className: clsx("pb-1 disabled:text-gray-300", "text-xs font-medium", {
35
35
  "border-b-2 border-primary text-primary": tabKey === t.key,
36
36
  "text-gray-500 hover:text-primary/80": tabKey !== t.key,
37
37
  }), onClick: () => setTabKey(t.key), children: renderItem(t, tabKey === t.key) }, `tab-${name}-${t.key}-${i}`))) }));
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export * as FileUtils from "./utils/file";
7
7
  export * as CookieUtils from "./utils/cookie";
8
8
  export * as FirebaseUtils from "./utils/firebase-client";
9
9
  export * as DeviceUtils from "./utils/device";
10
+ export * as Services from "./services";
10
11
  export { default as MustAuth } from "./middleware/must-auth";
11
12
  export { useHasApplicationAccess } from "./hooks/user-has-application-access";
12
13
  export { useHasOneOfPermissions, useHasPermission, } from "./hooks/use-has-permission-access";
@@ -62,7 +63,8 @@ export { default as ItemNouFound, Props as ItemNouFoundProps, } from "./componen
62
63
  export * from "./components/accordion";
63
64
  export { default as NotificationsMenu, Props as NotificationsMenuProps, } from "./components/notifications-menu";
64
65
  export { default as CommentsContainer, Props as CommentsContainerProps, } from "./components/comments-container";
65
- export { default as ActivityMessage } from "./components/activity-message";
66
+ export { default as LogActivitiesContainer, Props as LogActivitiesContainerProps, } from "./components/log-activities-container";
67
+ export { default as Form, Props as FormProps } from "./components/form";
66
68
  export { default as WithAuthorization, Props as WithAuthorizationProps, } from "./HOC/with-authorization";
67
69
  export { default as CanAccessApplication, Props as CanAccessApplicationProps, } from "./HOC/can-access-application";
68
70
  export { default as showConfirm } from "./components/confirm";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AAGzC,OAAO,KAAK,eAAe,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,OAAO,K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,OAAO,IAAI,IAAI,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAExE,OAAO,EACL,OAAO,IAAI,iBAAiB,EAC5B,KAAK,IAAI,sBAAsB,GAChC,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,OAAO,IAAI,oBAAoB,EAC/B,KAAK,IAAI,yBAAyB,GACnC,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,qCAAqC,CAAC"}
package/dist/index.js CHANGED
@@ -9,6 +9,8 @@ export * as FileUtils from "./utils/file";
9
9
  export * as CookieUtils from "./utils/cookie";
10
10
  export * as FirebaseUtils from "./utils/firebase-client";
11
11
  export * as DeviceUtils from "./utils/device";
12
+ // Services
13
+ export * as Services from "./services";
12
14
  // middleware
13
15
  export { default as MustAuth } from "./middleware/must-auth";
14
16
  // hooks
@@ -67,7 +69,8 @@ export { default as ItemNouFound, } from "./components/item-not-found";
67
69
  export * from "./components/accordion";
68
70
  export { default as NotificationsMenu, } from "./components/notifications-menu";
69
71
  export { default as CommentsContainer, } from "./components/comments-container";
70
- export { default as ActivityMessage } from "./components/activity-message";
72
+ export { default as LogActivitiesContainer, } from "./components/log-activities-container";
73
+ export { default as Form } from "./components/form";
71
74
  export { default as WithAuthorization, } from "./HOC/with-authorization";
72
75
  export { default as CanAccessApplication, } from "./HOC/can-access-application";
73
76
  export { default as showConfirm } from "./components/confirm";
@@ -0,0 +1,2 @@
1
+ export * as Remote from "./remote-service";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1 @@
1
+ export * as Remote from "./remote-service";