sea-react-components 1.3.26 → 1.3.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/button/index.d.ts.map +1 -1
- package/dist/components/button/index.js +4 -5
- package/dist/components/confirm/index.js +1 -1
- package/dist/components/drawer/index.d.ts.map +1 -1
- package/dist/components/drawer/index.js +5 -5
- package/dist/components/list-item/index.d.ts +6 -1
- package/dist/components/list-item/index.d.ts.map +1 -1
- package/dist/components/list-item/index.js +5 -2
- package/dist/components/searchable-select/index.d.ts +7 -2
- package/dist/components/searchable-select/index.d.ts.map +1 -1
- package/dist/components/searchable-select/index.js +93 -17
- package/dist/hooks/use-translation/index.d.ts +562 -0
- package/dist/hooks/use-translation/index.d.ts.map +1 -0
- package/dist/hooks/use-translation/index.js +68 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/axios/index.js +5 -5
- package/package.json +2 -2
|
@@ -4,5 +4,5 @@ import clsx from "clsx";
|
|
|
4
4
|
import React from "react";
|
|
5
5
|
export default function Breadcrumb({ name, children }) {
|
|
6
6
|
const items = React.Children.toArray(children); // Convert children to an array
|
|
7
|
-
return (_jsx("div", { className: "flex items-center gap-3", children: items.map((item, i) => (_jsxs("div", { className: clsx("flex items-center gap-3", i === items.length - 1 && "text-primary"), children: [_jsx("div", { children: item }), i < items.length - 1 && (_jsx(Icon, { icon: "ooui:next-ltr", className: "text-text" }))] }, `${name}-breadcrumb-${i}`))) }));
|
|
7
|
+
return (_jsx("div", { className: "flex items-center gap-3", children: items.map((item, i) => (_jsxs("div", { className: clsx("flex items-center gap-3", i === items.length - 1 && "text-primary"), children: [_jsx("div", { children: item }), i < items.length - 1 && (_jsx(Icon, { icon: "ooui:next-ltr", className: "text-text rtl:rotate-180" }))] }, `${name}-breadcrumb-${i}`))) }));
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
type variants = "primary" | "secondary" | "danger" | "warning" | "success"
|
|
2
|
+
type variants = "primary" | "secondary" | "danger" | "warning" | "success";
|
|
3
3
|
export type Props = {
|
|
4
|
-
variant?: variants;
|
|
4
|
+
variant?: variants | "other";
|
|
5
5
|
loading?: boolean;
|
|
6
6
|
} & React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
7
7
|
export default function Button({ loading, disabled, className, children, variant, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,KAAK,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAU3E,MAAM,MAAM,KAAK,GAAG;IAClB,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAClD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,OAAe,EACf,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,2CAmBP"}
|
|
@@ -4,12 +4,11 @@ import { Icon } from "@iconify/react";
|
|
|
4
4
|
const classes = {
|
|
5
5
|
primary: "bg-primary disabled:bg-gray-200 text-white hover:bg-opacity-70",
|
|
6
6
|
secondary: "disabled:bg-gray-200 border-gray-200 text-black bg-transparent border hover:bg-primary/5 hover:text-primary",
|
|
7
|
-
danger: "bg-red-500 text-white",
|
|
8
|
-
warning: "bg-warning",
|
|
9
|
-
success: "bg-success",
|
|
10
|
-
other: "",
|
|
7
|
+
danger: "disabled:bg-gray-200 bg-red-500 text-white hover:bg-opacity-70",
|
|
8
|
+
warning: "disabled:bg-gray-200 bg-warning text-white hover:bg-opacity-70",
|
|
9
|
+
success: "disabled:bg-gray-200 bg-success text-white hover:bg-opacity-70",
|
|
11
10
|
};
|
|
12
11
|
export default function Button({ loading = false, disabled, className, children, variant = "primary", ...props }) {
|
|
13
12
|
const classVariants = variant != "other" ? classes[variant] || classes["primary"] : className;
|
|
14
|
-
return (_jsx("button", { className: clsx("flex px-4 py-2 rounded-lg gap-1 items-center justify-center custom-animation", classVariants), disabled: disabled, ...props, children: loading ? (_jsx(Icon, { icon: "line-md:loading-loop", className: "w-6 h-6" })) : (children) }));
|
|
13
|
+
return (_jsx("button", { className: clsx("flex px-2 md:px-4 py-2 rounded-lg gap-1 items-center justify-center custom-animation", classVariants), disabled: disabled, ...props, children: loading ? (_jsx(Icon, { icon: "line-md:loading-loop", className: "w-6 h-6" })) : (children) }));
|
|
15
14
|
}
|
|
@@ -14,7 +14,7 @@ const ConfirmModal = ({ options, onClose, }) => {
|
|
|
14
14
|
setShow(false);
|
|
15
15
|
setTimeout(() => onClose(result), 200);
|
|
16
16
|
};
|
|
17
|
-
return (_jsx("div", { className: `fixed inset-0 z-[9999] flex items-center justify-center bg-black/40 transition-opacity duration-200 ${show ? "opacity-100" : "opacity-0"}`, children: _jsxs("div", { className: `bg-white rounded-xl shadow-lg w-[90%] max-w-sm p-5 transform transition-all duration-200 ${show ? "scale-100" : "scale-95"}`, children: [options.title && (_jsx("h2", { className: "text-lg font-semibold mb-2", children: options.title })), _jsx("p", { className: "text-gray-700 mb-4", children: options.message }), _jsxs("div", { className: "flex justify-end gap-2", children: [_jsx(Button, { onClick: () => handleClose(false), variant: "secondary", children: options.cancelText || "Cancel" }), _jsx(Button, { onClick: () => handleClose(true), children: options.confirmText || "Confirm" })] })] }) }));
|
|
17
|
+
return (_jsx("div", { className: `fixed inset-0 z-[9999] flex items-center justify-center bg-black/40 transition-opacity duration-200 ${show ? "opacity-100" : "opacity-0"}`, children: _jsxs("div", { className: `bg-white rounded-xl shadow-lg w-[90%] max-w-sm p-5 transform transition-all duration-200 ${show ? "scale-100" : "scale-95"}`, children: [options.title && (_jsx("h2", { className: "text-lg font-semibold mb-2", children: options.title })), _jsx("p", { className: "text-gray-700 mb-4", children: options.message }), _jsxs("div", { className: "flex justify-end gap-2", children: [_jsx(Button, { onClick: () => handleClose(false), variant: "secondary", children: options.cancelText || "Cancel" }), _jsx(Button, { variant: "danger", onClick: () => handleClose(true), children: options.confirmText || "Confirm" })] })] }) }));
|
|
18
18
|
};
|
|
19
19
|
let isOpen = true;
|
|
20
20
|
export default function showConfirm(messageOrOptions) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC5D,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnD,MAAM,MAAM,KAAK,GAAG;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AASF,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,MAAM,EACN,OAAO,EACP,SAAmB,EACnB,OAAc,EACd,SAAS,EACT,QAAQ,EACR,IAAW,GACZ,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC5D,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnD,MAAM,MAAM,KAAK,GAAG;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AASF,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,MAAM,EACN,OAAO,EACP,SAAmB,EACnB,OAAc,EACd,SAAS,EACT,QAAQ,EACR,IAAW,GACZ,EAAE,KAAK,2CAsDP"}
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { Icon } from "@iconify/react";
|
|
4
4
|
const sizeClass = {
|
|
5
|
-
sm: "w-[
|
|
6
|
-
md: "
|
|
7
|
-
lg: "
|
|
8
|
-
xl: "
|
|
5
|
+
sm: "w-[100%] md:w-[320px]",
|
|
6
|
+
md: "w-[100%] sm:w-[400px] ",
|
|
7
|
+
lg: "w-[100%] md:w-[528px]",
|
|
8
|
+
xl: "w-[100%] md:w-[736px]",
|
|
9
9
|
};
|
|
10
10
|
export default function Drawer({ isOpen, onClose, placement = "right", overlay = true, className, children, size = "md", // NEW
|
|
11
11
|
}) {
|
|
@@ -20,5 +20,5 @@ export default function Drawer({ isOpen, onClose, placement = "right", overlay =
|
|
|
20
20
|
"top-0 left-0 max-h-screen h-full translate-x-0": placement === "left" && isOpen,
|
|
21
21
|
"bottom-0 left-0 w-full h-auto transform translate-y-full": placement === "bottom" && !isOpen,
|
|
22
22
|
"bottom-0 left-0 w-full h-auto translate-y-0": placement === "bottom" && isOpen,
|
|
23
|
-
}, widthClass, className), children: [_jsx("button", { onClick: onClose, className: "absolute top-2 right-2
|
|
23
|
+
}, widthClass, className), children: [_jsx("button", { onClick: onClose, className: "absolute top-2 right-2", children: _jsx(Icon, { icon: "line-md:close-small", className: "h-6 w-6 hover:scale-110 transition-all duration-300 ease-in-out" }) }), children] })] }));
|
|
24
24
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SelectOption } from "../select";
|
|
3
3
|
import { BulkActionFeature, Filter } from "../../hooks/list-items-hook/types";
|
|
4
|
+
declare const DEFAULT_LOCALIZATIONS: {
|
|
5
|
+
"rows-per-page": string;
|
|
6
|
+
};
|
|
4
7
|
export type Props<K> = {
|
|
5
8
|
title?: string;
|
|
6
9
|
name: string;
|
|
@@ -23,6 +26,8 @@ export type Props<K> = {
|
|
|
23
26
|
children?: React.ReactNode;
|
|
24
27
|
headerComponent?: React.ReactNode;
|
|
25
28
|
itemName?: string;
|
|
29
|
+
localization?: Record<keyof typeof DEFAULT_LOCALIZATIONS, string>;
|
|
26
30
|
};
|
|
27
|
-
export default function ListItem<K>({ title, name, filters, totalPages, query, setQuery, page, setPage, rowsPerPage, setRowsPerPage, updateParams, getParam, rowsPerPageOptions, QueryDebouncedTime, bulkActionFeature, loading, showPaginationRow, showFiltersRow, headerComponent, children, itemName, }: Props<K>): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export default function ListItem<K>({ title, name, filters, totalPages, query, setQuery, page, setPage, rowsPerPage, setRowsPerPage, updateParams, getParam, rowsPerPageOptions, QueryDebouncedTime, bulkActionFeature, loading, showPaginationRow, showFiltersRow, headerComponent, children, itemName, localization, }: Props<K>): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export {};
|
|
28
33
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/list-item/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAe,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAKjD,OAAO,EACL,iBAAiB,EACjB,MAAM,EAEP,MAAM,mCAAmC,CAAC;AAM3C,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,kBAAkB,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;IAC3C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,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;IACvD,iBAAiB,CAAC,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AC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvD,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,OAAO,qBAAqB,EAAE,MAAM,CAAC,CAAC;CACnE,CAAC;AACF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,CAAC,EAAE,EAClC,KAAK,EACL,IAAI,EACJ,OAAY,EACZ,UAAU,EACV,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,WAAW,EACX,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,kBAAwB,EACxB,iBAA6B,EAC7B,OAAe,EACf,iBAAwB,EACxB,cAAqB,EACrB,eAAe,EACf,QAAQ,EACR,QAAiB,EACjB,YAAoC,GACrC,EAAE,KAAK,CAAC,CAAC,CAAC,2CAkHV"}
|
|
@@ -10,7 +10,10 @@ import { useFilters } from "../..//hooks/list-items-hook/useFilters";
|
|
|
10
10
|
import { usePagination } from "../../hooks/list-items-hook/usePagination";
|
|
11
11
|
import { useBulkActions } from "../../hooks/list-items-hook/useBulkActions";
|
|
12
12
|
import Loader from "../loader";
|
|
13
|
-
|
|
13
|
+
const DEFAULT_LOCALIZATIONS = {
|
|
14
|
+
"rows-per-page": "Rows Per Page",
|
|
15
|
+
};
|
|
16
|
+
export default function ListItem({ title, name, filters = [], totalPages, query, setQuery, page, setPage, rowsPerPage, setRowsPerPage, updateParams, getParam, rowsPerPageOptions, QueryDebouncedTime = 500, bulkActionFeature = undefined, loading = false, showPaginationRow = true, showFiltersRow = true, headerComponent, children, itemName = "Item", localization = DEFAULT_LOCALIZATIONS, }) {
|
|
14
17
|
useFilters(name, filters, updateParams, getParam);
|
|
15
18
|
usePagination(name, page, setPage, rowsPerPage, setRowsPerPage, updateParams, getParam);
|
|
16
19
|
useBulkActions(bulkActionFeature, filters, query);
|
|
@@ -19,5 +22,5 @@ export default function ListItem({ title, name, filters = [], totalPages, query,
|
|
|
19
22
|
: "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
23
|
{ label: "All", value: DEFAULT_FILTER_VALUE },
|
|
21
24
|
...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, { ...a, disabled: bulkActionFeature.selectedRowIds.length === 0 }, `table-${name}-bulk-action-${i}`))) })), headerComponent] })), _jsx("div", { className: "overflow-x-auto", children: loading ? (_jsx("div", { className: "flex items-center justify-center", children: _jsx(Loader, {}) })) : (_jsx(_Fragment, { children: totalPages > 0 ? (_jsx(_Fragment, { children: children })) : (_jsxs("p", { className: "text-center text-text", children: ["No ", itemName, " found!"] })) })) }), showPaginationRow && (_jsxs("div", { className: "flex items-center justify-end gap-2 md:gap-4 mt-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("p", { className: "text-text text-sm", children: "
|
|
25
|
+
], 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}`))) })), headerComponent] })), _jsx("div", { className: "overflow-x-auto", children: loading ? (_jsx("div", { className: "flex items-center justify-center", children: _jsx(Loader, {}) })) : (_jsx(_Fragment, { children: totalPages > 0 ? (_jsx(_Fragment, { children: children })) : (_jsxs("p", { className: "text-center text-text", children: ["No ", itemName, " found!"] })) })) }), showPaginationRow && (_jsxs("div", { className: "flex items-center justify-end gap-2 md:gap-4 mt-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("p", { className: "text-text text-sm", children: localization["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
26
|
}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SelectProps } from "../../";
|
|
3
3
|
export type Props<T, K> = Omit<SelectProps<T>, "options" | "onChangeSearchInput"> & {
|
|
4
|
-
|
|
4
|
+
/** Fetch paginated / filtered list */
|
|
5
|
+
getItems: (query: string) => Promise<K[]>;
|
|
6
|
+
/** OPTIONAL: fetch single item by value (for selected values not in page) */
|
|
7
|
+
getOneItem?: (id: T) => Promise<K>;
|
|
8
|
+
/** Map item → label */
|
|
5
9
|
getLabel: (item: K) => React.ReactNode;
|
|
10
|
+
/** Map item → value */
|
|
6
11
|
getValue: (item: K) => T;
|
|
7
12
|
};
|
|
8
|
-
export default function SearchableSelect<T, K>({ getItems, getLabel, getValue, ...props }: Props<T, K>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default function SearchableSelect<T, K>({ getItems, getOneItem, getLabel, getValue, values, ...props }: Props<T, K>): import("react/jsx-runtime").JSX.Element;
|
|
9
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/searchable-select/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/searchable-select/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA+C,MAAM,OAAO,CAAC;AACpE,OAAO,EAAwB,WAAW,EAAE,MAAM,QAAQ,CAAC;AAY3D,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAC5B,WAAW,CAAC,CAAC,CAAC,EACd,SAAS,GAAG,qBAAqB,CAClC,GAAG;IACF,sCAAsC;IACtC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAE1C,6EAA6E;IAC7E,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IAEnC,uBAAuB;IACvB,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAEvC,uBAAuB;IACvB,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC;CAC1B,CAAC;AAKF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,EAC7C,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,MAAW,EACX,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,2CAoHb"}
|
|
@@ -1,28 +1,104 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { Select } from "../../";
|
|
5
|
-
|
|
5
|
+
/* ------------------------------------------------------------------ */
|
|
6
|
+
/* Utils */
|
|
7
|
+
/* ------------------------------------------------------------------ */
|
|
8
|
+
function isValidValue(value) {
|
|
9
|
+
return value !== undefined && value !== null && value !== "";
|
|
10
|
+
}
|
|
11
|
+
/* ------------------------------------------------------------------ */
|
|
12
|
+
/* Component */
|
|
13
|
+
/* ------------------------------------------------------------------ */
|
|
14
|
+
export default function SearchableSelect({ getItems, getOneItem, getLabel, getValue, values = [], ...props }) {
|
|
6
15
|
const [query, setQuery] = useState("");
|
|
7
|
-
const [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
const [items, setItems] = useState([]);
|
|
17
|
+
const [resolvedSelected, setResolvedSelected] = useState([]);
|
|
18
|
+
/* ------------------------------------------------------------------
|
|
19
|
+
* Refs to avoid refetching on rerenders (Formik-safe)
|
|
20
|
+
* ------------------------------------------------------------------ */
|
|
21
|
+
const getItemsRef = useRef(getItems);
|
|
22
|
+
const getOneItemRef = useRef(getOneItem);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
getItemsRef.current = getItems;
|
|
25
|
+
}, [getItems]);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
getOneItemRef.current = getOneItem;
|
|
28
|
+
}, [getOneItem]);
|
|
29
|
+
/* ------------------------------------------------------------------
|
|
30
|
+
* Fetch list ONLY when query changes
|
|
31
|
+
* ------------------------------------------------------------------ */
|
|
12
32
|
useEffect(() => {
|
|
13
33
|
let active = true;
|
|
14
|
-
|
|
15
|
-
if (active)
|
|
16
|
-
|
|
34
|
+
getItemsRef.current(query).then((data) => {
|
|
35
|
+
if (active) {
|
|
36
|
+
setItems(data);
|
|
37
|
+
}
|
|
17
38
|
});
|
|
18
39
|
return () => {
|
|
19
|
-
active = false;
|
|
40
|
+
active = false;
|
|
20
41
|
};
|
|
21
42
|
}, [query]);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
43
|
+
/* ------------------------------------------------------------------
|
|
44
|
+
* Resolve selected values not in current page (pagination-safe)
|
|
45
|
+
* ------------------------------------------------------------------ */
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (!getOneItemRef.current)
|
|
48
|
+
return;
|
|
49
|
+
if (!(values === null || values === void 0 ? void 0 : values.length))
|
|
50
|
+
return;
|
|
51
|
+
const validValues = values.filter(isValidValue);
|
|
52
|
+
if (!validValues.length)
|
|
53
|
+
return;
|
|
54
|
+
const knownIds = new Set([...items, ...resolvedSelected]
|
|
55
|
+
.map((i) => getValue(i))
|
|
56
|
+
.filter(isValidValue));
|
|
57
|
+
const missingIds = validValues.filter((id) => !knownIds.has(id));
|
|
58
|
+
if (!missingIds.length)
|
|
59
|
+
return;
|
|
60
|
+
let active = true;
|
|
61
|
+
Promise.all(missingIds.map((id) => getOneItemRef.current(id)))
|
|
62
|
+
.then((fetched) => {
|
|
63
|
+
if (!active)
|
|
64
|
+
return;
|
|
65
|
+
setResolvedSelected((prev) => {
|
|
66
|
+
const map = new Map();
|
|
67
|
+
[...prev, ...fetched].forEach((item) => {
|
|
68
|
+
const value = getValue(item);
|
|
69
|
+
if (isValidValue(value)) {
|
|
70
|
+
map.set(value, item);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
return Array.from(map.values());
|
|
74
|
+
});
|
|
75
|
+
})
|
|
76
|
+
.catch(() => {
|
|
77
|
+
/* ignore */
|
|
78
|
+
});
|
|
79
|
+
return () => {
|
|
80
|
+
active = false;
|
|
81
|
+
};
|
|
82
|
+
}, [values, items, resolvedSelected, getValue]);
|
|
83
|
+
/* ------------------------------------------------------------------
|
|
84
|
+
* Merge selected + paginated items
|
|
85
|
+
* Selected items always stay on top
|
|
86
|
+
* ------------------------------------------------------------------ */
|
|
87
|
+
const selectOptions = useMemo(() => {
|
|
88
|
+
const map = new Map();
|
|
89
|
+
[...resolvedSelected, ...items].forEach((item) => {
|
|
90
|
+
const value = getValue(item);
|
|
91
|
+
if (isValidValue(value)) {
|
|
92
|
+
map.set(value, item);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
return Array.from(map.values()).map((item) => ({
|
|
96
|
+
label: getLabel(item),
|
|
97
|
+
value: getValue(item),
|
|
98
|
+
}));
|
|
99
|
+
}, [items, resolvedSelected, getLabel, getValue]);
|
|
100
|
+
/* ------------------------------------------------------------------
|
|
101
|
+
* Render
|
|
102
|
+
* ------------------------------------------------------------------ */
|
|
103
|
+
return (_jsx(Select, { ...props, values: values, options: selectOptions, isSearchable: true, isRemote: true, onChangeSearchInput: setQuery }));
|
|
28
104
|
}
|
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
import { CONSTANTS } from "sea-platform-helpers";
|
|
2
|
+
export declare const DEFAULT_TRANSLATIONS_MAP: {
|
|
3
|
+
"Platform-Administration-Application": {
|
|
4
|
+
dashboard: string;
|
|
5
|
+
departments: string;
|
|
6
|
+
applications: string;
|
|
7
|
+
roles: string;
|
|
8
|
+
accounts: string;
|
|
9
|
+
emailTemplates: string;
|
|
10
|
+
"dashboard.welcome": string;
|
|
11
|
+
"header.profile": string;
|
|
12
|
+
"header.settings": string;
|
|
13
|
+
"header.logout": string;
|
|
14
|
+
name: string;
|
|
15
|
+
actions: string;
|
|
16
|
+
dismiss: string;
|
|
17
|
+
confirm: string;
|
|
18
|
+
update: string;
|
|
19
|
+
create: string;
|
|
20
|
+
view: string;
|
|
21
|
+
edit: string;
|
|
22
|
+
delete: string;
|
|
23
|
+
description: string;
|
|
24
|
+
organization: string;
|
|
25
|
+
department: string;
|
|
26
|
+
email: string;
|
|
27
|
+
phoneNumber: string;
|
|
28
|
+
birthdate: string;
|
|
29
|
+
password: string;
|
|
30
|
+
confirmPassword: string;
|
|
31
|
+
none: string;
|
|
32
|
+
code: string;
|
|
33
|
+
languages: string;
|
|
34
|
+
parameters: string;
|
|
35
|
+
versions: string;
|
|
36
|
+
locked: string;
|
|
37
|
+
years: string;
|
|
38
|
+
role: string;
|
|
39
|
+
"button.update": string;
|
|
40
|
+
"button.create": string;
|
|
41
|
+
"button.view": string;
|
|
42
|
+
"button.edit": string;
|
|
43
|
+
"button.delete": string;
|
|
44
|
+
"placeholder.yourName": string;
|
|
45
|
+
"placeholder.yourBirthdate": string;
|
|
46
|
+
"placeholder.yourEmailAddress": string;
|
|
47
|
+
"placeholder.yourPhoneNumber": string;
|
|
48
|
+
"placeholder.yourPassword": string;
|
|
49
|
+
"placeholder.confirmPassword": string;
|
|
50
|
+
"placeholder.newPassword": string;
|
|
51
|
+
"placeholder.enterTemplateName": string;
|
|
52
|
+
"placeholder.enterTemplateDescription": string;
|
|
53
|
+
"placeholder.enterTheParameterNames": string;
|
|
54
|
+
"placeholder.organizationName": string;
|
|
55
|
+
"placeholder.departmentName": string;
|
|
56
|
+
organizations: string;
|
|
57
|
+
"organizations.table": string;
|
|
58
|
+
"organizations.details": string;
|
|
59
|
+
"organizations.createNew": string;
|
|
60
|
+
"organizations.create": string;
|
|
61
|
+
"organizations.updateDetails": string;
|
|
62
|
+
"organizations.employeesCount": string;
|
|
63
|
+
"organizations.messages.deleteConfirm": string;
|
|
64
|
+
"organizations.messages.deletedSuccessfully": string;
|
|
65
|
+
"organizations.messages.updatedSuccessfully": string;
|
|
66
|
+
"organizations.messages.createdSuccessfully": string;
|
|
67
|
+
"departments.createNew": string;
|
|
68
|
+
"departments.create": string;
|
|
69
|
+
"departments.updateDetails": string;
|
|
70
|
+
"departments.details": string;
|
|
71
|
+
"departments.messages.createdSuccessfully": string;
|
|
72
|
+
"departments.messages.updatedSuccessfully": string;
|
|
73
|
+
"departments.messages.deletedSuccessfully": string;
|
|
74
|
+
"departments.messages.deleteConfirm": string;
|
|
75
|
+
"emailTemplates.createNew": string;
|
|
76
|
+
"emailTemplates.create": string;
|
|
77
|
+
"emailTemplates.updateDetails": string;
|
|
78
|
+
"emailTemplates.template": string;
|
|
79
|
+
"emailTemplates.details": string;
|
|
80
|
+
"emailTemplates.addNewVersion": string;
|
|
81
|
+
"emailTemplates.messages.deleteConfirm": string;
|
|
82
|
+
"emailTemplates.messages.deleteVersionConfirm": string;
|
|
83
|
+
"accounts.createNew": string;
|
|
84
|
+
"accounts.create": string;
|
|
85
|
+
"accounts.updateDetails": string;
|
|
86
|
+
"accounts.changePassword": string;
|
|
87
|
+
"accounts.recycleBin": string;
|
|
88
|
+
"accounts.details": string;
|
|
89
|
+
"accounts.table": string;
|
|
90
|
+
"accounts.restore": string;
|
|
91
|
+
"accounts.deletePermanently": string;
|
|
92
|
+
"accounts.moveToRecycleBin": string;
|
|
93
|
+
"accounts.newPassword": string;
|
|
94
|
+
"accounts.messages.restoredSuccessfully": string;
|
|
95
|
+
"accounts.messages.deletedSuccessfully": string;
|
|
96
|
+
"accounts.messages.restoreConfirm": string;
|
|
97
|
+
"accounts.messages.deleteConfirm": string;
|
|
98
|
+
"accounts.messages.moveToRecycleBinConfirm": string;
|
|
99
|
+
"accounts.messages.createdSuccessfully": string;
|
|
100
|
+
"accounts.messages.updatedSuccessfully": string;
|
|
101
|
+
"accounts.messages.passwordChangedSuccessfully": string;
|
|
102
|
+
"applications.table": string;
|
|
103
|
+
"applications.details": string;
|
|
104
|
+
"applications.updateDetails": string;
|
|
105
|
+
"applications.localizationDetails": string;
|
|
106
|
+
"applications.url": string;
|
|
107
|
+
"applications.status": string;
|
|
108
|
+
"applications.icon": string;
|
|
109
|
+
"applications.uploadIcon": string;
|
|
110
|
+
"applications.openApplication": string;
|
|
111
|
+
"applications.localization": string;
|
|
112
|
+
"applications.messages.updatedSuccessfully": string;
|
|
113
|
+
"placeholder.applicationName": string;
|
|
114
|
+
"placeholder.applicationUrl": string;
|
|
115
|
+
"placeholder.typeSomeDetailsHere": string;
|
|
116
|
+
"placeholder.roleName": string;
|
|
117
|
+
"roles.table": string;
|
|
118
|
+
"roles.details": string;
|
|
119
|
+
"roles.createNew": string;
|
|
120
|
+
"roles.create": string;
|
|
121
|
+
"roles.updateDetails": string;
|
|
122
|
+
"roles.color": string;
|
|
123
|
+
"roles.application": string;
|
|
124
|
+
"roles.permissions": string;
|
|
125
|
+
"roles.messages.createdSuccessfully": string;
|
|
126
|
+
"roles.messages.updatedSuccessfully": string;
|
|
127
|
+
"roles.messages.deletedSuccessfully": string;
|
|
128
|
+
"roles.messages.deleteConfirm": string;
|
|
129
|
+
"roles.messages.cannotDeleteNotDeletable": string;
|
|
130
|
+
"localization.saveChanges": string;
|
|
131
|
+
"localization.newLanguage": string;
|
|
132
|
+
"localization.searchPlaceholder": string;
|
|
133
|
+
"localization.keys": string;
|
|
134
|
+
"localization.createNewLanguage": string;
|
|
135
|
+
"localization.language": string;
|
|
136
|
+
"localization.selectLanguagePlaceholder": string;
|
|
137
|
+
"localization.enabled": string;
|
|
138
|
+
"localization.delete": string;
|
|
139
|
+
"localization.updateLanguage": string;
|
|
140
|
+
"localization.createLanguage": string;
|
|
141
|
+
};
|
|
142
|
+
"Strategy-Application": {
|
|
143
|
+
goal: string;
|
|
144
|
+
goals: string;
|
|
145
|
+
objective: string;
|
|
146
|
+
objectives: string;
|
|
147
|
+
initiative: string;
|
|
148
|
+
initiatives: string;
|
|
149
|
+
program: string;
|
|
150
|
+
programs: string;
|
|
151
|
+
project: string;
|
|
152
|
+
projects: string;
|
|
153
|
+
task: string;
|
|
154
|
+
tasks: string;
|
|
155
|
+
activity: string;
|
|
156
|
+
activities: string;
|
|
157
|
+
kpi: string;
|
|
158
|
+
kpis: string;
|
|
159
|
+
risk: string;
|
|
160
|
+
risks: string;
|
|
161
|
+
issue: string;
|
|
162
|
+
issues: string;
|
|
163
|
+
milestone: string;
|
|
164
|
+
milestones: string;
|
|
165
|
+
deliverable: string;
|
|
166
|
+
deliverables: string;
|
|
167
|
+
Goal: string;
|
|
168
|
+
Objective: string;
|
|
169
|
+
Initiative: string;
|
|
170
|
+
Program: string;
|
|
171
|
+
Project: string;
|
|
172
|
+
Activity: string;
|
|
173
|
+
Task: string;
|
|
174
|
+
KPI: string;
|
|
175
|
+
subtask: string;
|
|
176
|
+
subtasks: string;
|
|
177
|
+
comment: string;
|
|
178
|
+
comments: string;
|
|
179
|
+
"comments.title": string;
|
|
180
|
+
"comments.subtitle": string;
|
|
181
|
+
"comments.replyingTo": string;
|
|
182
|
+
"comments.replyingToComment": string;
|
|
183
|
+
"comments.cancelReply": string;
|
|
184
|
+
"comments.editingComment": string;
|
|
185
|
+
"comments.cancelEdit": string;
|
|
186
|
+
"comments.placeholder.edit": string;
|
|
187
|
+
"comments.placeholder.reply": string;
|
|
188
|
+
"comments.placeholder.add": string;
|
|
189
|
+
rowsPerPage: string;
|
|
190
|
+
all: string;
|
|
191
|
+
showMore: string;
|
|
192
|
+
overview: string;
|
|
193
|
+
by: string;
|
|
194
|
+
allTime: string;
|
|
195
|
+
progress: string;
|
|
196
|
+
addNew: string;
|
|
197
|
+
status: string;
|
|
198
|
+
optional: string;
|
|
199
|
+
currentValue: string;
|
|
200
|
+
targetValue: string;
|
|
201
|
+
frequency: string;
|
|
202
|
+
trackedBy: string;
|
|
203
|
+
lastUpdated: string;
|
|
204
|
+
budget: string;
|
|
205
|
+
title: string;
|
|
206
|
+
description: string;
|
|
207
|
+
startDate: string;
|
|
208
|
+
endDate: string;
|
|
209
|
+
select: string;
|
|
210
|
+
owner: string;
|
|
211
|
+
department: string;
|
|
212
|
+
duration: string;
|
|
213
|
+
information: string;
|
|
214
|
+
team: string;
|
|
215
|
+
code: string;
|
|
216
|
+
manager: string;
|
|
217
|
+
recent: string;
|
|
218
|
+
manage: string;
|
|
219
|
+
members: string;
|
|
220
|
+
stakeholders: string;
|
|
221
|
+
total: string;
|
|
222
|
+
actualSpent: string;
|
|
223
|
+
remaining: string;
|
|
224
|
+
documents: string;
|
|
225
|
+
attachments: string;
|
|
226
|
+
scope: string;
|
|
227
|
+
priority: string;
|
|
228
|
+
tracking: string;
|
|
229
|
+
load: string;
|
|
230
|
+
more: string;
|
|
231
|
+
due: string;
|
|
232
|
+
planned: string;
|
|
233
|
+
actual: string;
|
|
234
|
+
showing: string;
|
|
235
|
+
assignee: string;
|
|
236
|
+
date: string;
|
|
237
|
+
resolution: string;
|
|
238
|
+
plan: string;
|
|
239
|
+
likelihood: string;
|
|
240
|
+
impact: string;
|
|
241
|
+
migrationStrategy: string;
|
|
242
|
+
completion: string;
|
|
243
|
+
type: string;
|
|
244
|
+
externalUrl: string;
|
|
245
|
+
search: string;
|
|
246
|
+
complete: string;
|
|
247
|
+
completed: string;
|
|
248
|
+
needsAttention: string;
|
|
249
|
+
priorities: string;
|
|
250
|
+
Low: string;
|
|
251
|
+
Medium: string;
|
|
252
|
+
high: string;
|
|
253
|
+
filters: string;
|
|
254
|
+
details: string;
|
|
255
|
+
upload: string;
|
|
256
|
+
section: string;
|
|
257
|
+
none: string;
|
|
258
|
+
account: string;
|
|
259
|
+
dependency: string;
|
|
260
|
+
dependencies: string;
|
|
261
|
+
meeting: string;
|
|
262
|
+
operational: string;
|
|
263
|
+
types: string;
|
|
264
|
+
contributors: string;
|
|
265
|
+
owners: string;
|
|
266
|
+
future: string;
|
|
267
|
+
history: string;
|
|
268
|
+
participants: string;
|
|
269
|
+
schedule: string;
|
|
270
|
+
upcomingCount: string;
|
|
271
|
+
skipped: string;
|
|
272
|
+
postponed: string;
|
|
273
|
+
pending: string;
|
|
274
|
+
newTime: string;
|
|
275
|
+
occurrence: string;
|
|
276
|
+
today: string;
|
|
277
|
+
missed: string;
|
|
278
|
+
completedOn: string;
|
|
279
|
+
minutes: string;
|
|
280
|
+
fullLayer: string;
|
|
281
|
+
resetLayout: string;
|
|
282
|
+
accounts: string;
|
|
283
|
+
noStatementYet: string;
|
|
284
|
+
"navbar.strategy": string;
|
|
285
|
+
"navbar.objectives": string;
|
|
286
|
+
"navbar.initiatives": string;
|
|
287
|
+
"navbar.programs": string;
|
|
288
|
+
"navbar.projects": string;
|
|
289
|
+
"navbar.tasks": string;
|
|
290
|
+
"navbar.activities": string;
|
|
291
|
+
"navbar.flow": string;
|
|
292
|
+
"navbar.scorecard": string;
|
|
293
|
+
"button.new": string;
|
|
294
|
+
"button.edit": string;
|
|
295
|
+
"button.delete": string;
|
|
296
|
+
"button.backTo": string;
|
|
297
|
+
"button.viewAll": string;
|
|
298
|
+
"button.cancel": string;
|
|
299
|
+
"button.save": string;
|
|
300
|
+
"button.comments": string;
|
|
301
|
+
"button.confirm": string;
|
|
302
|
+
"button.create": string;
|
|
303
|
+
"button.add": string;
|
|
304
|
+
"button.update": string;
|
|
305
|
+
"button.newProgram": string;
|
|
306
|
+
"button.newActivity": string;
|
|
307
|
+
"button.createProject": string;
|
|
308
|
+
"placeholder.title": string;
|
|
309
|
+
"placeholder.description": string;
|
|
310
|
+
"placeholder.select": string;
|
|
311
|
+
"placeholder.selectperiod": string;
|
|
312
|
+
"placeholder.owner": string;
|
|
313
|
+
"placeholder.manager": string;
|
|
314
|
+
"placeholder.startDate": string;
|
|
315
|
+
"placeholder.endDate": string;
|
|
316
|
+
"placeholder.objectives": string;
|
|
317
|
+
"placeholder.selectType": string;
|
|
318
|
+
"placeholder.selectEntityType": string;
|
|
319
|
+
"placeholder.searchForAnAccount": string;
|
|
320
|
+
"initiatives.placeholder": string;
|
|
321
|
+
"status.todo": string;
|
|
322
|
+
"status.inProgress": string;
|
|
323
|
+
"status.inReview": string;
|
|
324
|
+
"status.blocked": string;
|
|
325
|
+
"status.done": string;
|
|
326
|
+
"messages.delete.confirm": string;
|
|
327
|
+
"messages.no__name__found": string;
|
|
328
|
+
"messages.no__name__foundDescription": string;
|
|
329
|
+
"messages.there_are_no__name__yet": string;
|
|
330
|
+
"messages.progress.empty.action": string;
|
|
331
|
+
"messages.progress.empty.configured": string;
|
|
332
|
+
"messages.progress.modal.addItemsFirst": string;
|
|
333
|
+
"messages.progress.modal.noItems": string;
|
|
334
|
+
"messages.progress.notInitialized": string;
|
|
335
|
+
"messages.updatedSuccessfully": string;
|
|
336
|
+
"messages.failedToUpdate": string;
|
|
337
|
+
"messages.failedToLoad": string;
|
|
338
|
+
"progress.modal.description": string;
|
|
339
|
+
"progress.modal.composition-total": string;
|
|
340
|
+
"progress.modal.button.balance-overall": string;
|
|
341
|
+
"progress.card.weight": string;
|
|
342
|
+
"progress.overAllProgress": string;
|
|
343
|
+
"progress.progressDetails": string;
|
|
344
|
+
"strategy.visionAndMission": string;
|
|
345
|
+
"strategy.vision": string;
|
|
346
|
+
"strategy.Vision": string;
|
|
347
|
+
"strategy.mission": string;
|
|
348
|
+
"strategy.Mission": string;
|
|
349
|
+
"strategy.goals": string;
|
|
350
|
+
"strategy.noGoalsAvailable": string;
|
|
351
|
+
"strategy.Vision.modal.description": string;
|
|
352
|
+
"strategy.Mission.modal.description": string;
|
|
353
|
+
"goal.details.linkedToThis": string;
|
|
354
|
+
"goal.details.objectives.subtitle": string;
|
|
355
|
+
"goal.modal.add.description": string;
|
|
356
|
+
"goal.modal.edit.description": string;
|
|
357
|
+
"goal.message.delete.confirm": string;
|
|
358
|
+
"goal.message.delete.warning": string;
|
|
359
|
+
"objective.new": string;
|
|
360
|
+
"objective.list.empty.title": string;
|
|
361
|
+
"objective.details.initiatives.subtitle": string;
|
|
362
|
+
"objective.statistics.noInitiativesAvailable": string;
|
|
363
|
+
"objective.message.delete.confirm": string;
|
|
364
|
+
"objective.message.delete.warning": string;
|
|
365
|
+
"objective.modal.add.description": string;
|
|
366
|
+
"objective.modal.edit.description": string;
|
|
367
|
+
"initiative.list.empty.title": string;
|
|
368
|
+
"initiative.details.programs.title": string;
|
|
369
|
+
"initiative.details.programs.subtitle": string;
|
|
370
|
+
"initiative.details.projects.title": string;
|
|
371
|
+
"initiative.details.projects.subtitle": string;
|
|
372
|
+
"initiative.details.projects.empty.title": string;
|
|
373
|
+
"initiative.details.projects.empty.description": string;
|
|
374
|
+
"initiative.details.activities.title": string;
|
|
375
|
+
"initiative.details.activities.subtitle": string;
|
|
376
|
+
"initiative.modal.edit.description": string;
|
|
377
|
+
"initiative.modal.title": string;
|
|
378
|
+
"initiative.activity.description": string;
|
|
379
|
+
"program.new": string;
|
|
380
|
+
"program.list.empty.title": string;
|
|
381
|
+
"program.modal.add.description": string;
|
|
382
|
+
"program.modal.edit.description": string;
|
|
383
|
+
"program.statistics.noProgramsAvailable": string;
|
|
384
|
+
"program.statistics.totalBudget": string;
|
|
385
|
+
"program.details.overview.subtitle": string;
|
|
386
|
+
"program.details.objectives.subtitle": string;
|
|
387
|
+
"program.details.objectives.modal.title": string;
|
|
388
|
+
"program.details.objectives.modal.description": string;
|
|
389
|
+
"program.details.objectives.modal.message.empty": string;
|
|
390
|
+
"program.details.objectives.modal.placeholder": string;
|
|
391
|
+
"program.details.objectives.empty": string;
|
|
392
|
+
"program.details.projects.subtitle": string;
|
|
393
|
+
"program.details.projects.empty": string;
|
|
394
|
+
"program.detials.projects.empty": string;
|
|
395
|
+
"program.details.activities.subtitle": string;
|
|
396
|
+
"program.details.risks.subtitle": string;
|
|
397
|
+
"program.details.kpis.title": string;
|
|
398
|
+
"program.details.kpis.subtitle": string;
|
|
399
|
+
"program.detials.kpis.subtitle": string;
|
|
400
|
+
"program.details.documents.subtitle": string;
|
|
401
|
+
"program.details.baseInfo.confirmDelete": string;
|
|
402
|
+
"program.details.team.confirmDeleteMember": string;
|
|
403
|
+
"program.details.team.noStakeholders": string;
|
|
404
|
+
"program.details.team.addMembers.orRemove": string;
|
|
405
|
+
"program.message.delete.confirm": string;
|
|
406
|
+
"program.message.delete.warning": string;
|
|
407
|
+
"project.modal.add.description": string;
|
|
408
|
+
"project.modal.edit.description": string;
|
|
409
|
+
"project.statistics.noProjectsAvailable": string;
|
|
410
|
+
"project.statistics.totalBudget": string;
|
|
411
|
+
"programs.placeholder": string;
|
|
412
|
+
links: string;
|
|
413
|
+
"project.list.empty.title": string;
|
|
414
|
+
"project.list.empty.description": string;
|
|
415
|
+
"documents.list.empty.title": string;
|
|
416
|
+
"documents.list.empty": string;
|
|
417
|
+
"documents.card.delete.confirm": string;
|
|
418
|
+
"documents.card.untitled": string;
|
|
419
|
+
"documents.form.title": string;
|
|
420
|
+
"documents.form.subtitle": string;
|
|
421
|
+
"risk.list.empty.title": string;
|
|
422
|
+
"risk.form.title.add": string;
|
|
423
|
+
"risk.form.title.edit": string;
|
|
424
|
+
"risk.form.subtitle.edit": string;
|
|
425
|
+
"risk.form.description.label": string;
|
|
426
|
+
"risk.form.likelihood.label": string;
|
|
427
|
+
"risk.form.likelihood.placeholder": string;
|
|
428
|
+
"risk.form.impact.label": string;
|
|
429
|
+
"risk.form.impact.placeholder": string;
|
|
430
|
+
"risk.form.migrationStrategy.label": string;
|
|
431
|
+
"risk.card.untitled": string;
|
|
432
|
+
"risk.card.delete.confirm": string;
|
|
433
|
+
"risk.card.likelihood": string;
|
|
434
|
+
"risk.card.impact": string;
|
|
435
|
+
"risk.card.mitigation": string;
|
|
436
|
+
"risk.card.noStrategy": string;
|
|
437
|
+
"risk.card.owner": string;
|
|
438
|
+
"risk.card.unassigned": string;
|
|
439
|
+
"button.updateRisk": string;
|
|
440
|
+
"button.createRisk": string;
|
|
441
|
+
"issue.form.subtitle": string;
|
|
442
|
+
"issue.form.description.placeholder": string;
|
|
443
|
+
"issue.form.resolutionPlan": string;
|
|
444
|
+
"risk.form.subtitle": string;
|
|
445
|
+
"risk.form.description.placeholder": string;
|
|
446
|
+
"risk.form.migrationStrategy.placeholder": string;
|
|
447
|
+
"link.form.title": string;
|
|
448
|
+
"link.form.subtitle": string;
|
|
449
|
+
"link.form.description.placeholder": string;
|
|
450
|
+
"link.form.external.caption": string;
|
|
451
|
+
"project.new": string;
|
|
452
|
+
"project.details.overview.subtitle": string;
|
|
453
|
+
"project.details.overview.progress.subtitle": string;
|
|
454
|
+
"project.details.information.title": string;
|
|
455
|
+
"project.details.information.projectType": string;
|
|
456
|
+
"project.details.information.projectOwner": string;
|
|
457
|
+
"project.details.information.projectManager": string;
|
|
458
|
+
"project.details.information.parentInitiatives": string;
|
|
459
|
+
"project.details.progress.title": string;
|
|
460
|
+
"project.details.progress.overallProgress": string;
|
|
461
|
+
"project.details.team.recentActivity": string;
|
|
462
|
+
"project.details.team.confirmDeleteMember": string;
|
|
463
|
+
"project.details.team.projectOwner": string;
|
|
464
|
+
"project.details.team.projectManager": string;
|
|
465
|
+
"project.details.team.noTypesYet": string;
|
|
466
|
+
"project.details.links.addLink": string;
|
|
467
|
+
"project.details.statistic.status": string;
|
|
468
|
+
"project.details.statistic.priority": string;
|
|
469
|
+
"project.details.tasks.addTask": string;
|
|
470
|
+
"project.details.milestones.subtitle": string;
|
|
471
|
+
"project.details.tasks.subtitle": string;
|
|
472
|
+
"project.details.activities.subtitle": string;
|
|
473
|
+
"project.details.baseInfo.confirmDelete": string;
|
|
474
|
+
"project.details.documents.title": string;
|
|
475
|
+
"project.details.documents.subtitle": string;
|
|
476
|
+
"project.details.kpis.title": string;
|
|
477
|
+
"project.details.kpis.subtitle": string;
|
|
478
|
+
"project.details.links.title": string;
|
|
479
|
+
"project.details.links.subtutle": string;
|
|
480
|
+
"project.message.delete.confirm": string;
|
|
481
|
+
"project.message.delete.warning": string;
|
|
482
|
+
"task.new": string;
|
|
483
|
+
"task.form.comments.title": string;
|
|
484
|
+
"task.form.comments.subtitle": string;
|
|
485
|
+
"task.form.subtask.placeholder": string;
|
|
486
|
+
"tasks.header.subtitle": string;
|
|
487
|
+
"tasks.search.placeholder": string;
|
|
488
|
+
"tasks.filters.active": string;
|
|
489
|
+
"tasks.filters.clearAll": string;
|
|
490
|
+
"tasks.filter.status.all": string;
|
|
491
|
+
"tasks.filter.priority.all": string;
|
|
492
|
+
"tasks.view.listAriaLabel": string;
|
|
493
|
+
"tasks.view.gridAriaLabel": string;
|
|
494
|
+
"task.form.assignAccounts": string;
|
|
495
|
+
"task.untitled": string;
|
|
496
|
+
"task.documents.empty": string;
|
|
497
|
+
"task.subtask.edit.ariaLabel": string;
|
|
498
|
+
"messages.clickToEdit": string;
|
|
499
|
+
"button.view": string;
|
|
500
|
+
"comment.form.noComments": string;
|
|
501
|
+
"activity.new": string;
|
|
502
|
+
"activity.details.nextOccurrence": string;
|
|
503
|
+
"activity.details.future.occurrencesToGenerate": string;
|
|
504
|
+
"activity.details.future.title": string;
|
|
505
|
+
"activity.details.futire.list.title": string;
|
|
506
|
+
"activity.details.future.list.item.onGoing": string;
|
|
507
|
+
"activity.details.future.list.item.nextOccurrence": string;
|
|
508
|
+
"activity.form.subtitle": string;
|
|
509
|
+
"flow.title": string;
|
|
510
|
+
"flow.edgeType.title": string;
|
|
511
|
+
"flow.edgeType.menuTitle": string;
|
|
512
|
+
"flow.edgeType.default": string;
|
|
513
|
+
"flow.edgeType.straight": string;
|
|
514
|
+
"flow.edgeType.step": string;
|
|
515
|
+
"flow.edgeType.smoothstep": string;
|
|
516
|
+
"flow.edgeType.bezier": string;
|
|
517
|
+
"flow.fullscreen.enter": string;
|
|
518
|
+
"flow.fullscreen.exit": string;
|
|
519
|
+
"flow.planning.fullLayer": string;
|
|
520
|
+
"flow.planning.strategyLayer": string;
|
|
521
|
+
"flow.planning.executionLayer": string;
|
|
522
|
+
"flow.openFullView": string;
|
|
523
|
+
"flow.loadingDetails": string;
|
|
524
|
+
"flow.noDetailsAvailable": string;
|
|
525
|
+
"flow.relations": string;
|
|
526
|
+
"flow.related": string;
|
|
527
|
+
"flow.items": string;
|
|
528
|
+
"flow.relation.default": string;
|
|
529
|
+
"flow.relation.blocks": string;
|
|
530
|
+
"flow.relation.blockedBy": string;
|
|
531
|
+
"flow.relation.dependsOn": string;
|
|
532
|
+
"flow.relation.requiredBy": string;
|
|
533
|
+
"flow.relation.relatesTo": string;
|
|
534
|
+
"flow.created": string;
|
|
535
|
+
"flow.updated": string;
|
|
536
|
+
"flow.actions": string;
|
|
537
|
+
"flow.blockers.detailsTitle": string;
|
|
538
|
+
"flow.blockers.all": string;
|
|
539
|
+
"flow.blockers.searchPlaceholder": string;
|
|
540
|
+
"flow.blockers.blocker": string;
|
|
541
|
+
"flow.blockers.affected": string;
|
|
542
|
+
"flow.blockers.reason": string;
|
|
543
|
+
"flow.blockers.estimatedDelay": string;
|
|
544
|
+
"frequency.daily": string;
|
|
545
|
+
"frequency.weekly": string;
|
|
546
|
+
"frequency.biWeekly": string;
|
|
547
|
+
"frequency.monthly": string;
|
|
548
|
+
"frequency.quarterly": string;
|
|
549
|
+
"frequency.oneTime": string;
|
|
550
|
+
};
|
|
551
|
+
};
|
|
552
|
+
type TranslationKeysMap = {
|
|
553
|
+
[CONSTANTS.Application.ApplicationKeys
|
|
554
|
+
.PlatformAdministrationApplication]: (typeof DEFAULT_TRANSLATIONS_MAP)[CONSTANTS.Application.ApplicationKeys.PlatformAdministrationApplication];
|
|
555
|
+
[CONSTANTS.Application.ApplicationKeys
|
|
556
|
+
.StrategyApplication]: (typeof DEFAULT_TRANSLATIONS_MAP)[CONSTANTS.Application.ApplicationKeys.StrategyApplication];
|
|
557
|
+
};
|
|
558
|
+
export declare function useSeaTranslation<K extends keyof TranslationKeysMap>(applicationKey: K, fetchTranslation: () => Promise<Record<keyof TranslationKeysMap[K], string>>, selectedLanguageCode?: string): {
|
|
559
|
+
t: (key: keyof TranslationKeysMap[K], params?: Record<string, string | number>) => string;
|
|
560
|
+
};
|
|
561
|
+
export {};
|
|
562
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-translation/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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const DEFAULT_TRANSLATIONS_MAP = {
|
|
5
|
+
[CONSTANTS.Application.ApplicationKeys.PlatformAdministrationApplication]: CONSTANTS.Localization.platformAdministrationApplication,
|
|
6
|
+
[CONSTANTS.Application.ApplicationKeys.StrategyApplication]: CONSTANTS.Localization.strategyApplication,
|
|
7
|
+
};
|
|
8
|
+
let json = {};
|
|
9
|
+
let isFetching = false;
|
|
10
|
+
const _refreshLanguage = "refreshLanguage";
|
|
11
|
+
const refreshLanguageEvent = new Event(_refreshLanguage);
|
|
12
|
+
// Generic version that preserves the type relationship
|
|
13
|
+
export function useSeaTranslation(applicationKey, fetchTranslation, selectedLanguageCode) {
|
|
14
|
+
const [, setRenderTrigger] = useState(false);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
const fetchDefaultTranslation = async () => {
|
|
17
|
+
if (!json[selectedLanguageCode] && isFetching == false) {
|
|
18
|
+
try {
|
|
19
|
+
isFetching = true;
|
|
20
|
+
const languageResponse = await fetchTranslation();
|
|
21
|
+
json = {
|
|
22
|
+
...json,
|
|
23
|
+
[selectedLanguageCode]: languageResponse,
|
|
24
|
+
};
|
|
25
|
+
dispatchEvent(refreshLanguageEvent);
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
console.error("Fetch failed", error);
|
|
29
|
+
}
|
|
30
|
+
finally {
|
|
31
|
+
isFetching = false;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
fetchDefaultTranslation();
|
|
36
|
+
}, [selectedLanguageCode]);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
const handleRefreshLanguage = () => {
|
|
39
|
+
setRenderTrigger((prev) => !prev);
|
|
40
|
+
};
|
|
41
|
+
// Listen on window
|
|
42
|
+
window.addEventListener(_refreshLanguage, handleRefreshLanguage);
|
|
43
|
+
// Cleanup on unmount
|
|
44
|
+
return () => {
|
|
45
|
+
window.removeEventListener(_refreshLanguage, handleRefreshLanguage);
|
|
46
|
+
};
|
|
47
|
+
}, []);
|
|
48
|
+
const t = (key, params) => {
|
|
49
|
+
var _a;
|
|
50
|
+
let translation;
|
|
51
|
+
if ((_a = json[selectedLanguageCode]) === null || _a === void 0 ? void 0 : _a[key]) {
|
|
52
|
+
translation = json[selectedLanguageCode][key];
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
translation =
|
|
56
|
+
DEFAULT_TRANSLATIONS_MAP[applicationKey][key] || "";
|
|
57
|
+
}
|
|
58
|
+
// Replace placeholders like {{ name }}, {{ count }}, etc.
|
|
59
|
+
if (params) {
|
|
60
|
+
Object.entries(params).forEach(([paramKey, paramValue]) => {
|
|
61
|
+
const placeholder = new RegExp(`{{\\s*${paramKey}\\s*}}`, "g");
|
|
62
|
+
translation = translation.replace(placeholder, String(paramValue));
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return translation;
|
|
66
|
+
};
|
|
67
|
+
return { t };
|
|
68
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * as Services from "./services";
|
|
|
11
11
|
export { default as MustAuth } from "./middleware/must-auth";
|
|
12
12
|
export { useHasApplicationAccess } from "./hooks/user-has-application-access";
|
|
13
13
|
export { useHasOneOfPermissions, useHasPermission, } from "./hooks/use-has-permission-access";
|
|
14
|
+
export { useSeaTranslation, DEFAULT_TRANSLATIONS_MAP, } from "./hooks/use-translation";
|
|
14
15
|
export { default as Icon, Props as IconProps } from "./components/icon";
|
|
15
16
|
export { default as Button, Props as ButtonProps } from "./components/button";
|
|
16
17
|
export { default as Alert, Props as AlertProps, Types as AlertTypes, Themes as AlertThemes, } from "./components/alert";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,Q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/C,OAAO,EAAE,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
|
@@ -16,6 +16,7 @@ export { default as MustAuth } from "./middleware/must-auth";
|
|
|
16
16
|
// hooks
|
|
17
17
|
export { useHasApplicationAccess } from "./hooks/user-has-application-access";
|
|
18
18
|
export { useHasOneOfPermissions, useHasPermission, } from "./hooks/use-has-permission-access";
|
|
19
|
+
export { useSeaTranslation, DEFAULT_TRANSLATIONS_MAP, } from "./hooks/use-translation";
|
|
19
20
|
// components
|
|
20
21
|
export { default as Icon } from "./components/icon";
|
|
21
22
|
export { default as Button } from "./components/button";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/hoc/can-access-application/index.tsx","../src/hoc/with-authorization/index.tsx","../src/components/accordion/index.tsx","../src/components/alert/index.tsx","../src/components/auto-complete/auto-complete-context.tsx","../src/components/auto-complete/auto-complete-dropdown.tsx","../src/components/auto-complete/auto-complete-input.tsx","../src/components/auto-complete/auto-complete-selected.tsx","../src/components/auto-complete/auto-complete.tsx","../src/components/auto-complete/index.tsx","../src/components/auto-complete/use-autocomplete.ts","../src/components/auto-complete-input/index.tsx","../src/components/avatar/index.tsx","../src/components/badge/index.tsx","../src/components/breadcrumb/index.tsx","../src/components/break-line/index.tsx","../src/components/button/index.tsx","../src/components/calendar/index.tsx","../src/components/cards-list/index.tsx","../src/components/carousel/index.tsx","../src/components/checkbox/index.tsx","../src/components/color-picker/index.tsx","../src/components/comments-container/index.tsx","../src/components/comments-container/comment-event-bus/index.ts","../src/components/comments-container/comment-form/index.tsx","../src/components/comments-container/comment-item/index.tsx","../src/components/comments-container/comments-list/index.tsx","../src/components/comments-container/constants/index.ts","../src/components/comments-container/use-comments/index.tsx","../src/components/confirm/index.tsx","../src/components/count-down/index.tsx","../src/components/day-calendar/index.tsx","../src/components/drawer/index.tsx","../src/components/editable-text/index.tsx","../src/components/expandable-text/index.tsx","../src/components/file-input/index.tsx","../src/components/file-input/components/file-item/index.tsx","../src/components/firebase-token-handler/index.tsx","../src/components/form/index.tsx","../src/components/icon/index.tsx","../src/components/input/index.tsx","../src/components/item-not-found/index.tsx","../src/components/list-item/index.tsx","../src/components/list-item/components/page-button/index.tsx","../src/components/list-item/components/pagination/index.tsx","../src/components/loader/index.tsx","../src/components/log-activities-container/index.tsx","../src/components/log-activities-container/log-activities-list/index.tsx","../src/components/log-activities-container/log-activity-item/index.tsx","../src/components/log-activities-container/use-log-activities/index.tsx","../src/components/menu/index.tsx","../src/components/menu/menu-item/index.tsx","../src/components/modal/index.tsx","../src/components/month-calendar/index.tsx","../src/components/native-menu/index.tsx","../src/components/native-menu/native-menu-item/index.tsx","../src/components/not-authorized/index.tsx","../src/components/notifications-menu/index.tsx","../src/components/otp-input/index.tsx","../src/components/paper/index.tsx","../src/components/progress-bar/index.tsx","../src/components/radio-button/index.tsx","../src/components/search-input/index.tsx","../src/components/searchable-select/index.tsx","../src/components/select/selectchips.tsx","../src/components/select/selectcontrol.tsx","../src/components/select/selectdropdowncontent.tsx","../src/components/select/selectplaceholder.tsx","../src/components/select/selecttypes.ts","../src/components/select/selectview.tsx","../src/components/select/index.tsx","../src/components/select/useselectportal.ts","../src/components/skeleton/index.tsx","../src/components/stacked-avatars/index.tsx","../src/components/tab/index.tsx","../src/components/table/index.tsx","../src/components/text-editor/index.tsx","../src/components/text-editor/components/toolbar/index.tsx","../src/components/text-editor/utils/index.ts","../src/components/textarea/index.tsx","../src/components/toggle/index.tsx","../src/components/tooltip/index.tsx","../src/components/tree-checkbox/index.tsx","../src/components/tree-checkbox/components/tree-checkbox-item/index.tsx","../src/components/tree-checkbox/utils/index.ts","../src/components/week-calendar/index.tsx","../src/constants/index.ts","../src/hooks/list-items-hook/types.ts","../src/hooks/list-items-hook/usebulkactions.ts","../src/hooks/list-items-hook/usefilters.ts","../src/hooks/list-items-hook/usepagination.ts","../src/hooks/use-has-permission-access/index.ts","../src/hooks/user-has-application-access/index.ts","../src/middleware/must-auth/index.tsx","../src/services/index.ts","../src/services/remote-service/index.ts","../src/utils/auth-axios/index.ts","../src/utils/axios/index.ts","../src/utils/color/index.ts","../src/utils/cookie/index.ts","../src/utils/device/index.ts","../src/utils/file/index.ts","../src/utils/firebase-client/firebase.ts","../src/utils/firebase-client/index.ts","../src/utils/firebase-client/types.ts","../src/utils/jwt/index.ts","../src/utils/notification-localstorage/index.ts","../src/utils/validation/index.ts"],"version":"5.6.3"}
|
|
1
|
+
{"root":["../src/index.ts","../src/hoc/can-access-application/index.tsx","../src/hoc/with-authorization/index.tsx","../src/components/accordion/index.tsx","../src/components/alert/index.tsx","../src/components/auto-complete/auto-complete-context.tsx","../src/components/auto-complete/auto-complete-dropdown.tsx","../src/components/auto-complete/auto-complete-input.tsx","../src/components/auto-complete/auto-complete-selected.tsx","../src/components/auto-complete/auto-complete.tsx","../src/components/auto-complete/index.tsx","../src/components/auto-complete/use-autocomplete.ts","../src/components/auto-complete-input/index.tsx","../src/components/avatar/index.tsx","../src/components/badge/index.tsx","../src/components/breadcrumb/index.tsx","../src/components/break-line/index.tsx","../src/components/button/index.tsx","../src/components/calendar/index.tsx","../src/components/cards-list/index.tsx","../src/components/carousel/index.tsx","../src/components/checkbox/index.tsx","../src/components/color-picker/index.tsx","../src/components/comments-container/index.tsx","../src/components/comments-container/comment-event-bus/index.ts","../src/components/comments-container/comment-form/index.tsx","../src/components/comments-container/comment-item/index.tsx","../src/components/comments-container/comments-list/index.tsx","../src/components/comments-container/constants/index.ts","../src/components/comments-container/use-comments/index.tsx","../src/components/confirm/index.tsx","../src/components/count-down/index.tsx","../src/components/day-calendar/index.tsx","../src/components/drawer/index.tsx","../src/components/editable-text/index.tsx","../src/components/expandable-text/index.tsx","../src/components/file-input/index.tsx","../src/components/file-input/components/file-item/index.tsx","../src/components/firebase-token-handler/index.tsx","../src/components/form/index.tsx","../src/components/icon/index.tsx","../src/components/input/index.tsx","../src/components/item-not-found/index.tsx","../src/components/list-item/index.tsx","../src/components/list-item/components/page-button/index.tsx","../src/components/list-item/components/pagination/index.tsx","../src/components/loader/index.tsx","../src/components/log-activities-container/index.tsx","../src/components/log-activities-container/log-activities-list/index.tsx","../src/components/log-activities-container/log-activity-item/index.tsx","../src/components/log-activities-container/use-log-activities/index.tsx","../src/components/menu/index.tsx","../src/components/menu/menu-item/index.tsx","../src/components/modal/index.tsx","../src/components/month-calendar/index.tsx","../src/components/native-menu/index.tsx","../src/components/native-menu/native-menu-item/index.tsx","../src/components/not-authorized/index.tsx","../src/components/notifications-menu/index.tsx","../src/components/otp-input/index.tsx","../src/components/paper/index.tsx","../src/components/progress-bar/index.tsx","../src/components/radio-button/index.tsx","../src/components/search-input/index.tsx","../src/components/searchable-select/index.tsx","../src/components/select/selectchips.tsx","../src/components/select/selectcontrol.tsx","../src/components/select/selectdropdowncontent.tsx","../src/components/select/selectplaceholder.tsx","../src/components/select/selecttypes.ts","../src/components/select/selectview.tsx","../src/components/select/index.tsx","../src/components/select/useselectportal.ts","../src/components/skeleton/index.tsx","../src/components/stacked-avatars/index.tsx","../src/components/tab/index.tsx","../src/components/table/index.tsx","../src/components/text-editor/index.tsx","../src/components/text-editor/components/toolbar/index.tsx","../src/components/text-editor/utils/index.ts","../src/components/textarea/index.tsx","../src/components/toggle/index.tsx","../src/components/tooltip/index.tsx","../src/components/tree-checkbox/index.tsx","../src/components/tree-checkbox/components/tree-checkbox-item/index.tsx","../src/components/tree-checkbox/utils/index.ts","../src/components/week-calendar/index.tsx","../src/constants/index.ts","../src/hooks/list-items-hook/types.ts","../src/hooks/list-items-hook/usebulkactions.ts","../src/hooks/list-items-hook/usefilters.ts","../src/hooks/list-items-hook/usepagination.ts","../src/hooks/use-has-permission-access/index.ts","../src/hooks/use-translation/index.ts","../src/hooks/user-has-application-access/index.ts","../src/middleware/must-auth/index.tsx","../src/services/index.ts","../src/services/remote-service/index.ts","../src/utils/auth-axios/index.ts","../src/utils/axios/index.ts","../src/utils/color/index.ts","../src/utils/cookie/index.ts","../src/utils/device/index.ts","../src/utils/file/index.ts","../src/utils/firebase-client/firebase.ts","../src/utils/firebase-client/index.ts","../src/utils/firebase-client/types.ts","../src/utils/jwt/index.ts","../src/utils/notification-localstorage/index.ts","../src/utils/validation/index.ts"],"version":"5.6.3"}
|
|
@@ -36,11 +36,11 @@ export const createInstance = (baseURL, options = {
|
|
|
36
36
|
axiosInstance.interceptors.response.use((response) => {
|
|
37
37
|
return response.data;
|
|
38
38
|
}, (error) => {
|
|
39
|
-
var _a, _b, _c
|
|
39
|
+
var _a, _b, _c;
|
|
40
40
|
console.log("General error\n", error);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
const message = error.message.toLowerCase() === "network error"
|
|
42
|
+
? error.message
|
|
43
|
+
: String((_b = (_a = error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message);
|
|
44
44
|
console.log("General Message\n", message);
|
|
45
45
|
options.onError && options.onError(message);
|
|
46
46
|
if ([
|
|
@@ -51,7 +51,7 @@ export const createInstance = (baseURL, options = {
|
|
|
51
51
|
removeCookie(options.JWTTokenKey, options.cookieDomain);
|
|
52
52
|
window.location.reload();
|
|
53
53
|
}
|
|
54
|
-
return Promise.reject((
|
|
54
|
+
return Promise.reject((_c = error.response) === null || _c === void 0 ? void 0 : _c.data);
|
|
55
55
|
});
|
|
56
56
|
return axiosInstance;
|
|
57
57
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sea-react-components",
|
|
3
3
|
"description": "SEA react components library",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.28",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "tsc --build && npx postcss src/styles.css -o dist/styles.css && npx postcss src/components/text-editor/style.css -o dist/components/text-editor/style.css",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"jwt-decode": "^4.0.0",
|
|
49
49
|
"lowlight": "^3.3.0",
|
|
50
50
|
"react-dom": "^18.3.1",
|
|
51
|
-
"sea-platform-helpers": "^1.5.
|
|
51
|
+
"sea-platform-helpers": "^1.5.23",
|
|
52
52
|
"sea-react-components": "file:",
|
|
53
53
|
"uuid": "^13.0.0",
|
|
54
54
|
"yup": "^1.5.0"
|