@iblai/iblai-js 1.26.0 → 1.26.1
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.
|
@@ -63070,7 +63070,8 @@ var projectsProjectsPage$3 = {
|
|
|
63070
63070
|
"delete": "Delete",
|
|
63071
63071
|
agentCount: "{count} {count, plural, one {agent} other {agents}}",
|
|
63072
63072
|
noProjectsFound: "No projects found",
|
|
63073
|
-
createFirstProject: "Create your first project"
|
|
63073
|
+
createFirstProject: "Create your first project",
|
|
63074
|
+
searching: "Searching..."
|
|
63074
63075
|
};
|
|
63075
63076
|
var projectsRenameProjectModal$3 = {
|
|
63076
63077
|
title: "Rename Project",
|
|
@@ -68451,7 +68452,8 @@ var projectsProjectsPage$2 = {
|
|
|
68451
68452
|
"delete": "Supprimer",
|
|
68452
68453
|
agentCount: "{count} {count, plural, one {agent} other {agents}}",
|
|
68453
68454
|
noProjectsFound: "Aucun projet trouvé",
|
|
68454
|
-
createFirstProject: "Créer votre premier projet"
|
|
68455
|
+
createFirstProject: "Créer votre premier projet",
|
|
68456
|
+
searching: "Recherche..."
|
|
68455
68457
|
};
|
|
68456
68458
|
var projectsRenameProjectModal$2 = {
|
|
68457
68459
|
title: "Renommer le projet",
|
|
@@ -73832,7 +73834,8 @@ var projectsProjectsPage$1 = {
|
|
|
73832
73834
|
"delete": "Eliminar",
|
|
73833
73835
|
agentCount: "{count} {count, plural, one {agente} other {agentes}}",
|
|
73834
73836
|
noProjectsFound: "No se encontraron proyectos",
|
|
73835
|
-
createFirstProject: "Crear tu primer proyecto"
|
|
73837
|
+
createFirstProject: "Crear tu primer proyecto",
|
|
73838
|
+
searching: "Buscando..."
|
|
73836
73839
|
};
|
|
73837
73840
|
var projectsRenameProjectModal$1 = {
|
|
73838
73841
|
title: "Renombrar proyecto",
|
|
@@ -79213,7 +79216,8 @@ var projectsProjectsPage = {
|
|
|
79213
79216
|
"delete": "删除",
|
|
79214
79217
|
agentCount: "{count} 个代理",
|
|
79215
79218
|
noProjectsFound: "未找到项目",
|
|
79216
|
-
createFirstProject: "创建您的第一个项目"
|
|
79219
|
+
createFirstProject: "创建您的第一个项目",
|
|
79220
|
+
searching: "搜索中..."
|
|
79217
79221
|
};
|
|
79218
79222
|
var projectsRenameProjectModal = {
|
|
79219
79223
|
title: "重命名项目",
|
|
@@ -223638,6 +223642,57 @@ function CreditBalance({ tenant, username, mainPlatformKey, currentUserEmail, re
|
|
|
223638
223642
|
: t('creditBalance.manageBilling')] })) }))] }), jsx(AutoRechargeModal, { tenant: tenant, isOpen: isAutoRechargeModalOpen, onClose: () => setIsAutoRechargeModalOpen(false) }), jsx(AddCreditsModal, { tenant: tenant, isOpen: isAddCreditsModalOpen, onClose: () => setIsAddCreditsModalOpen(false) }), jsx(AppleRestrictionModal, { isOpen: isAppleRestrictionModalOpen, onClose: () => setIsAppleRestrictionModalOpen(false) })] }));
|
|
223639
223643
|
}
|
|
223640
223644
|
|
|
223645
|
+
function c(e,u,c){var i=this,a=useRef(null),o=useRef(0),f=useRef(null),l=useRef([]),v=useRef(),m=useRef(),d=useRef(e),g=useRef(true);d.current=e;var p="undefined"!=typeof window,w=!u&&0!==u&&p;if("function"!=typeof e)throw new TypeError("Expected a function");u=+u||0;var s=!!(c=c||{}).leading,x=!("trailing"in c)||!!c.trailing,h="maxWait"in c,y="debounceOnServer"in c&&!!c.debounceOnServer,F=h?Math.max(+c.maxWait||0,u):null;useEffect(function(){return g.current=true,function(){g.current=false;}},[]);var A=useMemo(function(){var r=function(r){var n=l.current,t=v.current;return l.current=v.current=null,o.current=r,m.current=d.current.apply(t,n)},n=function(r,n){w&&cancelAnimationFrame(f.current),f.current=w?requestAnimationFrame(r):setTimeout(r,n);},t=function(r){if(!g.current)return false;var n=r-a.current;return !a.current||n>=u||n<0||h&&r-o.current>=F},e=function(n){return f.current=null,x&&l.current?r(n):(l.current=v.current=null,m.current)},c=function r(){var c=Date.now();if(t(c))return e(c);if(g.current){var i=u-(c-a.current),f=h?Math.min(i,F-(c-o.current)):i;n(r,f);}},A=function(){if(p||y){var e=Date.now(),d=t(e);if(l.current=[].slice.call(arguments),v.current=i,a.current=e,d){if(!f.current&&g.current)return o.current=a.current,n(c,u),s?r(a.current):m.current;if(h)return n(c,u),r(a.current)}return f.current||n(c,u),m.current}};return A.cancel=function(){f.current&&(w?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=v.current=f.current=null;},A.isPending=function(){return !!f.current},A.flush=function(){return f.current?e(Date.now()):m.current},A},[s,h,u,F,x,w,p,y]);return A}function i(r,n){return r===n}function a(n,t,a){var o=i,f=useRef(n),l=useState({})[1],v=c(useCallback(function(r){f.current=r,l({});},[l]),t,a),m=useRef(n);return o(m.current,n)||(v(n),m.current=n),[f.current,v]}
|
|
223646
|
+
|
|
223647
|
+
const DEFAULT_ITEMS_PER_PAGE = 10;
|
|
223648
|
+
const DEFAULT_DEBOUNCE_MS = 500;
|
|
223649
|
+
/** Manages the projects list: debounced search, pagination, and the paged query. */
|
|
223650
|
+
function useProjects({ tenantKey, username, itemsPerPage = DEFAULT_ITEMS_PER_PAGE, debounceMs = DEFAULT_DEBOUNCE_MS, }) {
|
|
223651
|
+
var _a, _b;
|
|
223652
|
+
const [searchValue, setSearchValue] = useState('');
|
|
223653
|
+
const [debouncedSearch] = a(searchValue, debounceMs);
|
|
223654
|
+
const [currentPage, setCurrentPage] = useState(1);
|
|
223655
|
+
// A new search yields a different result set, so any page beyond the first is
|
|
223656
|
+
// meaningless. This is adjusted during render rather than in an effect so that
|
|
223657
|
+
// `page` is already correct on this pass — an effect would let the query fire
|
|
223658
|
+
// once for the stale offset before the reset landed.
|
|
223659
|
+
const [prevDebouncedSearch, setPrevDebouncedSearch] = useState(debouncedSearch);
|
|
223660
|
+
let page = currentPage;
|
|
223661
|
+
if (prevDebouncedSearch !== debouncedSearch) {
|
|
223662
|
+
setPrevDebouncedSearch(debouncedSearch);
|
|
223663
|
+
setCurrentPage(1);
|
|
223664
|
+
page = 1;
|
|
223665
|
+
}
|
|
223666
|
+
const { data, isLoading, isFetching, error } = useGetUserProjectsQuery({
|
|
223667
|
+
tenantKey,
|
|
223668
|
+
username,
|
|
223669
|
+
params: {
|
|
223670
|
+
limit: itemsPerPage,
|
|
223671
|
+
offset: (page - 1) * itemsPerPage,
|
|
223672
|
+
search: debouncedSearch || undefined,
|
|
223673
|
+
},
|
|
223674
|
+
}, { skip: !username || !tenantKey });
|
|
223675
|
+
const projects = (_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : [];
|
|
223676
|
+
const totalPages = Math.ceil(((_b = data === null || data === void 0 ? void 0 : data.count) !== null && _b !== void 0 ? _b : 0) / itemsPerPage);
|
|
223677
|
+
// Spans the debounce window (searchValue ahead of debouncedSearch) and the
|
|
223678
|
+
// fetch that follows. Gated on an active term so paging an unfiltered list
|
|
223679
|
+
// doesn't register as searching.
|
|
223680
|
+
const isSearching = searchValue !== debouncedSearch || (isFetching && debouncedSearch !== '');
|
|
223681
|
+
return {
|
|
223682
|
+
projects,
|
|
223683
|
+
totalPages,
|
|
223684
|
+
page,
|
|
223685
|
+
setPage: setCurrentPage,
|
|
223686
|
+
searchValue,
|
|
223687
|
+
setSearchValue,
|
|
223688
|
+
debouncedSearch,
|
|
223689
|
+
isLoading,
|
|
223690
|
+
isFetching,
|
|
223691
|
+
isSearching,
|
|
223692
|
+
error,
|
|
223693
|
+
};
|
|
223694
|
+
}
|
|
223695
|
+
|
|
223641
223696
|
const CreateProjectModal$1 = lazy(() => Promise.resolve().then(function () { return createProjectModal; }).then((mod) => ({
|
|
223642
223697
|
default: mod.CreateProjectModal,
|
|
223643
223698
|
})));
|
|
@@ -223649,19 +223704,10 @@ const DeleteProjectModal$1 = lazy(() => Promise.resolve().then(function () { ret
|
|
|
223649
223704
|
})));
|
|
223650
223705
|
function ProjectsPage({ tenantKey, username, onOpenProject, navigateToMentorInProject, executeWithTrialCheck = (fn) => fn(), }) {
|
|
223651
223706
|
const t = useT();
|
|
223652
|
-
const
|
|
223707
|
+
const { projects, totalPages, page, setPage, searchValue, setSearchValue, isLoading, isFetching, isSearching, error, } = useProjects({ tenantKey, username });
|
|
223653
223708
|
const [isCreateModalOpen, setIsCreateModalOpen] = useState(false);
|
|
223654
223709
|
const [renameModalData, setRenameModalData] = useState({ isOpen: false, projectId: '', currentName: '' });
|
|
223655
223710
|
const [deleteModalData, setDeleteModalData] = useState({ isOpen: false, projectId: '', projectName: '' });
|
|
223656
|
-
const { data, isLoading, error } = useGetUserProjectsQuery({
|
|
223657
|
-
tenantKey: tenantKey,
|
|
223658
|
-
username: username,
|
|
223659
|
-
params: {
|
|
223660
|
-
limit: 50,
|
|
223661
|
-
search: searchValue || undefined,
|
|
223662
|
-
},
|
|
223663
|
-
}, { skip: !username || !tenantKey });
|
|
223664
|
-
const projects = useMemo(() => { var _a; return (_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : []; }, [data]);
|
|
223665
223711
|
const handleRenameProject = (projectId, currentName) => {
|
|
223666
223712
|
setRenameModalData({ isOpen: true, projectId, currentName });
|
|
223667
223713
|
};
|
|
@@ -223677,13 +223723,13 @@ function ProjectsPage({ tenantKey, username, onOpenProject, navigateToMentorInPr
|
|
|
223677
223723
|
if (error) {
|
|
223678
223724
|
return (jsx("div", { className: "flex h-full items-center justify-center", children: jsxs("div", { className: "text-center", children: [jsx(CircleAlert, { className: "mx-auto mb-4 h-12 w-12 text-red-500" }), jsx("p", { className: "text-gray-600", children: t('projectsProjectsPage.failedToLoadProjects') })] }) }));
|
|
223679
223725
|
}
|
|
223680
|
-
return (jsxs("div", { className: "flex h-full overflow-hidden", children: [jsx("div", { className: "scrollbar-hide flex-1 overflow-y-auto", children: jsxs("div", { className: "mx-auto max-w-[920px] px-3 py-6 md:px-6 md:py-8", children: [jsxs("div", { className: "mb-6", children: [jsx("h1", { className: "mb-2 text-2xl font-semibold text-gray-700", children: t('projectsProjectsPage.heading') }), jsx("p", { className: "text-sm text-gray-600", children: t('projectsProjectsPage.subheading') })] }), jsxs("div", { className: "mb-6 flex flex-col gap-4 sm:flex-row", children: [jsxs("div", { className: "relative flex-1", children: [jsx(Search, { className: "absolute top-1/2 left-4 h-5 w-5 -translate-y-1/2 transform text-gray-400" }), jsx(Input, { placeholder: t('projectsProjectsPage.searchPlaceholder'), value: searchValue, onChange: (e) => setSearchValue(e.target.value), className:
|
|
223726
|
+
return (jsxs("div", { className: "flex h-full overflow-hidden", children: [jsx("div", { className: "scrollbar-hide flex-1 overflow-y-auto", children: jsxs("div", { className: "mx-auto max-w-[920px] px-3 py-6 md:px-6 md:py-8", children: [jsxs("div", { className: "mb-6", children: [jsx("h1", { className: "mb-2 text-2xl font-semibold text-gray-700", children: t('projectsProjectsPage.heading') }), jsx("p", { className: "text-sm text-gray-600", children: t('projectsProjectsPage.subheading') })] }), jsxs("div", { className: "mb-6 flex flex-col gap-4 sm:flex-row", children: [jsxs("div", { className: "relative flex-1", children: [jsx(Search, { className: "absolute top-1/2 left-4 h-5 w-5 -translate-y-1/2 transform text-gray-400" }), jsx(Input, { placeholder: t('projectsProjectsPage.searchPlaceholder'), value: searchValue, onChange: (e) => setSearchValue(e.target.value), className: `w-full rounded-lg border-gray-300 py-3 pl-12 text-base focus:border-blue-500 focus:ring-2 focus:ring-blue-500 ${isSearching ? 'pr-11' : 'pr-4'}` }), isSearching && (jsx(LoaderCircle, { role: "status", "aria-label": t('projectsProjectsPage.searching'), className: "absolute top-1/2 right-4 h-5 w-5 -translate-y-1/2 transform animate-spin text-blue-500" }))] }), jsxs(Button$1, { className: "rounded-lg bg-gradient-to-r from-[#38A1E5] to-[#7284FF] px-6 py-3 whitespace-nowrap text-white hover:from-[#2E8BD1] hover:to-[#5F6FE8]", onClick: () => executeWithTrialCheck(() => setIsCreateModalOpen(true)), children: [jsx(Plus, { className: "mr-2 h-5 w-5" }), t('projectsProjectsPage.newProject')] })] }), isLoading ? (jsx("div", { className: "flex items-center justify-center py-12", children: jsx(LoaderCircle, { className: "h-8 w-8 animate-spin text-gray-400" }) })) : (jsxs(Fragment$1, { children: [jsx("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-2", children: projects.map((project) => (jsx(Card, { className: "cursor-pointer rounded-lg border border-[#D0E0FF] bg-[#F5F8FF] transition-shadow hover:shadow-md", onClick: () => executeWithTrialCheck(() => onOpenProject(project)), children: jsxs(CardContent, { className: "p-6", children: [jsxs("div", { className: "mb-3 flex items-start justify-between gap-2", children: [jsx("h3", { className: "text-base font-semibold text-gray-900", children: project.name }), jsxs(DropdownMenu, { modal: false, children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsx(Button$1, { variant: "ghost", size: "icon", className: "h-7 w-7 flex-shrink-0 text-gray-500 hover:bg-[#c9d8f8]", "aria-label": t('projectsProjectsPage.projectActions'), onClick: (e) => e.stopPropagation(), children: jsx(EllipsisVertical, { className: "h-4 w-4" }) }) }), jsxs(DropdownMenuContent, { align: "end", onClick: (e) => e.stopPropagation(), children: [jsxs(DropdownMenuItem, { onClick: (e) => {
|
|
223681
223727
|
e.stopPropagation();
|
|
223682
223728
|
executeWithTrialCheck(() => handleRenameProject(String(project.id), project.name));
|
|
223683
|
-
}, children: [jsx(Pencil, { className: "mr-2 h-4 w-4" }), t('projectsProjectsPage.rename')] }), jsxs(DropdownMenuItem, {
|
|
223729
|
+
}, children: [jsx(Pencil, { className: "mr-2 h-4 w-4" }), t('projectsProjectsPage.rename')] }), jsxs(DropdownMenuItem, { onClick: (e) => {
|
|
223684
223730
|
e.stopPropagation();
|
|
223685
223731
|
executeWithTrialCheck(() => handleDeleteProject(String(project.id), project.name));
|
|
223686
|
-
}, children: [jsx(Trash2, { className: "mr-2 h-4 w-4" }), t('projectsProjectsPage.delete')] })] })] })] }), jsx("div", { className: "flex items-center text-xs text-gray-500", children: jsx("span", { children: t('projectsProjectsPage.agentCount', { count: project.mentor_count }) }) })] }) }, project.id))) }), projects.length === 0 && !
|
|
223732
|
+
}, children: [jsx(Trash2, { className: "mr-2 h-4 w-4" }), t('projectsProjectsPage.delete')] })] })] })] }), jsx("div", { className: "flex items-center text-xs text-gray-500", children: jsx("span", { children: t('projectsProjectsPage.agentCount', { count: project.mentor_count }) }) })] }) }, project.id))) }), totalPages > 1 && (jsx("div", { className: "mt-8", children: jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isFetching }) })), projects.length === 0 && !isFetching && (jsxs("div", { className: "py-12 text-center", children: [jsx("p", { className: "mb-4 text-gray-500", children: t('projectsProjectsPage.noProjectsFound') }), jsxs(Button$1, { variant: "outline", onClick: () => executeWithTrialCheck(() => setIsCreateModalOpen(true)), className: "border-gray-300", children: [jsx(Plus, { className: "mr-2 h-4 w-4" }), t('projectsProjectsPage.createFirstProject')] })] }))] }))] }) }), isCreateModalOpen && (jsx(Suspense, { fallback: null, children: jsx(CreateProjectModal$1, { isOpen: isCreateModalOpen, onClose: () => setIsCreateModalOpen(false), tenantKey: tenantKey, username: username, navigateToMentorInProject: navigateToMentorInProject }) })), renameModalData.isOpen && (jsx(Suspense, { fallback: null, children: jsx(RenameProjectModal$1, { isOpen: renameModalData.isOpen, onClose: handleCloseRenameModal, projectId: renameModalData.projectId, currentName: renameModalData.currentName, tenantKey: tenantKey, username: username }) })), deleteModalData.isOpen && (jsx(Suspense, { fallback: null, children: jsx(DeleteProjectModal$1, { isOpen: deleteModalData.isOpen, onClose: handleCloseDeleteModal, projectId: deleteModalData.projectId, projectName: deleteModalData.projectName, tenantKey: tenantKey, username: username }) }))] }));
|
|
223687
223733
|
}
|
|
223688
223734
|
|
|
223689
223735
|
const DeepSearchIcon = ({ className }) => (jsx("svg", { width: "30", height: "30", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, children: jsx("path", { d: "M17.2743 17.9886C17.2743 16.7316 16.2549 15.7124 14.9979 15.7122C13.7408 15.7122 12.7216 16.7315 12.7216 17.9886C12.7217 19.2456 13.7409 20.265 14.9979 20.265C16.2549 20.2649 17.2742 19.2456 17.2743 17.9886ZM5.70935 13.0653C4.92914 13.39 4.52833 14.2595 4.78943 15.0633L5.28895 16.5971L5.34607 16.748C5.6666 17.4806 6.48392 17.8782 7.26941 17.6576L10.9535 16.6205C11.5241 14.9329 13.1178 13.7171 14.9979 13.7171C16.0406 13.7172 16.9956 14.0911 17.7372 14.7118L19.6386 14.1771L19.5404 13.9208L17.6493 8.10094L5.70935 13.0653ZM21.893 4.58677L21.7011 4.62925L20.456 5.03356C19.6044 5.31043 19.1378 6.22539 19.4144 7.077L21.4389 13.3041L21.4974 13.4593C21.8292 14.2111 22.6839 14.605 23.4824 14.3456L24.7274 13.9398L24.9062 13.8607C25.2414 13.6704 25.433 13.2961 25.3895 12.9129L25.3485 12.7225L22.9199 5.24888C22.7753 4.80483 22.3397 4.53635 21.893 4.58677ZM19.2695 17.9886C19.2693 19.382 18.5982 20.6148 17.5658 21.3944L20.4267 25.9706L20.516 26.1522C20.6781 26.5869 20.519 27.0905 20.1102 27.3461C19.7015 27.6015 19.179 27.524 18.8592 27.1878L18.7347 27.0282L15.7128 22.1942C15.48 22.2335 15.2418 22.26 14.9979 22.2602C14.7526 22.2602 14.5127 22.2339 14.2787 22.1942L11.2582 27.0282L11.1337 27.1878C10.8139 27.524 10.2914 27.6015 9.8827 27.3461C9.41571 27.054 9.27436 26.4377 9.56629 25.9706L12.4257 21.3929C11.5843 20.7564 10.9867 19.8186 10.7953 18.7371L7.80994 19.578C6.05816 20.0706 4.23476 19.1844 3.51941 17.5506L3.39197 17.2137L2.89246 15.68C2.3098 13.8868 3.20363 11.9463 4.94471 11.2225L17.3813 6.05015C17.5755 4.73435 18.4886 3.5757 19.8393 3.13658L21.0858 2.73082L21.3773 2.6517C22.8447 2.33417 24.3429 3.17504 24.8168 4.63364L27.2456 12.1058L27.3246 12.3988C27.6204 13.7681 26.9088 15.1646 25.6269 15.7298L25.3442 15.8382L24.0975 16.2425C23.031 16.5888 21.9203 16.4129 21.0419 15.8558L18.9735 16.4358C19.1618 16.9175 19.2695 17.4404 19.2695 17.9886Z", fill: "currentColor" }) }));
|
|
@@ -223770,8 +223816,6 @@ function ProjectMentorsList({ projectMentors, onMentorRemoved, onAddMentorClick,
|
|
|
223770
223816
|
}) }), showMinimumMentorAlert && (jsx(Suspense, { fallback: null, children: jsx(MinimumMentorAlert$1, { open: showMinimumMentorAlert, onOpenChange: setShowMinimumMentorAlert }) }))] }));
|
|
223771
223817
|
}
|
|
223772
223818
|
|
|
223773
|
-
function c(e,u,c){var i=this,a=useRef(null),o=useRef(0),f=useRef(null),l=useRef([]),v=useRef(),m=useRef(),d=useRef(e),g=useRef(true);d.current=e;var p="undefined"!=typeof window,w=!u&&0!==u&&p;if("function"!=typeof e)throw new TypeError("Expected a function");u=+u||0;var s=!!(c=c||{}).leading,x=!("trailing"in c)||!!c.trailing,h="maxWait"in c,y="debounceOnServer"in c&&!!c.debounceOnServer,F=h?Math.max(+c.maxWait||0,u):null;useEffect(function(){return g.current=true,function(){g.current=false;}},[]);var A=useMemo(function(){var r=function(r){var n=l.current,t=v.current;return l.current=v.current=null,o.current=r,m.current=d.current.apply(t,n)},n=function(r,n){w&&cancelAnimationFrame(f.current),f.current=w?requestAnimationFrame(r):setTimeout(r,n);},t=function(r){if(!g.current)return false;var n=r-a.current;return !a.current||n>=u||n<0||h&&r-o.current>=F},e=function(n){return f.current=null,x&&l.current?r(n):(l.current=v.current=null,m.current)},c=function r(){var c=Date.now();if(t(c))return e(c);if(g.current){var i=u-(c-a.current),f=h?Math.min(i,F-(c-o.current)):i;n(r,f);}},A=function(){if(p||y){var e=Date.now(),d=t(e);if(l.current=[].slice.call(arguments),v.current=i,a.current=e,d){if(!f.current&&g.current)return o.current=a.current,n(c,u),s?r(a.current):m.current;if(h)return n(c,u),r(a.current)}return f.current||n(c,u),m.current}};return A.cancel=function(){f.current&&(w?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=v.current=f.current=null;},A.isPending=function(){return !!f.current},A.flush=function(){return f.current?e(Date.now()):m.current},A},[s,h,u,F,x,w,p,y]);return A}function i(r,n){return r===n}function a(n,t,a){var o=i,f=useRef(n),l=useState({})[1],v=c(useCallback(function(r){f.current=r,l({});},[l]),t,a),m=useRef(n);return o(m.current,n)||(v(n),m.current=n),[f.current,v]}
|
|
223774
|
-
|
|
223775
223819
|
const AgentSettingsContext = React__default.createContext(null);
|
|
223776
223820
|
function AgentSettingsProvider({ children, ...value }) {
|
|
223777
223821
|
const ctx = React__default.useMemo(() => value,
|
|
@@ -100301,7 +100301,8 @@ var projectsProjectsPage$3 = {
|
|
|
100301
100301
|
"delete": "Delete",
|
|
100302
100302
|
agentCount: "{count} {count, plural, one {agent} other {agents}}",
|
|
100303
100303
|
noProjectsFound: "No projects found",
|
|
100304
|
-
createFirstProject: "Create your first project"
|
|
100304
|
+
createFirstProject: "Create your first project",
|
|
100305
|
+
searching: "Searching..."
|
|
100305
100306
|
};
|
|
100306
100307
|
var projectsRenameProjectModal$3 = {
|
|
100307
100308
|
title: "Rename Project",
|
|
@@ -105682,7 +105683,8 @@ var projectsProjectsPage$2 = {
|
|
|
105682
105683
|
"delete": "Supprimer",
|
|
105683
105684
|
agentCount: "{count} {count, plural, one {agent} other {agents}}",
|
|
105684
105685
|
noProjectsFound: "Aucun projet trouvé",
|
|
105685
|
-
createFirstProject: "Créer votre premier projet"
|
|
105686
|
+
createFirstProject: "Créer votre premier projet",
|
|
105687
|
+
searching: "Recherche..."
|
|
105686
105688
|
};
|
|
105687
105689
|
var projectsRenameProjectModal$2 = {
|
|
105688
105690
|
title: "Renommer le projet",
|
|
@@ -111063,7 +111065,8 @@ var projectsProjectsPage$1 = {
|
|
|
111063
111065
|
"delete": "Eliminar",
|
|
111064
111066
|
agentCount: "{count} {count, plural, one {agente} other {agentes}}",
|
|
111065
111067
|
noProjectsFound: "No se encontraron proyectos",
|
|
111066
|
-
createFirstProject: "Crear tu primer proyecto"
|
|
111068
|
+
createFirstProject: "Crear tu primer proyecto",
|
|
111069
|
+
searching: "Buscando..."
|
|
111067
111070
|
};
|
|
111068
111071
|
var projectsRenameProjectModal$1 = {
|
|
111069
111072
|
title: "Renombrar proyecto",
|
|
@@ -116444,7 +116447,8 @@ var projectsProjectsPage = {
|
|
|
116444
116447
|
"delete": "删除",
|
|
116445
116448
|
agentCount: "{count} 个代理",
|
|
116446
116449
|
noProjectsFound: "未找到项目",
|
|
116447
|
-
createFirstProject: "创建您的第一个项目"
|
|
116450
|
+
createFirstProject: "创建您的第一个项目",
|
|
116451
|
+
searching: "搜索中..."
|
|
116448
116452
|
};
|
|
116449
116453
|
var projectsRenameProjectModal = {
|
|
116450
116454
|
title: "重命名项目",
|
|
@@ -248514,6 +248518,8 @@ function getLLMProviderDetails(llmProvider, llmName) {
|
|
|
248514
248518
|
}
|
|
248515
248519
|
}
|
|
248516
248520
|
|
|
248521
|
+
function c$3(e,u,c){var i=this,a=useRef(null),o=useRef(0),f=useRef(null),l=useRef([]),v=useRef(),m=useRef(),d=useRef(e),g=useRef(true);d.current=e;var p="undefined"!=typeof window,w=!u&&0!==u&&p;if("function"!=typeof e)throw new TypeError("Expected a function");u=+u||0;var s=!!(c=c||{}).leading,x=!("trailing"in c)||!!c.trailing,h="maxWait"in c,y="debounceOnServer"in c&&!!c.debounceOnServer,F=h?Math.max(+c.maxWait||0,u):null;useEffect(function(){return g.current=true,function(){g.current=false;}},[]);var A=useMemo(function(){var r=function(r){var n=l.current,t=v.current;return l.current=v.current=null,o.current=r,m.current=d.current.apply(t,n)},n=function(r,n){w&&cancelAnimationFrame(f.current),f.current=w?requestAnimationFrame(r):setTimeout(r,n);},t=function(r){if(!g.current)return false;var n=r-a.current;return !a.current||n>=u||n<0||h&&r-o.current>=F},e=function(n){return f.current=null,x&&l.current?r(n):(l.current=v.current=null,m.current)},c=function r(){var c=Date.now();if(t(c))return e(c);if(g.current){var i=u-(c-a.current),f=h?Math.min(i,F-(c-o.current)):i;n(r,f);}},A=function(){if(p||y){var e=Date.now(),d=t(e);if(l.current=[].slice.call(arguments),v.current=i,a.current=e,d){if(!f.current&&g.current)return o.current=a.current,n(c,u),s?r(a.current):m.current;if(h)return n(c,u),r(a.current)}return f.current||n(c,u),m.current}};return A.cancel=function(){f.current&&(w?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=v.current=f.current=null;},A.isPending=function(){return !!f.current},A.flush=function(){return f.current?e(Date.now()):m.current},A},[s,h,u,F,x,w,p,y]);return A}function i$8(r,n){return r===n}function a$3(n,t,a){var o=i$8,f=useRef(n),l=useState({})[1],v=c$3(useCallback(function(r){f.current=r,l({});},[l]),t,a),m=useRef(n);return o(m.current,n)||(v(n),m.current=n),[f.current,v]}
|
|
248522
|
+
|
|
248517
248523
|
lazy(() => Promise.resolve().then(function () { return createProjectModal; }).then((mod) => ({
|
|
248518
248524
|
default: mod.CreateProjectModal,
|
|
248519
248525
|
})));
|
|
@@ -248608,8 +248614,6 @@ function ProjectMentorsList({ projectMentors, onMentorRemoved, onAddMentorClick,
|
|
|
248608
248614
|
}) }), showMinimumMentorAlert && (jsx(Suspense, { fallback: null, children: jsx(MinimumMentorAlert$1, { open: showMinimumMentorAlert, onOpenChange: setShowMinimumMentorAlert }) }))] }));
|
|
248609
248615
|
}
|
|
248610
248616
|
|
|
248611
|
-
function c$3(e,u,c){var i=this,a=useRef(null),o=useRef(0),f=useRef(null),l=useRef([]),v=useRef(),m=useRef(),d=useRef(e),g=useRef(true);d.current=e;var p="undefined"!=typeof window,w=!u&&0!==u&&p;if("function"!=typeof e)throw new TypeError("Expected a function");u=+u||0;var s=!!(c=c||{}).leading,x=!("trailing"in c)||!!c.trailing,h="maxWait"in c,y="debounceOnServer"in c&&!!c.debounceOnServer,F=h?Math.max(+c.maxWait||0,u):null;useEffect(function(){return g.current=true,function(){g.current=false;}},[]);var A=useMemo(function(){var r=function(r){var n=l.current,t=v.current;return l.current=v.current=null,o.current=r,m.current=d.current.apply(t,n)},n=function(r,n){w&&cancelAnimationFrame(f.current),f.current=w?requestAnimationFrame(r):setTimeout(r,n);},t=function(r){if(!g.current)return false;var n=r-a.current;return !a.current||n>=u||n<0||h&&r-o.current>=F},e=function(n){return f.current=null,x&&l.current?r(n):(l.current=v.current=null,m.current)},c=function r(){var c=Date.now();if(t(c))return e(c);if(g.current){var i=u-(c-a.current),f=h?Math.min(i,F-(c-o.current)):i;n(r,f);}},A=function(){if(p||y){var e=Date.now(),d=t(e);if(l.current=[].slice.call(arguments),v.current=i,a.current=e,d){if(!f.current&&g.current)return o.current=a.current,n(c,u),s?r(a.current):m.current;if(h)return n(c,u),r(a.current)}return f.current||n(c,u),m.current}};return A.cancel=function(){f.current&&(w?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=v.current=f.current=null;},A.isPending=function(){return !!f.current},A.flush=function(){return f.current?e(Date.now()):m.current},A},[s,h,u,F,x,w,p,y]);return A}function i$8(r,n){return r===n}function a$3(n,t,a){var o=i$8,f=useRef(n),l=useState({})[1],v=c$3(useCallback(function(r){f.current=r,l({});},[l]),t,a),m=useRef(n);return o(m.current,n)||(v(n),m.current=n),[f.current,v]}
|
|
248612
|
-
|
|
248613
248617
|
const AgentSettingsContext = React__default.createContext(null);
|
|
248614
248618
|
function AgentSettingsProvider({ children, ...value }) {
|
|
248615
248619
|
const ctx = React__default.useMemo(() => value,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iblai/iblai-js",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.1",
|
|
4
4
|
"description": "Unified JavaScript SDK for IBL.ai — re-exports data-layer, web-containers, and web-utils under a single package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"winston": "3.19.0",
|
|
69
69
|
"@iblai/data-layer": "1.9.3",
|
|
70
70
|
"@iblai/mcp": "1.8.0",
|
|
71
|
-
"@iblai/web-containers": "1.15.
|
|
71
|
+
"@iblai/web-containers": "1.15.1",
|
|
72
72
|
"@iblai/web-utils": "1.13.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|