@iblai/iblai-js 2.3.15 → 2.3.16
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.
|
@@ -148070,14 +148070,15 @@ const PAGE_SIZE$3 = 20;
|
|
|
148070
148070
|
const SEARCH_DEBOUNCE_MS$1 = 300;
|
|
148071
148071
|
/**
|
|
148072
148072
|
* The public application URL on the auth SPA for one form of a platform
|
|
148073
|
-
* (`<auth-url>/applications/<platform-key>/<form-id>?
|
|
148074
|
-
* the auth SPA URL cannot be resolved. `authSpaUrl` (prop) wins;
|
|
148075
|
-
* runtime-injected env (`window.__ENV__.NEXT_PUBLIC_AUTH_URL`) is
|
|
148076
|
-
* `formId` the link resolves the platform's default form (404
|
|
148077
|
-
* `
|
|
148078
|
-
*
|
|
148079
|
-
|
|
148080
|
-
|
|
148073
|
+
* (`<auth-url>/applications/<platform-key>/<form-id>?redirect-to=<origin>`), or
|
|
148074
|
+
* null when the auth SPA URL cannot be resolved. `authSpaUrl` (prop) wins;
|
|
148075
|
+
* otherwise the runtime-injected env (`window.__ENV__.NEXT_PUBLIC_AUTH_URL`) is
|
|
148076
|
+
* used. With no `formId` the link resolves the platform's default form (404
|
|
148077
|
+
* when none). The `redirect-to` param carries the origin the applicant is sent
|
|
148078
|
+
* back to after submitting — by default the origin the link is copied from — and
|
|
148079
|
+
* is omitted when no origin can be read (no DOM).
|
|
148080
|
+
*/
|
|
148081
|
+
function buildApplicationLink(platformKey, formId, authSpaUrl, redirectTo) {
|
|
148081
148082
|
var _a, _b;
|
|
148082
148083
|
const base = (_b = authSpaUrl !== null && authSpaUrl !== void 0 ? authSpaUrl : (typeof window !== 'undefined'
|
|
148083
148084
|
? (_a = window.__ENV__) === null || _a === void 0 ? void 0 : _a.NEXT_PUBLIC_AUTH_URL
|
|
@@ -148086,7 +148087,8 @@ function buildApplicationLink(platformKey, formId, authSpaUrl, app) {
|
|
|
148086
148087
|
return null;
|
|
148087
148088
|
const root = `${trimTrailingSlashes(base)}/applications/${encodeURIComponent(platformKey)}`;
|
|
148088
148089
|
const path = formId != null ? `${root}/${encodeURIComponent(String(formId))}` : root;
|
|
148089
|
-
|
|
148090
|
+
const target = (typeof window !== 'undefined' ? window.location.origin : undefined);
|
|
148091
|
+
return target ? `${path}?redirect-to=${encodeURIComponent(target)}` : path;
|
|
148090
148092
|
}
|
|
148091
148093
|
/**
|
|
148092
148094
|
* Applications management. Entry view lists the platform's application forms
|
|
@@ -148094,7 +148096,7 @@ function buildApplicationLink(platformKey, formId, authSpaUrl, app) {
|
|
|
148094
148096
|
* per-form (or all-form) submission pipelines, the submission workspace with
|
|
148095
148097
|
* per-student decisions, the form/question editor, and the ban list.
|
|
148096
148098
|
*/
|
|
148097
|
-
function ApplicationsTab({ platformKey, authSpaUrl,
|
|
148099
|
+
function ApplicationsTab({ platformKey, authSpaUrl, }) {
|
|
148098
148100
|
const [view, setView] = useState({ name: 'forms' });
|
|
148099
148101
|
if (view.name === 'editor') {
|
|
148100
148102
|
return (jsx(QuestionsEditor, { platformKey: platformKey, initialFormId: view.formId, startNew: view.startNew, onBack: () => setView({ name: 'forms' }) }));
|
|
@@ -148108,10 +148110,10 @@ function ApplicationsTab({ platformKey, authSpaUrl, currentSpa, }) {
|
|
|
148108
148110
|
if (view.name === 'submissions') {
|
|
148109
148111
|
return (jsx(SubmissionsPipeline, { platformKey: platformKey, form: view.form, onBack: () => setView({ name: 'forms' }), onOpen: (submissionId) => setView({ name: 'detail', submissionId, form: view.form }) }));
|
|
148110
148112
|
}
|
|
148111
|
-
return (jsx(FormsList, { platformKey: platformKey, authSpaUrl: authSpaUrl,
|
|
148113
|
+
return (jsx(FormsList, { platformKey: platformKey, authSpaUrl: authSpaUrl, onViewSubmissions: (form) => setView({ name: 'submissions', form }), onEditForm: (formId) => setView({ name: 'editor', formId, startNew: false }), onNewForm: () => setView({ name: 'editor', formId: null, startNew: true }), onViewBlocks: () => setView({ name: 'blocks' }) }));
|
|
148112
148114
|
}
|
|
148113
148115
|
/** The entry view: every application form of the platform, with actions. */
|
|
148114
|
-
function FormsList({ platformKey, authSpaUrl,
|
|
148116
|
+
function FormsList({ platformKey, authSpaUrl, onViewSubmissions, onEditForm, onNewForm, onViewBlocks, }) {
|
|
148115
148117
|
const t = useT();
|
|
148116
148118
|
/** The form id whose link was just copied (transient "Copied" feedback). */
|
|
148117
148119
|
const [copiedFormId, setCopiedFormId] = useState(null);
|
|
@@ -148125,7 +148127,7 @@ function FormsList({ platformKey, authSpaUrl, currentSpa, onViewSubmissions, onE
|
|
|
148125
148127
|
const counts = statsCounts(stats);
|
|
148126
148128
|
const total = Object.values(counts).reduce((sum, n) => sum + n, 0);
|
|
148127
148129
|
const handleCopyLink = async (form) => {
|
|
148128
|
-
const link = buildApplicationLink(platformKey, form.id, authSpaUrl
|
|
148130
|
+
const link = buildApplicationLink(platformKey, form.id, authSpaUrl);
|
|
148129
148131
|
if (!link)
|
|
148130
148132
|
return;
|
|
148131
148133
|
try {
|
|
@@ -148145,7 +148147,7 @@ function FormsList({ platformKey, authSpaUrl, currentSpa, onViewSubmissions, onE
|
|
|
148145
148147
|
? 'bg-blue-50 text-blue-700 border-blue-200 dark:bg-blue-900/30 dark:text-blue-300 dark:border-blue-900'
|
|
148146
148148
|
: 'bg-gray-100 text-gray-600 border-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-600', children: t(form.enabled
|
|
148147
148149
|
? 'profileApplicationsTab.formEnabled'
|
|
148148
|
-
: 'profileApplicationsTab.formDisabled') }) }), jsx("td", { className: "whitespace-nowrap px-6 py-4 text-right", children: jsxs("div", { className: "flex items-center justify-end gap-1", children: [buildApplicationLink(platformKey, form.id, authSpaUrl
|
|
148150
|
+
: 'profileApplicationsTab.formDisabled') }) }), jsx("td", { className: "whitespace-nowrap px-6 py-4 text-right", children: jsxs("div", { className: "flex items-center justify-end gap-1", children: [buildApplicationLink(platformKey, form.id, authSpaUrl) && (jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { asChild: true, children: jsxs(Button$1, { variant: "ghost", className: copiedFormId === form.id
|
|
148149
148151
|
? 'h-8 w-8 p-0 text-blue-600 dark:text-blue-400'
|
|
148150
148152
|
: 'h-8 w-8 p-0 text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100', onClick: () => handleCopyLink(form), "aria-label": t('profileApplicationsTab.copyFormLink', {
|
|
148151
148153
|
form: ((_b = form.schema) === null || _b === void 0 ? void 0 : _b.title) ||
|
|
@@ -148256,7 +148258,7 @@ const TabDescription = ({ icon, title, children }) => {
|
|
|
148256
148258
|
};
|
|
148257
148259
|
const Admin = ({ tenant, onInviteClick, hasUserTabPermission = false, hasGroupsTabPermission = false, hasRolesTabPermission = false, hasPoliciesTabPermission = false, hasTeamsTabPermission = false, hasAlertsTabPermission = false, hasInviteUserPermission = false, hasCreateTeamPermission = false, onLoadGroupPermissions, rbacPermissions = {}, enableRbac = false, showGradebookTab = false, currentSpa, authSpaUrl, }) => {
|
|
148258
148260
|
const t = useT();
|
|
148259
|
-
return (jsx("div", { className: "border border-gray-200 rounded-lg p-6", children: jsxs(Tabs, { defaultValue: "users", "aria-label": t('profileAdmin.rbacManagementTabsAriaLabel'), children: [jsxs(TabsList, { "aria-label": t('profileAdmin.managementTabsAriaLabel'), className: "max-w-full overflow-x-auto justify-start px-1", children: [hasUserTabPermission && (jsx(TabsTrigger, { value: "users", children: t('profileAdmin.usersTab') })), hasGroupsTabPermission && (jsx(TabsTrigger, { value: "groups", children: t('profileAdmin.groupsTab') })), hasRolesTabPermission && (jsx(TabsTrigger, { value: "roles", children: t('profileAdmin.rolesTab') })), hasPoliciesTabPermission && (jsx(TabsTrigger, { value: "policies", children: t('profileAdmin.policiesTab') })), hasTeamsTabPermission && (jsx(TabsTrigger, { value: "teams", children: t('profileAdmin.teamsTab') })), hasAlertsTabPermission && (jsx(TabsTrigger, { value: "alerts", children: t('profileAdmin.alertsTab') })), jsx(TabsTrigger, { value: "applications", children: t('profileAdmin.applicationsTab') })] }), hasUserTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "users", children: [jsx(TabDescription, { icon: jsx(Users, { className: "w-5 h-5" }), title: t('profileAdmin.usersTab'), children: t('profileAdmin.usersDescription') }), jsx(UsersTab, { tenant: tenant, onInviteClick: onInviteClick, currentSpa: currentSpa, showGradebookTab: showGradebookTab })] })), hasGroupsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "groups", children: [jsx(TabDescription, { icon: jsx(UsersRound, { className: "w-5 h-5" }), title: t('profileAdmin.groupsTab'), children: t('profileAdmin.groupsDescription') }), jsx(GroupsTab, { tenant: tenant })] })), hasRolesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "roles", children: [jsx(TabDescription, { icon: jsx(UserCog, { className: "w-5 h-5" }), title: t('profileAdmin.rolesTab'), children: t('profileAdmin.rolesDescription') }), jsx(RolesTab, { tenant: tenant })] })), hasPoliciesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "policies", children: [jsx(TabDescription, { icon: jsx(ScrollText, { className: "w-5 h-5" }), title: t('profileAdmin.policiesTab'), children: t('profileAdmin.policiesDescription') }), jsx(PoliciesTab, { tenant: tenant })] })), hasTeamsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "teams", children: [jsx(TabDescription, { icon: jsx(Shield, { className: "w-5 h-5" }), title: t('profileAdmin.teamsTab'), children: t('profileAdmin.teamsDescription') }), jsx(GroupsTab, { tenant: tenant, isTeam: true, onInviteClick: onInviteClick, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, rbacPermissions: rbacPermissions, enableRbac: enableRbac })] })), hasAlertsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "alerts", children: [jsx(TabDescription, { icon: jsx(BellRing, { className: "w-5 h-5" }), title: t('profileAdmin.alertsTab'), children: t('profileAdmin.alertsDescription') }), jsx(AlertsTab$1, { tenant: tenant })] })), jsxs(TabsContent, { className: "mt-4", value: "applications", children: [jsx(TabDescription, { icon: jsx(ClipboardList, { className: "w-5 h-5" }), title: t('profileAdmin.applicationsTab'), children: t('profileAdmin.applicationsTabDescription') }), jsx(ApplicationsTab, { platformKey: tenant, authSpaUrl: authSpaUrl
|
|
148261
|
+
return (jsx("div", { className: "border border-gray-200 rounded-lg p-6", children: jsxs(Tabs, { defaultValue: "users", "aria-label": t('profileAdmin.rbacManagementTabsAriaLabel'), children: [jsxs(TabsList, { "aria-label": t('profileAdmin.managementTabsAriaLabel'), className: "max-w-full overflow-x-auto justify-start px-1", children: [hasUserTabPermission && (jsx(TabsTrigger, { value: "users", children: t('profileAdmin.usersTab') })), hasGroupsTabPermission && (jsx(TabsTrigger, { value: "groups", children: t('profileAdmin.groupsTab') })), hasRolesTabPermission && (jsx(TabsTrigger, { value: "roles", children: t('profileAdmin.rolesTab') })), hasPoliciesTabPermission && (jsx(TabsTrigger, { value: "policies", children: t('profileAdmin.policiesTab') })), hasTeamsTabPermission && (jsx(TabsTrigger, { value: "teams", children: t('profileAdmin.teamsTab') })), hasAlertsTabPermission && (jsx(TabsTrigger, { value: "alerts", children: t('profileAdmin.alertsTab') })), jsx(TabsTrigger, { value: "applications", children: t('profileAdmin.applicationsTab') })] }), hasUserTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "users", children: [jsx(TabDescription, { icon: jsx(Users, { className: "w-5 h-5" }), title: t('profileAdmin.usersTab'), children: t('profileAdmin.usersDescription') }), jsx(UsersTab, { tenant: tenant, onInviteClick: onInviteClick, currentSpa: currentSpa, showGradebookTab: showGradebookTab })] })), hasGroupsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "groups", children: [jsx(TabDescription, { icon: jsx(UsersRound, { className: "w-5 h-5" }), title: t('profileAdmin.groupsTab'), children: t('profileAdmin.groupsDescription') }), jsx(GroupsTab, { tenant: tenant })] })), hasRolesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "roles", children: [jsx(TabDescription, { icon: jsx(UserCog, { className: "w-5 h-5" }), title: t('profileAdmin.rolesTab'), children: t('profileAdmin.rolesDescription') }), jsx(RolesTab, { tenant: tenant })] })), hasPoliciesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "policies", children: [jsx(TabDescription, { icon: jsx(ScrollText, { className: "w-5 h-5" }), title: t('profileAdmin.policiesTab'), children: t('profileAdmin.policiesDescription') }), jsx(PoliciesTab, { tenant: tenant })] })), hasTeamsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "teams", children: [jsx(TabDescription, { icon: jsx(Shield, { className: "w-5 h-5" }), title: t('profileAdmin.teamsTab'), children: t('profileAdmin.teamsDescription') }), jsx(GroupsTab, { tenant: tenant, isTeam: true, onInviteClick: onInviteClick, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, rbacPermissions: rbacPermissions, enableRbac: enableRbac })] })), hasAlertsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "alerts", children: [jsx(TabDescription, { icon: jsx(BellRing, { className: "w-5 h-5" }), title: t('profileAdmin.alertsTab'), children: t('profileAdmin.alertsDescription') }), jsx(AlertsTab$1, { tenant: tenant })] })), jsxs(TabsContent, { className: "mt-4", value: "applications", children: [jsx(TabDescription, { icon: jsx(ClipboardList, { className: "w-5 h-5" }), title: t('profileAdmin.applicationsTab'), children: t('profileAdmin.applicationsTabDescription') }), jsx(ApplicationsTab, { platformKey: tenant, authSpaUrl: authSpaUrl })] })] }) }));
|
|
148260
148262
|
};
|
|
148261
148263
|
|
|
148262
148264
|
function DeleteApiModal({ isOpen, onClose, apiKey, tenantKey }) {
|
|
@@ -182347,14 +182347,15 @@ const PAGE_SIZE$8 = 20;
|
|
|
182347
182347
|
const SEARCH_DEBOUNCE_MS = 300;
|
|
182348
182348
|
/**
|
|
182349
182349
|
* The public application URL on the auth SPA for one form of a platform
|
|
182350
|
-
* (`<auth-url>/applications/<platform-key>/<form-id>?
|
|
182351
|
-
* the auth SPA URL cannot be resolved. `authSpaUrl` (prop) wins;
|
|
182352
|
-
* runtime-injected env (`window.__ENV__.NEXT_PUBLIC_AUTH_URL`) is
|
|
182353
|
-
* `formId` the link resolves the platform's default form (404
|
|
182354
|
-
* `
|
|
182355
|
-
*
|
|
182356
|
-
|
|
182357
|
-
|
|
182350
|
+
* (`<auth-url>/applications/<platform-key>/<form-id>?redirect-to=<origin>`), or
|
|
182351
|
+
* null when the auth SPA URL cannot be resolved. `authSpaUrl` (prop) wins;
|
|
182352
|
+
* otherwise the runtime-injected env (`window.__ENV__.NEXT_PUBLIC_AUTH_URL`) is
|
|
182353
|
+
* used. With no `formId` the link resolves the platform's default form (404
|
|
182354
|
+
* when none). The `redirect-to` param carries the origin the applicant is sent
|
|
182355
|
+
* back to after submitting — by default the origin the link is copied from — and
|
|
182356
|
+
* is omitted when no origin can be read (no DOM).
|
|
182357
|
+
*/
|
|
182358
|
+
function buildApplicationLink(platformKey, formId, authSpaUrl, redirectTo) {
|
|
182358
182359
|
var _a, _b;
|
|
182359
182360
|
const base = (_b = authSpaUrl !== null && authSpaUrl !== void 0 ? authSpaUrl : (typeof window !== 'undefined'
|
|
182360
182361
|
? (_a = window.__ENV__) === null || _a === void 0 ? void 0 : _a.NEXT_PUBLIC_AUTH_URL
|
|
@@ -182363,7 +182364,8 @@ function buildApplicationLink(platformKey, formId, authSpaUrl, app) {
|
|
|
182363
182364
|
return null;
|
|
182364
182365
|
const root = `${trimTrailingSlashes(base)}/applications/${encodeURIComponent(platformKey)}`;
|
|
182365
182366
|
const path = formId != null ? `${root}/${encodeURIComponent(String(formId))}` : root;
|
|
182366
|
-
|
|
182367
|
+
const target = (typeof window !== 'undefined' ? window.location.origin : undefined);
|
|
182368
|
+
return target ? `${path}?redirect-to=${encodeURIComponent(target)}` : path;
|
|
182367
182369
|
}
|
|
182368
182370
|
/**
|
|
182369
182371
|
* Applications management. Entry view lists the platform's application forms
|
|
@@ -182371,7 +182373,7 @@ function buildApplicationLink(platformKey, formId, authSpaUrl, app) {
|
|
|
182371
182373
|
* per-form (or all-form) submission pipelines, the submission workspace with
|
|
182372
182374
|
* per-student decisions, the form/question editor, and the ban list.
|
|
182373
182375
|
*/
|
|
182374
|
-
function ApplicationsTab({ platformKey, authSpaUrl,
|
|
182376
|
+
function ApplicationsTab({ platformKey, authSpaUrl, }) {
|
|
182375
182377
|
const [view, setView] = useState({ name: 'forms' });
|
|
182376
182378
|
if (view.name === 'editor') {
|
|
182377
182379
|
return (jsx(QuestionsEditor, { platformKey: platformKey, initialFormId: view.formId, startNew: view.startNew, onBack: () => setView({ name: 'forms' }) }));
|
|
@@ -182385,10 +182387,10 @@ function ApplicationsTab({ platformKey, authSpaUrl, currentSpa, }) {
|
|
|
182385
182387
|
if (view.name === 'submissions') {
|
|
182386
182388
|
return (jsx(SubmissionsPipeline, { platformKey: platformKey, form: view.form, onBack: () => setView({ name: 'forms' }), onOpen: (submissionId) => setView({ name: 'detail', submissionId, form: view.form }) }));
|
|
182387
182389
|
}
|
|
182388
|
-
return (jsx(FormsList, { platformKey: platformKey, authSpaUrl: authSpaUrl,
|
|
182390
|
+
return (jsx(FormsList, { platformKey: platformKey, authSpaUrl: authSpaUrl, onViewSubmissions: (form) => setView({ name: 'submissions', form }), onEditForm: (formId) => setView({ name: 'editor', formId, startNew: false }), onNewForm: () => setView({ name: 'editor', formId: null, startNew: true }), onViewBlocks: () => setView({ name: 'blocks' }) }));
|
|
182389
182391
|
}
|
|
182390
182392
|
/** The entry view: every application form of the platform, with actions. */
|
|
182391
|
-
function FormsList({ platformKey, authSpaUrl,
|
|
182393
|
+
function FormsList({ platformKey, authSpaUrl, onViewSubmissions, onEditForm, onNewForm, onViewBlocks, }) {
|
|
182392
182394
|
const t = useT();
|
|
182393
182395
|
/** The form id whose link was just copied (transient "Copied" feedback). */
|
|
182394
182396
|
const [copiedFormId, setCopiedFormId] = useState(null);
|
|
@@ -182402,7 +182404,7 @@ function FormsList({ platformKey, authSpaUrl, currentSpa, onViewSubmissions, onE
|
|
|
182402
182404
|
const counts = statsCounts(stats);
|
|
182403
182405
|
const total = Object.values(counts).reduce((sum, n) => sum + n, 0);
|
|
182404
182406
|
const handleCopyLink = async (form) => {
|
|
182405
|
-
const link = buildApplicationLink(platformKey, form.id, authSpaUrl
|
|
182407
|
+
const link = buildApplicationLink(platformKey, form.id, authSpaUrl);
|
|
182406
182408
|
if (!link)
|
|
182407
182409
|
return;
|
|
182408
182410
|
try {
|
|
@@ -182422,7 +182424,7 @@ function FormsList({ platformKey, authSpaUrl, currentSpa, onViewSubmissions, onE
|
|
|
182422
182424
|
? 'bg-blue-50 text-blue-700 border-blue-200 dark:bg-blue-900/30 dark:text-blue-300 dark:border-blue-900'
|
|
182423
182425
|
: 'bg-gray-100 text-gray-600 border-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-600', children: t(form.enabled
|
|
182424
182426
|
? 'profileApplicationsTab.formEnabled'
|
|
182425
|
-
: 'profileApplicationsTab.formDisabled') }) }), jsx("td", { className: "whitespace-nowrap px-6 py-4 text-right", children: jsxs("div", { className: "flex items-center justify-end gap-1", children: [buildApplicationLink(platformKey, form.id, authSpaUrl
|
|
182427
|
+
: 'profileApplicationsTab.formDisabled') }) }), jsx("td", { className: "whitespace-nowrap px-6 py-4 text-right", children: jsxs("div", { className: "flex items-center justify-end gap-1", children: [buildApplicationLink(platformKey, form.id, authSpaUrl) && (jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { asChild: true, children: jsxs(Button$1, { variant: "ghost", className: copiedFormId === form.id
|
|
182426
182428
|
? 'h-8 w-8 p-0 text-blue-600 dark:text-blue-400'
|
|
182427
182429
|
: 'h-8 w-8 p-0 text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100', onClick: () => handleCopyLink(form), "aria-label": t('profileApplicationsTab.copyFormLink', {
|
|
182428
182430
|
form: ((_b = form.schema) === null || _b === void 0 ? void 0 : _b.title) ||
|
|
@@ -182533,7 +182535,7 @@ const TabDescription = ({ icon, title, children }) => {
|
|
|
182533
182535
|
};
|
|
182534
182536
|
const Admin = ({ tenant, onInviteClick, hasUserTabPermission = false, hasGroupsTabPermission = false, hasRolesTabPermission = false, hasPoliciesTabPermission = false, hasTeamsTabPermission = false, hasAlertsTabPermission = false, hasInviteUserPermission = false, hasCreateTeamPermission = false, onLoadGroupPermissions, rbacPermissions = {}, enableRbac = false, showGradebookTab = false, currentSpa, authSpaUrl, }) => {
|
|
182535
182537
|
const t = useT();
|
|
182536
|
-
return (jsx("div", { className: "border border-gray-200 rounded-lg p-6", children: jsxs(Tabs, { defaultValue: "users", "aria-label": t('profileAdmin.rbacManagementTabsAriaLabel'), children: [jsxs(TabsList, { "aria-label": t('profileAdmin.managementTabsAriaLabel'), className: "max-w-full overflow-x-auto justify-start px-1", children: [hasUserTabPermission && (jsx(TabsTrigger, { value: "users", children: t('profileAdmin.usersTab') })), hasGroupsTabPermission && (jsx(TabsTrigger, { value: "groups", children: t('profileAdmin.groupsTab') })), hasRolesTabPermission && (jsx(TabsTrigger, { value: "roles", children: t('profileAdmin.rolesTab') })), hasPoliciesTabPermission && (jsx(TabsTrigger, { value: "policies", children: t('profileAdmin.policiesTab') })), hasTeamsTabPermission && (jsx(TabsTrigger, { value: "teams", children: t('profileAdmin.teamsTab') })), hasAlertsTabPermission && (jsx(TabsTrigger, { value: "alerts", children: t('profileAdmin.alertsTab') })), jsx(TabsTrigger, { value: "applications", children: t('profileAdmin.applicationsTab') })] }), hasUserTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "users", children: [jsx(TabDescription, { icon: jsx(Users, { className: "w-5 h-5" }), title: t('profileAdmin.usersTab'), children: t('profileAdmin.usersDescription') }), jsx(UsersTab, { tenant: tenant, onInviteClick: onInviteClick, currentSpa: currentSpa, showGradebookTab: showGradebookTab })] })), hasGroupsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "groups", children: [jsx(TabDescription, { icon: jsx(UsersRound, { className: "w-5 h-5" }), title: t('profileAdmin.groupsTab'), children: t('profileAdmin.groupsDescription') }), jsx(GroupsTab, { tenant: tenant })] })), hasRolesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "roles", children: [jsx(TabDescription, { icon: jsx(UserCog, { className: "w-5 h-5" }), title: t('profileAdmin.rolesTab'), children: t('profileAdmin.rolesDescription') }), jsx(RolesTab, { tenant: tenant })] })), hasPoliciesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "policies", children: [jsx(TabDescription, { icon: jsx(ScrollText, { className: "w-5 h-5" }), title: t('profileAdmin.policiesTab'), children: t('profileAdmin.policiesDescription') }), jsx(PoliciesTab, { tenant: tenant })] })), hasTeamsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "teams", children: [jsx(TabDescription, { icon: jsx(Shield, { className: "w-5 h-5" }), title: t('profileAdmin.teamsTab'), children: t('profileAdmin.teamsDescription') }), jsx(GroupsTab, { tenant: tenant, isTeam: true, onInviteClick: onInviteClick, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, rbacPermissions: rbacPermissions, enableRbac: enableRbac })] })), hasAlertsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "alerts", children: [jsx(TabDescription, { icon: jsx(BellRing, { className: "w-5 h-5" }), title: t('profileAdmin.alertsTab'), children: t('profileAdmin.alertsDescription') }), jsx(AlertsTab, { tenant: tenant })] })), jsxs(TabsContent, { className: "mt-4", value: "applications", children: [jsx(TabDescription, { icon: jsx(ClipboardList, { className: "w-5 h-5" }), title: t('profileAdmin.applicationsTab'), children: t('profileAdmin.applicationsTabDescription') }), jsx(ApplicationsTab, { platformKey: tenant, authSpaUrl: authSpaUrl
|
|
182538
|
+
return (jsx("div", { className: "border border-gray-200 rounded-lg p-6", children: jsxs(Tabs, { defaultValue: "users", "aria-label": t('profileAdmin.rbacManagementTabsAriaLabel'), children: [jsxs(TabsList, { "aria-label": t('profileAdmin.managementTabsAriaLabel'), className: "max-w-full overflow-x-auto justify-start px-1", children: [hasUserTabPermission && (jsx(TabsTrigger, { value: "users", children: t('profileAdmin.usersTab') })), hasGroupsTabPermission && (jsx(TabsTrigger, { value: "groups", children: t('profileAdmin.groupsTab') })), hasRolesTabPermission && (jsx(TabsTrigger, { value: "roles", children: t('profileAdmin.rolesTab') })), hasPoliciesTabPermission && (jsx(TabsTrigger, { value: "policies", children: t('profileAdmin.policiesTab') })), hasTeamsTabPermission && (jsx(TabsTrigger, { value: "teams", children: t('profileAdmin.teamsTab') })), hasAlertsTabPermission && (jsx(TabsTrigger, { value: "alerts", children: t('profileAdmin.alertsTab') })), jsx(TabsTrigger, { value: "applications", children: t('profileAdmin.applicationsTab') })] }), hasUserTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "users", children: [jsx(TabDescription, { icon: jsx(Users, { className: "w-5 h-5" }), title: t('profileAdmin.usersTab'), children: t('profileAdmin.usersDescription') }), jsx(UsersTab, { tenant: tenant, onInviteClick: onInviteClick, currentSpa: currentSpa, showGradebookTab: showGradebookTab })] })), hasGroupsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "groups", children: [jsx(TabDescription, { icon: jsx(UsersRound, { className: "w-5 h-5" }), title: t('profileAdmin.groupsTab'), children: t('profileAdmin.groupsDescription') }), jsx(GroupsTab, { tenant: tenant })] })), hasRolesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "roles", children: [jsx(TabDescription, { icon: jsx(UserCog, { className: "w-5 h-5" }), title: t('profileAdmin.rolesTab'), children: t('profileAdmin.rolesDescription') }), jsx(RolesTab, { tenant: tenant })] })), hasPoliciesTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "policies", children: [jsx(TabDescription, { icon: jsx(ScrollText, { className: "w-5 h-5" }), title: t('profileAdmin.policiesTab'), children: t('profileAdmin.policiesDescription') }), jsx(PoliciesTab, { tenant: tenant })] })), hasTeamsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "teams", children: [jsx(TabDescription, { icon: jsx(Shield, { className: "w-5 h-5" }), title: t('profileAdmin.teamsTab'), children: t('profileAdmin.teamsDescription') }), jsx(GroupsTab, { tenant: tenant, isTeam: true, onInviteClick: onInviteClick, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, rbacPermissions: rbacPermissions, enableRbac: enableRbac })] })), hasAlertsTabPermission && (jsxs(TabsContent, { className: "mt-4", value: "alerts", children: [jsx(TabDescription, { icon: jsx(BellRing, { className: "w-5 h-5" }), title: t('profileAdmin.alertsTab'), children: t('profileAdmin.alertsDescription') }), jsx(AlertsTab, { tenant: tenant })] })), jsxs(TabsContent, { className: "mt-4", value: "applications", children: [jsx(TabDescription, { icon: jsx(ClipboardList, { className: "w-5 h-5" }), title: t('profileAdmin.applicationsTab'), children: t('profileAdmin.applicationsTabDescription') }), jsx(ApplicationsTab, { platformKey: tenant, authSpaUrl: authSpaUrl })] })] }) }));
|
|
182537
182539
|
};
|
|
182538
182540
|
|
|
182539
182541
|
function DeleteApiModal$1({ isOpen, onClose, apiKey, tenantKey }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iblai/iblai-js",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.16",
|
|
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": {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"winston": "3.19.0",
|
|
79
79
|
"@iblai/data-layer": "1.12.5",
|
|
80
80
|
"@iblai/mcp": "1.8.13",
|
|
81
|
-
"@iblai/web-containers": "1.16.
|
|
81
|
+
"@iblai/web-containers": "1.16.12",
|
|
82
82
|
"@iblai/web-utils": "2.1.13"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|