sea-react-components 1.3.1 → 1.3.3

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 (50) hide show
  1. package/dist/HOC/can-access-application/index.js +1 -1
  2. package/dist/HOC/with-authorization/index.js +1 -1
  3. package/dist/components/activity-message/index.d.ts +7 -0
  4. package/dist/components/activity-message/index.d.ts.map +1 -0
  5. package/dist/components/activity-message/index.js +61 -0
  6. package/dist/components/auto-complete-input/index.js +5 -17
  7. package/dist/components/avatar/index.js +2 -14
  8. package/dist/components/button/index.js +2 -14
  9. package/dist/components/color-picker/index.js +2 -14
  10. package/dist/components/file-input/index.js +22 -20
  11. package/dist/components/input/index.js +2 -14
  12. package/dist/components/list-item/index.js +1 -1
  13. package/dist/components/menu/index.js +2 -14
  14. package/dist/components/menu/menu-item/index.js +2 -14
  15. package/dist/components/modal/index.js +3 -15
  16. package/dist/components/month-calendar/index.js +4 -1
  17. package/dist/components/native-menu/index.d.ts +11 -0
  18. package/dist/components/native-menu/index.d.ts.map +1 -0
  19. package/dist/components/native-menu/index.js +46 -0
  20. package/dist/components/native-menu/native-menu-item/index.d.ts +10 -0
  21. package/dist/components/native-menu/native-menu-item/index.d.ts.map +1 -0
  22. package/dist/components/native-menu/native-menu-item/index.js +6 -0
  23. package/dist/components/not-authorized/index.d.ts.map +1 -1
  24. package/dist/components/not-authorized/index.js +1 -1
  25. package/dist/components/notifications-menu/index.d.ts +10 -0
  26. package/dist/components/notifications-menu/index.d.ts.map +1 -0
  27. package/dist/components/notifications-menu/index.js +145 -0
  28. package/dist/components/paper/index.js +2 -14
  29. package/dist/components/progress-bar/index.js +3 -15
  30. package/dist/components/radio-button/index.js +2 -14
  31. package/dist/components/search-input/index.js +2 -14
  32. package/dist/components/skeleton/index.js +2 -14
  33. package/dist/components/stacked-avatars/index.js +1 -1
  34. package/dist/components/table/index.js +4 -15
  35. package/dist/components/textarea/index.js +2 -14
  36. package/dist/components/tree-checkbox/index.js +16 -5
  37. package/dist/index.d.ts +5 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +6 -0
  40. package/dist/middleware/must-auth/index.d.ts +7 -0
  41. package/dist/middleware/must-auth/index.d.ts.map +1 -0
  42. package/dist/middleware/must-auth/index.js +25 -0
  43. package/dist/tsconfig.tsbuildinfo +1 -1
  44. package/dist/utils/axios/index.d.ts +2 -1
  45. package/dist/utils/axios/index.d.ts.map +1 -1
  46. package/dist/utils/axios/index.js +1 -0
  47. package/dist/utils/validation/index.d.ts +1 -0
  48. package/dist/utils/validation/index.d.ts.map +1 -1
  49. package/dist/utils/validation/index.js +2 -1
  50. package/package.json +2 -2
@@ -6,6 +6,6 @@ export default function CanAccessApplication(WrappedComponent, { applicationKey,
6
6
  const canAccess = hasApplicationAccess(applicationKey);
7
7
  if (!canAccess)
8
8
  return _jsx(_Fragment, { children: fallback });
9
- return _jsx(WrappedComponent, Object.assign({}, props));
9
+ return _jsx(WrappedComponent, { ...props });
10
10
  };
11
11
  }
@@ -6,7 +6,7 @@ export default function WithAuthorization(WrappedComponent, { requiredPermission
6
6
  const isAuthorized = validatePermissions(requiredPermissions, strategy, hasPermission);
7
7
  if (!isAuthorized)
8
8
  return _jsx(_Fragment, { children: fallback });
9
- return _jsx(WrappedComponent, Object.assign({}, props));
9
+ return _jsx(WrappedComponent, { ...props });
10
10
  };
11
11
  }
12
12
  function validatePermissions(requiredPermissions, strategy, hasPermission) {
@@ -0,0 +1,7 @@
1
+ import { DTO } from "sea-platform-helpers";
2
+ type Props = {
3
+ activity: DTO.Activity.IActivity;
4
+ };
5
+ export default function ActivityMessage({ activity }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/activity-message/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAa,GAAG,EAAS,MAAM,sBAAsB,CAAC;AAE7D,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC;CAClC,CAAC;AACF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,2CA6Q1D"}
@@ -0,0 +1,61 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { CONSTANTS, Utils } from "sea-platform-helpers";
4
+ export default function ActivityMessage({ activity }) {
5
+ let message = null;
6
+ switch (activity.type) {
7
+ case CONSTANTS.Activity.ActivityTypes.SystemAction: {
8
+ break;
9
+ }
10
+ case CONSTANTS.Activity.ActivityTypes.NewCommentAdded: {
11
+ const metadata = activity.metadata;
12
+ message = (_jsxs("p", { children: ["New comment added", " ", _jsx("span", { className: "font-semibold", children: metadata.description })] }));
13
+ break;
14
+ }
15
+ case CONSTANTS.Activity.ActivityTypes.CommentGetUpdated: {
16
+ const metadata = activity.metadata;
17
+ 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 })] })] })] }));
18
+ break;
19
+ }
20
+ case CONSTANTS.Activity.ActivityTypes.CommentGetDeleted: {
21
+ const metadata = activity.metadata;
22
+ message = (_jsxs("p", { children: ["Comment delete", " ", _jsx("span", { className: "font-semibold", children: metadata.description })] }));
23
+ break;
24
+ }
25
+ case CONSTANTS.Activity.ActivityTypes.NewProjectCreated: {
26
+ const metadata = activity.metadata;
27
+ message = (_jsxs("p", { children: ["New project created", " ", _jsx("span", { className: "font-semibold", children: metadata.title })] }));
28
+ break;
29
+ }
30
+ case CONSTANTS.Activity.ActivityTypes.ProjectGetUpdated: {
31
+ const metadata = activity.metadata;
32
+ 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: metadata.owner.to.name })] }) })), 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) })] }) }))] })] }));
33
+ break;
34
+ }
35
+ case CONSTANTS.Activity.ActivityTypes.ProjectGetDeleted: {
36
+ const metadata = activity.metadata;
37
+ message = (_jsxs("p", { children: ["Project deleted", " ", _jsx("span", { className: "font-semibold", children: metadata.title })] }));
38
+ break;
39
+ }
40
+ case CONSTANTS.Activity.ActivityTypes.NewTaskCreated: {
41
+ const metadata = activity.metadata;
42
+ message = (_jsxs("p", { children: ["New task created", " ", _jsx("span", { className: "font-semibold", children: metadata.title })] }));
43
+ break;
44
+ }
45
+ case CONSTANTS.Activity.ActivityTypes.TaskGetUpdated: {
46
+ const metadata = activity.metadata;
47
+ 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: metadata.section.to.name })] }) })), metadata.milestone && (_jsx("div", { className: "flex gap-1", children: _jsxs("p", { children: ["Milestone:", " ", _jsx("span", { className: "font-semibold", children: metadata.milestone.to.title })] }) })), metadata.priority && (_jsx("div", { className: "flex gap-1", children: _jsxs("p", { children: ["Priority:", " ", _jsx("span", { className: "font-semibold", children: metadata.priority.to })] }) })), metadata.assignedAccount && (_jsx("div", { className: "flex gap-1", children: _jsxs("p", { children: ["Assigned to:", " ", _jsx("span", { className: "font-semibold", children: metadata.assignedAccount.to.name })] }) })), 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.toString() })] }) }))] })] }));
48
+ break;
49
+ }
50
+ case CONSTANTS.Activity.ActivityTypes.TaskGetDeleted: {
51
+ const metadata = activity.metadata;
52
+ message = (_jsxs("p", { children: ["Task deleted ", _jsx("span", { className: "font-semibold", children: metadata.title })] }));
53
+ break;
54
+ }
55
+ default: {
56
+ message = _jsxs("p", { children: ["Activity type ", activity.type, " is not supported."] });
57
+ break;
58
+ }
59
+ }
60
+ return _jsxs("div", { className: "text-text line-clamp-2 truncate", children: [" ", message, " "] });
61
+ }
@@ -1,25 +1,13 @@
1
1
  "use client";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
3
  import { useState, useRef, useEffect } from "react";
15
4
  import SearchInput from "../search-input";
16
5
  import clsx from "clsx";
17
6
  import Loader from "../loader";
18
- export default function AutoCompleteInput(_a) {
19
- var _b;
20
- var { name, options, selectedOptions = [], setSelectedOptions, onOptionSelect, value, onChange, onDebouncedChange, loading = false, multiselect = true, renderSelectedOptions, renderContainer } = _a, rest = __rest(_a, ["name", "options", "selectedOptions", "setSelectedOptions", "onOptionSelect", "value", "onChange", "onDebouncedChange", "loading", "multiselect", "renderSelectedOptions", "renderContainer"]);
7
+ export default function AutoCompleteInput({ name, options, selectedOptions = [], setSelectedOptions, onOptionSelect, value, onChange, onDebouncedChange, loading = false, multiselect = true, renderSelectedOptions, renderContainer, ...rest }) {
8
+ var _a;
21
9
  const [show, setShow] = useState(false);
22
- const [inputValue, setInputValue] = useState((_b = value === null || value === void 0 ? void 0 : value.toString()) !== null && _b !== void 0 ? _b : "");
10
+ const [inputValue, setInputValue] = useState((_a = value === null || value === void 0 ? void 0 : value.toString()) !== null && _a !== void 0 ? _a : "");
23
11
  const containerRef = useRef(null);
24
12
  useEffect(() => {
25
13
  const handler = (e) => {
@@ -67,13 +55,13 @@ export default function AutoCompleteInput(_a) {
67
55
  var _a;
68
56
  setInputValue((_a = value === null || value === void 0 ? void 0 : value.toString()) !== null && _a !== void 0 ? _a : "");
69
57
  }, [value]);
70
- const input = (_jsx(SearchInput, Object.assign({ name: name, value: inputValue, onFocus: () => setShow(true), onChange: (e) => {
58
+ const input = (_jsx(SearchInput, { name: name, value: inputValue, onFocus: () => setShow(true), onChange: (e) => {
71
59
  setInputValue(e.target.value);
72
60
  onChange === null || onChange === void 0 ? void 0 : onChange(e);
73
61
  }, onDebouncedChange: (val) => {
74
62
  setShow(true);
75
63
  onDebouncedChange === null || onDebouncedChange === void 0 ? void 0 : onDebouncedChange(val);
76
- }, autoComplete: "off" }, rest)));
64
+ }, autoComplete: "off", ...rest }));
77
65
  const dropdown = show && inputValue.trim() !== "" ? (_jsx("div", { className: "absolute z-10 w-full mt-1 bg-white border rounded shadow max-h-60 overflow-y-auto", children: loading ? (_jsx("div", { className: "p-4 flex justify-center items-center", children: _jsx(Loader, {}) })) : filteredOptions.length > 0 ? (filteredOptions.map((o, i) => (_jsx("div", { className: clsx("px-4 py-2 cursor-pointer custom-animation hover:bg-primary hover:bg-opacity-20"), onClick: () => handleSelect(o), children: o.label }, `${name}-option-${i}`)))) : (_jsx("div", { className: "p-4 text-center text-gray-400", children: "No options found" })) })) : null;
78
66
  const selected = selectedOptions.length
79
67
  ? renderSelectedOptions === null || renderSelectedOptions === void 0 ? void 0 : renderSelectedOptions(selectedOptions)
@@ -1,14 +1,3 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
13
2
  import clsx from "clsx";
14
3
  import { PROFILE_PLACEHOLDER_IMAGE } from "../../constants/index";
@@ -27,13 +16,12 @@ const textSizeClasses = {
27
16
  lg: "text-base",
28
17
  xl: "text-base",
29
18
  };
30
- export default function Avatar(_a) {
31
- var { url, alt, size = "md", placeholder = PROFILE_PLACEHOLDER_IMAGE, className, placeholderSource = "image" } = _a, props = __rest(_a, ["url", "alt", "size", "placeholder", "className", "placeholderSource"]);
19
+ export default function Avatar({ url, alt, size = "md", placeholder = PROFILE_PLACEHOLDER_IMAGE, className, placeholderSource = "image", ...props }) {
32
20
  const sizeValue = sizeValues[size];
33
21
  const textClass = textSizeClasses[size];
34
22
  if (!url && placeholderSource === "letters")
35
23
  return (_jsx("div", { style: { width: sizeValue, height: sizeValue }, className: "flex items-center justify-center rounded-full bg-gray-100 border-[1px] border-gray-200", children: _jsxs("p", { className: textClass, children: [" ", Utils.String.getInitials(alt)] }) }));
36
24
  if (!url && placeholderSource === "image")
37
25
  url = url || placeholder;
38
- return (_jsx("img", Object.assign({}, props, { src: url, alt: alt, width: sizeValue, height: sizeValue, className: clsx("object-cover rounded-full border-[1px] border-gray-400", className) })));
26
+ return (_jsx("img", { ...props, src: url, alt: alt, width: sizeValue, height: sizeValue, className: clsx("object-cover rounded-full border-[1px] border-gray-400", className) }));
39
27
  }
@@ -1,18 +1,6 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import { jsx as _jsx } from "react/jsx-runtime";
13
2
  import clsx from "clsx";
14
3
  import { Icon } from "@iconify/react";
15
- export default function Button(_a) {
16
- var { loading = false, disabled, className, children } = _a, props = __rest(_a, ["loading", "disabled", "className", "children"]);
17
- return (_jsx("button", Object.assign({ className: clsx("px-2 py-1 rounded-lg disabled:bg-gray-200 text-white transition-all duration-300 ease-in-out flex items-center justify-center", !loading && !disabled && "hover:bg-opacity-70", className ? className : "bg-primary", disabled && "bg-gray-300"), disabled: disabled }, props, { children: loading ? (_jsx(Icon, { icon: "line-md:loading-loop", className: "w-6 h-6" })) : (children) })));
4
+ export default function Button({ loading = false, disabled, className, children, ...props }) {
5
+ return (_jsx("button", { className: clsx("px-2 py-1 rounded-lg disabled:bg-gray-200 text-white transition-all duration-300 ease-in-out flex items-center justify-center", !loading && !disabled && "hover:bg-opacity-70", className ? className : "bg-primary", disabled && "bg-gray-300"), disabled: disabled, ...props, children: loading ? (_jsx(Icon, { icon: "line-md:loading-loop", className: "w-6 h-6" })) : (children) }));
18
6
  }
@@ -1,22 +1,10 @@
1
1
  "use client";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
3
  import { isColorLight } from "../../utils/color";
15
- export default function ColorPicker(_a) {
16
- var { color, setColor, showDisplay = true, className = "", style } = _a, props = __rest(_a, ["color", "setColor", "showDisplay", "className", "style"]);
4
+ export default function ColorPicker({ color, setColor, showDisplay = true, className = "", style, ...props }) {
17
5
  return (_jsxs("label", { className: `relative inline-block overflow-hidden ${className}`, style: style, children: [showDisplay && (_jsx("div", { className: "w-full h-full flex items-center justify-center", style: {
18
6
  backgroundColor: color,
19
7
  color: isColorLight(color) ? "#000000" : "#FFFFFF",
20
8
  borderRadius: "inherit",
21
- }, children: _jsx("p", { className: "text-xs", children: color }) })), _jsx("input", Object.assign({ type: "color", className: "absolute inset-0 w-full h-full opacity-0 appearance-none cursor-pointer", value: color, onChange: (e) => setColor(e.target.value) }, props))] }));
9
+ }, children: _jsx("p", { className: "text-xs", children: color }) })), _jsx("input", { type: "color", className: "absolute inset-0 w-full h-full opacity-0 appearance-none cursor-pointer", value: color, onChange: (e) => setColor(e.target.value), ...props })] }));
22
10
  }
@@ -1,13 +1,4 @@
1
1
  "use client";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
12
3
  import { useEffect, useRef, useState } from "react";
13
4
  export var AcceptedTypes;
@@ -49,39 +40,50 @@ export default function FileInput({ name, acceptedTypes = [], initialFiles = [],
49
40
  setFiles((prev) => [...prev, ...newFiles]);
50
41
  newFiles.forEach(handleUploadFile);
51
42
  };
52
- const handleUploadFile = (file) => __awaiter(this, void 0, void 0, function* () {
53
- setFiles((prev) => prev.map((f) => f.id === file.id ? Object.assign(Object.assign({}, f), { status: UploadStatuses.Uploading }) : f));
43
+ const handleUploadFile = async (file) => {
44
+ setFiles((prev) => prev.map((f) => f.id === file.id ? { ...f, status: UploadStatuses.Uploading } : f));
54
45
  try {
55
- const result = yield onUpload(file);
46
+ const result = await onUpload(file);
56
47
  onUploadSuccess === null || onUploadSuccess === void 0 ? void 0 : onUploadSuccess(result); // This allows parent to set `iconFileId`
57
48
  // For single-file mode: remove old uploaded file if any
58
49
  if (!multiple) {
59
- const uploadedFile = Object.assign(Object.assign({}, file), { serverId: result.id, status: UploadStatuses.Uploaded, progress: 100 });
50
+ const uploadedFile = {
51
+ ...file,
52
+ serverId: result.id,
53
+ status: UploadStatuses.Uploaded,
54
+ progress: 100,
55
+ };
60
56
  const oldUploaded = files.find((f) => f.status === UploadStatuses.Uploaded);
61
57
  // Delete old uploaded file
62
58
  if (oldUploaded && oldUploaded.serverId) {
63
- yield onDelete(oldUploaded);
59
+ await onDelete(oldUploaded);
64
60
  onDeleteSuccess === null || onDeleteSuccess === void 0 ? void 0 : onDeleteSuccess(oldUploaded);
65
61
  }
66
62
  setFiles([uploadedFile]); // Keep only the new one
67
63
  }
68
64
  else {
69
65
  setFiles((prev) => prev.map((f) => f.id === file.id
70
- ? Object.assign(Object.assign({}, f), { serverId: result.id, status: UploadStatuses.Uploaded, progress: 100 }) : f));
66
+ ? {
67
+ ...f,
68
+ serverId: result.id,
69
+ status: UploadStatuses.Uploaded,
70
+ progress: 100,
71
+ }
72
+ : f));
71
73
  }
72
74
  }
73
75
  catch (_a) {
74
- setFiles((prev) => prev.map((f) => f.id === file.id ? Object.assign(Object.assign({}, f), { status: UploadStatuses.Failed }) : f));
76
+ setFiles((prev) => prev.map((f) => f.id === file.id ? { ...f, status: UploadStatuses.Failed } : f));
75
77
  }
76
- });
77
- const handleDeleteFile = (file) => __awaiter(this, void 0, void 0, function* () {
78
+ };
79
+ const handleDeleteFile = async (file) => {
78
80
  try {
79
- const result = yield onDelete(file);
81
+ const result = await onDelete(file);
80
82
  onDeleteSuccess === null || onDeleteSuccess === void 0 ? void 0 : onDeleteSuccess(result);
81
83
  setFiles((prev) => prev.filter((f) => f.serverId !== result.id));
82
84
  }
83
85
  catch (_a) { }
84
- });
86
+ };
85
87
  useEffect(() => {
86
88
  if (initialFiles && initialFiles.length > 0) {
87
89
  setFiles(initialFiles);
@@ -1,21 +1,9 @@
1
1
  "use client";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
3
  import { Icon } from "@iconify/react";
15
4
  import clsx from "clsx";
16
5
  import { useState } from "react";
17
- export default function Input(_a) {
18
- var { errorMessage, className, start = null, end = null, ref, type } = _a, props = __rest(_a, ["errorMessage", "className", "start", "end", "ref", "type"]);
6
+ export default function Input({ errorMessage, className, start = null, end = null, ref, type, ...props }) {
19
7
  const [isFocused, setIsFocused] = useState(false);
20
8
  const [currentType, setCurrentType] = useState(type);
21
9
  if (type === "password") {
@@ -29,5 +17,5 @@ export default function Input(_a) {
29
17
  ? "border-error"
30
18
  : isFocused
31
19
  ? "border-primary"
32
- : "border-gray-200"), children: [start, _jsx("input", Object.assign({ ref: ref, type: currentType, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), className: clsx("outline-none text-text flex-1", className) }, props)), end] }), errorMessage && (_jsx("p", { className: "pl-1 text-sm text-error", children: errorMessage }))] }));
20
+ : "border-gray-200"), children: [start, _jsx("input", { ref: ref, type: currentType, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), className: clsx("outline-none text-text flex-1", className), ...props }), end] }), errorMessage && (_jsx("p", { className: "pl-1 text-sm text-error", children: errorMessage }))] }));
33
21
  }
@@ -19,5 +19,5 @@ export default function ListItem({ title, name, filters = [], totalPages, query,
19
19
  : "justify-end"), children: [showFiltersRow && (_jsxs("div", { className: "flex items-end gap-2 flex-wrap", children: [_jsx(SearchInput, { placeholder: `search about ${name}`, value: query, onDebouncedChange: setQuery, QueryDebouncedTime: QueryDebouncedTime }), filters.map((f, i) => (_jsxs("div", { className: "flex flex-col gap-1", children: [f.label && (_jsx("p", { className: "text-text font-semibold", children: f.label })), _jsx(Select, { name: `table-${name}-filter-${f.label}-${i}`, values: [f.value], setValues: (newValues) => f.setValue(newValues[0]), options: [
20
20
  { label: "All", value: DEFAULT_FILTER_VALUE },
21
21
  ...f.options,
22
- ], placeholder: f.label })] }, `table-${name}-filter-${f.label}-${i}`)))] })), bulkActionFeature && (_jsx("div", { className: "flex items-center gap-2 justify-end w-full md:w-fit", children: bulkActionFeature.bulkActions.map((a, i) => (_jsx(Button, Object.assign({}, a, { disabled: bulkActionFeature.selectedRowIds.length === 0 }), `table-${name}-bulk-action-${i}`))) }))] }), _jsx("div", { className: "overflow-x-auto", children: loading ? (_jsx("div", { className: "flex items-center justify-center", children: _jsx(Loader, {}) })) : (_jsx(_Fragment, { children: children })) }), showPaginationRow && (_jsxs("div", { className: "flex items-center justify-end gap-5", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("p", { className: "text-text text-sm", children: "Rows per page" }), _jsx(Select, { name: `${name}-select`, values: [rowsPerPage], setValues: (newValues) => setRowsPerPage(newValues[0]), options: rowsPerPageOptions })] }), totalPages >= 1 && (_jsx(Pagination, { name: name, page: page, setPage: setPage, totalPages: totalPages }))] }))] }));
22
+ ], placeholder: f.label })] }, `table-${name}-filter-${f.label}-${i}`)))] })), bulkActionFeature && (_jsx("div", { className: "flex items-center gap-2 justify-end w-full md:w-fit", children: bulkActionFeature.bulkActions.map((a, i) => (_jsx(Button, { ...a, disabled: bulkActionFeature.selectedRowIds.length === 0 }, `table-${name}-bulk-action-${i}`))) }))] }), _jsx("div", { className: "overflow-x-auto", children: loading ? (_jsx("div", { className: "flex items-center justify-center", children: _jsx(Loader, {}) })) : (_jsx(_Fragment, { children: children })) }), showPaginationRow && (_jsxs("div", { className: "flex items-center justify-end gap-5", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("p", { className: "text-text text-sm", children: "Rows per page" }), _jsx(Select, { name: `${name}-select`, values: [rowsPerPage], setValues: (newValues) => setRowsPerPage(newValues[0]), options: rowsPerPageOptions })] }), totalPages >= 1 && (_jsx(Pagination, { name: name, page: page, setPage: setPage, totalPages: totalPages }))] }))] }));
23
23
  }
@@ -1,19 +1,7 @@
1
1
  "use client";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  import { jsx as _jsx } from "react/jsx-runtime";
14
3
  import { Menu as SMenu, MenuButton } from "@szhsin/react-menu";
15
4
  import clsx from "clsx";
16
- export default function Menu(_a) {
17
- var { menuButton, children, className } = _a, props = __rest(_a, ["menuButton", "children", "className"]);
18
- return (_jsx(SMenu, Object.assign({ menuButton: _jsx(MenuButton, { children: menuButton }) }, props, { children: _jsx("div", { className: clsx("bg-white rounded-xl shadow-lg", className), children: children }) })));
5
+ export default function Menu({ menuButton, children, className, ...props }) {
6
+ return (_jsx(SMenu, { menuButton: _jsx(MenuButton, { children: menuButton }), ...props, children: _jsx("div", { className: clsx("bg-white rounded-xl shadow-lg", className), children: children }) }));
19
7
  }
@@ -1,19 +1,7 @@
1
1
  "use client";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  import { jsx as _jsx } from "react/jsx-runtime";
14
3
  import clsx from "clsx";
15
4
  import { MenuItem as SMenuItem } from "@szhsin/react-menu";
16
- export default function MenuItem(_a) {
17
- var { children, className, selected = false, disabled = false } = _a, props = __rest(_a, ["children", "className", "selected", "disabled"]);
18
- return (_jsx("div", Object.assign({ 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: _jsx(SMenuItem, { disabled: disabled, children: children }) })));
5
+ export default function MenuItem({ children, className, selected = false, disabled = false, ...props }) {
6
+ 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: _jsx(SMenuItem, { disabled: disabled, children: children }) }));
19
7
  }
@@ -1,14 +1,3 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
2
  import { Icon } from "@iconify/react";
14
3
  import clsx from "clsx";
@@ -29,15 +18,14 @@ const positionClasses = {
29
18
  left: "top-1/2 left-5 transform -translate-y-1/2",
30
19
  right: "top-1/2 right-5 transform -translate-y-1/2",
31
20
  };
32
- export default function Modal(_a) {
33
- var { isOpen, onClose, children, position = "center", size = "md", overlayPercentage = 50, className, onClick } = _a, props = __rest(_a, ["isOpen", "onClose", "children", "position", "size", "overlayPercentage", "className", "onClick"]);
21
+ export default function Modal({ isOpen, onClose, children, position = "center", size = "md", overlayPercentage = 50, className, onClick, ...props }) {
34
22
  if (!isOpen)
35
23
  return null;
36
24
  return (_jsx("div", { className: "fixed inset-0 bg-black z-50 overflow-auto animate-fade-in", style: {
37
25
  backgroundColor: `rgba(0,0,0,0.${overlayPercentage})`,
38
- }, onClick: onClose, children: _jsxs("div", Object.assign({ className: clsx("absolute bg-white rounded-lg shadow-lg p-6 max-h-[90vh] overflow-y-auto ", sizeClasses[size], positionClasses[position], className), onClick: (e) => {
26
+ }, onClick: onClose, children: _jsxs("div", { className: clsx("absolute bg-white rounded-lg shadow-lg p-6 max-h-[90vh] overflow-y-auto ", sizeClasses[size], positionClasses[position], className), onClick: (e) => {
39
27
  e.stopPropagation(); // Prevent closing when clicking inside the modal
40
28
  if (onClick)
41
29
  onClick(e);
42
- } }, props, { children: [_jsx("button", { onClick: onClose, className: "absolute top-2 right-2 text-primary", children: _jsx(Icon, { icon: "line-md:close-small", className: "h-5 w-5 hover:scale-110 transition-all duration-300 ease-in-out" }) }), children] })) }));
30
+ }, ...props, children: [_jsx("button", { onClick: onClose, className: "absolute top-2 right-2 text-primary", children: _jsx(Icon, { icon: "line-md:close-small", className: "h-5 w-5 hover:scale-110 transition-all duration-300 ease-in-out" }) }), children] }) }));
43
31
  }
@@ -52,6 +52,9 @@ export default function MonthCalendar({ month, events, EventItem, loading, optio
52
52
  const expanded = expandStatus[day] === true;
53
53
  return (_jsxs("div", { className: "flex flex-col gap-3 border-[1px] border-gray-200 p-1", children: [_jsx("p", { className: "text-left text-primary font-semibold", children: dayItem.date() }), _jsx("div", { className: "flex flex-col gap-1", children: loading ? (_jsx(_Fragment, { children: Array(Utils.Number.getRandomInt(0, 2))
54
54
  .fill({})
55
- .map((_, j) => (_jsx(Skeleton, { className: "w-full h-20" }, `${day}-(${j})`))) })) : (_jsxs(_Fragment, { children: [" ", (expanded ? dayEvents : dayEventsSlice).map((e, j) => (_jsx(EventItem, { event: e }, `${i}-${j}`))), moreCounts > 0 && !expanded && (_jsxs("button", { onClick: () => setExpandStatus((prev) => (Object.assign(Object.assign({}, prev), { [day]: true }))), className: "text-left text-sm text-primary hover:text-opacity-70", children: ["+", moreCounts, " more"] }))] })) })] }, i));
55
+ .map((_, j) => (_jsx(Skeleton, { className: "w-full h-20" }, `${day}-(${j})`))) })) : (_jsxs(_Fragment, { children: [" ", (expanded ? dayEvents : dayEventsSlice).map((e, j) => (_jsx(EventItem, { event: e }, `${i}-${j}`))), moreCounts > 0 && !expanded && (_jsxs("button", { onClick: () => setExpandStatus((prev) => ({
56
+ ...prev,
57
+ [day]: true,
58
+ })), className: "text-left text-sm text-primary hover:text-opacity-70", children: ["+", moreCounts, " more"] }))] })) })] }, i));
56
59
  }) }, currentMonth.format("YYYY-MM"))] }));
57
60
  }
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ export type MenuSize = "sm" | "md" | "lg" | "xl";
3
+ export type Props = {
4
+ menuButton: React.ReactNode;
5
+ children: React.ReactNode;
6
+ size?: MenuSize;
7
+ maxHeight?: number;
8
+ onReachBottom?: () => void;
9
+ } & React.HTMLAttributes<HTMLDivElement>;
10
+ export default function NativeMenu({ menuButton, children, className, size, maxHeight, onReachBottom, ...props }: Props): import("react/jsx-runtime").JSX.Element;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,46 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useEffect, useRef, useState } from "react";
4
+ import clsx from "clsx";
5
+ const sizeClasses = {
6
+ sm: "w-52",
7
+ md: "w-72",
8
+ lg: "w-80",
9
+ xl: "w-96",
10
+ };
11
+ export default function NativeMenu({ menuButton, children, className, size = "md", maxHeight = 200, onReachBottom, ...props }) {
12
+ const [open, setOpen] = useState(false);
13
+ const menuRef = useRef(null);
14
+ const scrollRef = useRef(null);
15
+ // Close menu on outside click
16
+ useEffect(() => {
17
+ const handleClickOutside = (event) => {
18
+ if (menuRef.current && !menuRef.current.contains(event.target)) {
19
+ setOpen(false);
20
+ }
21
+ };
22
+ document.addEventListener("mousedown", handleClickOutside);
23
+ return () => document.removeEventListener("mousedown", handleClickOutside);
24
+ }, []);
25
+ const checkBottom = () => {
26
+ const target = scrollRef.current;
27
+ if (!target)
28
+ return false;
29
+ return target.scrollHeight - target.scrollTop <= target.clientHeight + 1;
30
+ };
31
+ const handleScroll = (e) => {
32
+ if (checkBottom() && onReachBottom) {
33
+ onReachBottom();
34
+ }
35
+ };
36
+ // Trigger onReachBottom when menu opens if already at bottom
37
+ useEffect(() => {
38
+ if (open && onReachBottom && checkBottom()) {
39
+ onReachBottom();
40
+ }
41
+ }, [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: {
43
+ maxHeight: maxHeight,
44
+ overflowY: "auto",
45
+ }, children: _jsx("div", { className: "py-1", children: children }) }))] }));
46
+ }
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ export type Props = {
3
+ key: string;
4
+ children: React.ReactNode;
5
+ className?: string | undefined;
6
+ selected?: boolean;
7
+ disabled?: boolean;
8
+ } & React.HTMLAttributes<HTMLDivElement>;
9
+ export default function NativeMenuItem({ children, className, selected, disabled, ...props }: Props): import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/native-menu/native-menu-item/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,MAAM,KAAK,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AACzC,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,QAAQ,EACR,SAAS,EACT,QAAgB,EAChB,QAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,2CAcP"}
@@ -0,0 +1,6 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import clsx from "clsx";
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 }));
6
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/not-authorized/index.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,aAAa,4CAWpC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/not-authorized/index.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,aAAa,4CA6CpC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import Icon from "../icon";
3
3
  export default function NotAuthorized() {
4
- return (_jsxs("div", { className: "flex flex-col items-center justify-center gap-10", children: [_jsx(Icon, { icon: "fluent-mdl2:protect-restrict", className: "text-warning text-opacity-80 h-56 w-56" }), _jsx("h3", { className: "text-warning text-4xl font-bold", children: "Not Authorized!" })] }));
4
+ return (_jsxs("div", { className: "flex flex-col items-center justify-center min-h-screen px-6 text-center space-y-10", children: [_jsx(Icon, { icon: "fluent-mdl2:protect-restrict", className: "text-warning text-opacity-80 h-48 w-48 md:h-56 md:w-56" }), _jsxs("div", { className: "max-w-xl space-y-4", children: [_jsx("h1", { className: "text-3xl md:text-4xl font-bold text-warning", children: "Not Authorized" }), _jsxs("p", { className: "text-base text-text md:text-lg text-muted-foreground", children: ["You don\u2019t have the necessary permissions to access this page. ", _jsx("br", {}), "Please contact your administrator if you believe this is a mistake."] })] }), _jsx("p", { className: "text-sm md:text-base text-muted-foreground", children: "\u2014 or \u2014" }), _jsxs("div", { className: "flex flex-wrap justify-center gap-4", children: [_jsxs("button", { type: "button", onClick: () => window.history.back(), className: "flex items-center gap-2 rounded-xl bg-primary px-5 py-2.5 text-white text-sm md:text-base font-medium shadow hover:bg-primary/90 transition", children: [_jsx(Icon, { icon: "material-symbols:arrow-back-rounded" }), "Go Back"] }), _jsxs("button", { type: "button", onClick: () => (window.location.href = "/force-logout"), className: "flex items-center gap-2 rounded-xl bg-error px-5 py-2.5 text-white text-sm md:text-base font-medium shadow hover:bg-error/90 transition", children: [_jsx(Icon, { icon: "material-symbols:logout-rounded" }), "Logout"] })] })] }));
5
5
  }
@@ -0,0 +1,10 @@
1
+ import { CONSTANTS } from "sea-platform-helpers";
2
+ export type Props = {
3
+ applicationKey: CONSTANTS.Application.ApplicationKeys | CONSTANTS.Global.AllType;
4
+ limit?: number;
5
+ notificationBaseUrl: string;
6
+ applicationsBaseUrls: Partial<Record<CONSTANTS.Application.ApplicationKeys, string>>;
7
+ navigate?: (to: string) => void;
8
+ };
9
+ export default function NotificationMenu({ applicationKey, notificationBaseUrl, limit, applicationsBaseUrls, navigate, }: Props): import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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;AAmB7D,MAAM,MAAM,KAAK,GAAG;IAClB,cAAc,EACV,SAAS,CAAC,WAAW,CAAC,eAAe,GACrC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;IAQ7B,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,EAEnB,KAAyC,EACzC,oBAAoB,EACpB,QAAQ,GACT,EAAE,KAAK,2CAqSP"}