@iblai/iblai-js 1.17.17 → 1.17.19
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.
|
@@ -204946,7 +204946,7 @@ var projectInstructionsModal = /*#__PURE__*/Object.freeze({
|
|
|
204946
204946
|
ProjectInstructionsModal: ProjectInstructionsModal
|
|
204947
204947
|
});
|
|
204948
204948
|
|
|
204949
|
-
function OrganizationTab({ platformKey, setOrganizationLogoFromOutside, tenant, onTenantUpdate, }) {
|
|
204949
|
+
function OrganizationTab({ platformKey, setOrganizationLogoFromOutside, tenant, onTenantUpdate, defaultSupportPhone = '', }) {
|
|
204950
204950
|
const { setMetadata } = useTenantContext();
|
|
204951
204951
|
const [uploadPlatformLogo] = useUploadLightLogoMutation();
|
|
204952
204952
|
const [uploadPlatformDarkLogo] = useUploadDarkLogoMutation();
|
|
@@ -204961,6 +204961,10 @@ function OrganizationTab({ platformKey, setOrganizationLogoFromOutside, tenant,
|
|
|
204961
204961
|
const [supportEmail, setSupportEmail] = useState('');
|
|
204962
204962
|
const [isEditingSupportEmail, setIsEditingSupportEmail] = useState(false);
|
|
204963
204963
|
const [tempSupportEmail, setTempSupportEmail] = useState('');
|
|
204964
|
+
const [supportPhone, setSupportPhone] = useState('');
|
|
204965
|
+
const [isEditingSupportPhone, setIsEditingSupportPhone] = useState(false);
|
|
204966
|
+
const [tempSupportPhone, setTempSupportPhone] = useState('');
|
|
204967
|
+
const [showSupportPhone, setShowSupportPhone] = useState(true);
|
|
204964
204968
|
const [helpCenterUrl, setHelpCenterUrl] = useState('');
|
|
204965
204969
|
const [isEditingHelpCenterUrl, setIsEditingHelpCenterUrl] = useState(false);
|
|
204966
204970
|
const [tempHelpCenterUrl, setTempHelpCenterUrl] = useState('');
|
|
@@ -204984,6 +204988,10 @@ function OrganizationTab({ platformKey, setOrganizationLogoFromOutside, tenant,
|
|
|
204984
204988
|
const defaultSupportEmail = 'support@iblai.zendesk.com';
|
|
204985
204989
|
setSupportEmail((metadata === null || metadata === void 0 ? void 0 : metadata.support_email) || defaultSupportEmail);
|
|
204986
204990
|
setTempSupportEmail((metadata === null || metadata === void 0 ? void 0 : metadata.support_email) || defaultSupportEmail);
|
|
204991
|
+
setSupportPhone((metadata === null || metadata === void 0 ? void 0 : metadata.support_phone) || defaultSupportPhone);
|
|
204992
|
+
setTempSupportPhone((metadata === null || metadata === void 0 ? void 0 : metadata.support_phone) || defaultSupportPhone);
|
|
204993
|
+
// enable_support_phone is truthy when empty, null, undefined, or true; falsy only when explicitly false
|
|
204994
|
+
setShowSupportPhone((metadata === null || metadata === void 0 ? void 0 : metadata.enable_support_phone) !== false);
|
|
204987
204995
|
const strippedHelpCenterUrl = stripProtocol((metadata === null || metadata === void 0 ? void 0 : metadata.help_center_url) || DEFAULT_HELP_CENTER_URL);
|
|
204988
204996
|
setHelpCenterUrl(strippedHelpCenterUrl);
|
|
204989
204997
|
setTempHelpCenterUrl(strippedHelpCenterUrl);
|
|
@@ -205085,6 +205093,21 @@ function OrganizationTab({ platformKey, setOrganizationLogoFromOutside, tenant,
|
|
|
205085
205093
|
setTempSupportEmail(supportEmail);
|
|
205086
205094
|
setIsEditingSupportEmail(false);
|
|
205087
205095
|
};
|
|
205096
|
+
const handleEditSupportPhone = () => {
|
|
205097
|
+
setTempSupportPhone(supportPhone);
|
|
205098
|
+
setIsEditingSupportPhone(true);
|
|
205099
|
+
};
|
|
205100
|
+
const handleSaveSupportPhone = async () => {
|
|
205101
|
+
updateOrganizationMetadata('support_phone', tempSupportPhone, () => {
|
|
205102
|
+
toast.success('Support phone updated successfully');
|
|
205103
|
+
setSupportPhone(tempSupportPhone);
|
|
205104
|
+
setIsEditingSupportPhone(false);
|
|
205105
|
+
});
|
|
205106
|
+
};
|
|
205107
|
+
const handleCancelSupportPhone = () => {
|
|
205108
|
+
setTempSupportPhone(supportPhone);
|
|
205109
|
+
setIsEditingSupportPhone(false);
|
|
205110
|
+
};
|
|
205088
205111
|
const handleEditHelpCenterUrl = () => {
|
|
205089
205112
|
setTempHelpCenterUrl(helpCenterUrl);
|
|
205090
205113
|
setIsEditingHelpCenterUrl(true);
|
|
@@ -205107,7 +205130,7 @@ function OrganizationTab({ platformKey, setOrganizationLogoFromOutside, tenant,
|
|
|
205107
205130
|
toast.success(`Help Center ${checked ? 'enabled' : 'disabled'}`);
|
|
205108
205131
|
});
|
|
205109
205132
|
};
|
|
205110
|
-
return (jsxs("div", { className: "container mx-auto max-w-7xl !mt-0", children: [jsxs("div", { className: "mb-6", children: [jsx(Label, { htmlFor: "orgName", className: "text-gray-500 dark:text-gray-400 text-base", children: "ID" }), jsx("div", { className: "flex items-center gap-2 mt-1", children: jsx("span", { className: "text-sm text-gray-600 font-semibold", children: platformKey }) })] }), jsxs("div", { className: "mb-6", children: [jsx(Label, { htmlFor: "orgName", className: "text-gray-500 dark:text-gray-400 text-base", children: "Name" }), isEditingOrg ? (jsxs("div", { className: "flex items-center gap-2 mt-1", children: [jsx(Input, { id: "orgName", value: tempOrgName, onChange: (e) => setTempOrgName(e.target.value), className: "max-w-md text-sm text-gray-600 font-semibold", placeholder: "Enter organization name", autoFocus: true }), jsxs(Button$1, { onClick: handleSaveOrg, size: "sm", disabled: !tempOrgName.trim() || isUpdatingPlatformInfo, className: "h-9 bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white", children: [jsx(Check, { className: "w-4 h-4 mr-1" }), isUpdatingPlatformInfo ? 'Saving...' : 'Save'] }), jsxs(Button$1, { onClick: handleCancelOrg, variant: "outline", size: "sm", className: "h-9 bg-transparent", children: [jsx(X$2, { className: "w-4 h-4 mr-1" }), "Cancel"] })] })) : (jsxs("div", { className: "flex items-center gap-2 mt-1", children: [jsx("span", { className: "text-sm text-gray-600 font-semibold", children: organizationName || 'Default' }), jsx(Button$1, { onClick: handleEditOrg, variant: "ghost", size: "sm", className: "h-8 w-8 p-0 text-muted-foreground hover:text-foreground", children: jsx(SquarePen, { className: "w-3 h-3" }) })] }))] }), jsxs("div", { className: "mb-6", children: [jsx(Label, { htmlFor: "orgName", className: "text-gray-500 dark:text-gray-400 text-base", children: "Support" }), isEditingSupportEmail ? (jsxs("div", { className: "flex items-center gap-2 mt-1", children: [jsx(Input, { id: "supportEmail", value: tempSupportEmail, onChange: (e) => setTempSupportEmail(e.target.value), className: "max-w-md text-sm text-gray-600 font-semibold", placeholder: "Enter organization support address", autoFocus: true }), jsxs(Button$1, { onClick: handleSaveSupportEmail, size: "sm", disabled: !tempSupportEmail.trim() || isUpdatingTenantMetadata, className: "h-9 bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white", children: [jsx(Check, { className: "w-4 h-4 mr-1" }), "Save"] }), jsxs(Button$1, { onClick: handleCancelSupportEmail, variant: "outline", size: "sm", className: "h-9 bg-transparent", children: [jsx(X$2, { className: "w-4 h-4 mr-1" }), "Cancel"] })] })) : (jsxs("div", { className: "flex items-center gap-2 mt-1", children: [jsx("span", { className: "text-sm text-gray-600 font-semibold", children: supportEmail }), jsx(Button$1, { onClick: handleEditSupportEmail, variant: "ghost", size: "sm", className: "h-8 w-8 p-0 text-muted-foreground hover:text-foreground", children: jsx(SquarePen, { className: "w-3 h-3" }) })] }))] }), jsxs("div", { className: "mb-6", children: [jsxs("div", { className: "flex items-center gap-3", children: [jsx(Label, { htmlFor: "helpCenterUrl", className: "text-gray-500 dark:text-gray-400 text-base", children: "Help Center" }), jsx(Switch, { checked: showHelp, onCheckedChange: handleToggleShowHelp, disabled: isUpdatingTenantMetadata, "aria-label": "Toggle Help Center visibility", className: "cursor-pointer data-[state=checked]:bg-blue-500 disabled:cursor-not-allowed disabled:opacity-50" })] }), isEditingHelpCenterUrl ? (jsxs("div", { className: "flex items-center gap-2 mt-1", children: [jsx(Input, { id: "helpCenterUrl", value: tempHelpCenterUrl, onChange: (e) => setTempHelpCenterUrl(e.target.value), className: "max-w-md text-sm font-semibold", placeholder: "Enter help center URL", autoFocus: true }), jsxs(Button$1, { onClick: handleSaveHelpCenterUrl, size: "sm",
|
|
205133
|
+
return (jsxs("div", { className: "container mx-auto max-w-7xl !mt-0", children: [jsxs("div", { className: "mb-6", children: [jsx(Label, { htmlFor: "orgName", className: "text-gray-500 dark:text-gray-400 text-base", children: "ID" }), jsx("div", { className: "flex items-center gap-2 mt-1", children: jsx("span", { className: "text-sm text-gray-600 font-semibold", children: platformKey }) })] }), jsxs("div", { className: "mb-6", children: [jsx(Label, { htmlFor: "orgName", className: "text-gray-500 dark:text-gray-400 text-base", children: "Name" }), isEditingOrg ? (jsxs("div", { className: "flex items-center gap-2 mt-1", children: [jsx(Input, { id: "orgName", value: tempOrgName, onChange: (e) => setTempOrgName(e.target.value), className: "max-w-md text-sm text-gray-600 font-semibold", placeholder: "Enter organization name", autoFocus: true }), jsxs(Button$1, { onClick: handleSaveOrg, size: "sm", disabled: !tempOrgName.trim() || isUpdatingPlatformInfo, className: "h-9 bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white", children: [jsx(Check, { className: "w-4 h-4 mr-1" }), isUpdatingPlatformInfo ? 'Saving...' : 'Save'] }), jsxs(Button$1, { onClick: handleCancelOrg, variant: "outline", size: "sm", className: "h-9 bg-transparent", children: [jsx(X$2, { className: "w-4 h-4 mr-1" }), "Cancel"] })] })) : (jsxs("div", { className: "flex items-center gap-2 mt-1", children: [jsx("span", { className: "text-sm text-gray-600 font-semibold", children: organizationName || 'Default' }), jsx(Button$1, { onClick: handleEditOrg, variant: "ghost", size: "sm", className: "h-8 w-8 p-0 text-muted-foreground hover:text-foreground", children: jsx(SquarePen, { className: "w-3 h-3" }) })] }))] }), jsxs("div", { className: "mb-6", children: [jsx(Label, { htmlFor: "orgName", className: "text-gray-500 dark:text-gray-400 text-base", children: "Support" }), isEditingSupportEmail ? (jsxs("div", { className: "flex items-center gap-2 mt-1", children: [jsx(Input, { id: "supportEmail", value: tempSupportEmail, onChange: (e) => setTempSupportEmail(e.target.value), className: "max-w-md text-sm text-gray-600 font-semibold", placeholder: "Enter organization support address", autoFocus: true }), jsxs(Button$1, { onClick: handleSaveSupportEmail, size: "sm", disabled: !tempSupportEmail.trim() || isUpdatingTenantMetadata, className: "h-9 bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white", children: [jsx(Check, { className: "w-4 h-4 mr-1" }), "Save"] }), jsxs(Button$1, { onClick: handleCancelSupportEmail, variant: "outline", size: "sm", className: "h-9 bg-transparent", children: [jsx(X$2, { className: "w-4 h-4 mr-1" }), "Cancel"] })] })) : (jsxs("div", { className: "flex items-center gap-2 mt-1", children: [jsx("span", { className: "text-sm text-gray-600 font-semibold", children: supportEmail }), jsx(Button$1, { onClick: handleEditSupportEmail, variant: "ghost", size: "sm", className: "h-8 w-8 p-0 text-muted-foreground hover:text-foreground", children: jsx(SquarePen, { className: "w-3 h-3" }) })] }))] }), showSupportPhone && (jsxs("div", { className: "mb-6", children: [jsx(Label, { htmlFor: "supportPhone", className: "text-gray-500 dark:text-gray-400 text-base", children: "Support Phone" }), isEditingSupportPhone ? (jsxs("div", { className: "flex items-center gap-2 mt-1", children: [jsx(Input, { id: "supportPhone", value: tempSupportPhone, onChange: (e) => setTempSupportPhone(e.target.value), className: "max-w-md text-sm text-gray-600 font-semibold", placeholder: "Enter organization support phone number", autoFocus: true }), jsxs(Button$1, { onClick: handleSaveSupportPhone, size: "sm", disabled: !tempSupportPhone.trim() || isUpdatingTenantMetadata, className: "h-9 bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white", children: [jsx(Check, { className: "w-4 h-4 mr-1" }), "Save"] }), jsxs(Button$1, { onClick: handleCancelSupportPhone, variant: "outline", size: "sm", className: "h-9 bg-transparent", children: [jsx(X$2, { className: "w-4 h-4 mr-1" }), "Cancel"] })] })) : (jsxs("div", { className: "flex items-center gap-2 mt-1", children: [jsx("span", { className: "text-sm text-gray-600 font-semibold", children: supportPhone || 'Not set' }), jsx(Button$1, { onClick: handleEditSupportPhone, variant: "ghost", size: "sm", className: "h-8 w-8 p-0 text-muted-foreground hover:text-foreground", children: jsx(SquarePen, { className: "w-3 h-3" }) })] }))] })), jsxs("div", { className: "mb-6", children: [jsxs("div", { className: "flex items-center gap-3", children: [jsx(Label, { htmlFor: "helpCenterUrl", className: "text-gray-500 dark:text-gray-400 text-base", children: "Help Center" }), jsx(Switch, { checked: showHelp, onCheckedChange: handleToggleShowHelp, disabled: isUpdatingTenantMetadata, "aria-label": "Toggle Help Center visibility", className: "cursor-pointer data-[state=checked]:bg-blue-500 disabled:cursor-not-allowed disabled:opacity-50" })] }), isEditingHelpCenterUrl ? (jsxs("div", { className: "flex items-center gap-2 mt-1", children: [jsx(Input, { id: "helpCenterUrl", value: tempHelpCenterUrl, onChange: (e) => setTempHelpCenterUrl(e.target.value), className: "max-w-md text-sm font-semibold", placeholder: "Enter help center URL", autoFocus: true }), jsxs(Button$1, { onClick: handleSaveHelpCenterUrl, size: "sm",
|
|
205111
205134
|
//disabled={!tempCustomFaqUrl.trim()}
|
|
205112
205135
|
className: "h-9 bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white", children: [jsx(Check, { className: "w-4 h-4 mr-1" }), "Save"] }), jsxs(Button$1, { onClick: handleCancelHelpCenterUrl, variant: "outline", size: "sm", className: "h-9 bg-transparent", children: [jsx(X$2, { className: "w-4 h-4 mr-1" }), "Cancel"] })] })) : (jsxs("div", { className: "flex items-center gap-2 mt-1", children: [jsx("span", { className: "text-sm text-gray-600 font-semibold", children: helpCenterUrl }), jsx(Button$1, { onClick: handleEditHelpCenterUrl, variant: "ghost", size: "sm", className: "h-8 w-8 p-0 text-muted-foreground hover:text-foreground", children: jsx(SquarePen, { className: "w-3 h-3" }) })] }))] }), jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4 mb-6", children: [jsxs("div", { className: "space-y-2", children: [jsx(Label, { htmlFor: "orgName", className: "text-gray-500 dark:text-gray-400 text-base", children: "Light Logo" }), jsxs("div", { className: "flex h-[200px] w-full sm:w-[200px] flex-col items-center justify-center rounded-lg border-2 border-dashed border-gray-200 mt-3 hover:bg-gray-50 cursor-pointer", onClick: (event) => {
|
|
205113
205136
|
event.stopPropagation();
|
|
@@ -205163,7 +205186,7 @@ function OrganizationTab({ platformKey, setOrganizationLogoFromOutside, tenant,
|
|
|
205163
205186
|
}, className: "hidden" })] })] })] })] }));
|
|
205164
205187
|
}
|
|
205165
205188
|
|
|
205166
|
-
function Account({ tenant, tenants = [], username, onInviteClick, email, mainPlatformKey, userActiveApp = null, showPlatformName = false, isAdmin = false, targetTab = 'basic', currentPlan: _currentPlan = '', currentSPA = '', authURL, onTenantUpdate, currentPlatformBaseDomain = '', enableRbac = false, rbacPermissions = {}, onLoadGroupPermissions, onTabChange, }) {
|
|
205189
|
+
function Account({ tenant, tenants = [], username, onInviteClick, email, mainPlatformKey, userActiveApp = null, showPlatformName = false, isAdmin = false, targetTab = 'basic', currentPlan: _currentPlan = '', currentSPA = '', authURL, onTenantUpdate, currentPlatformBaseDomain = '', enableRbac = false, rbacPermissions = {}, onLoadGroupPermissions, onTabChange, defaultSupportPhone = '', }) {
|
|
205167
205190
|
const currentTenant = tenants.find((t) => t.key === tenant);
|
|
205168
205191
|
const hasMonetizationPermission = checkRbacPermission(rbacPermissions, `/platforms/${tenant}/#can_sell_items`, enableRbac);
|
|
205169
205192
|
const canMonetize = (currentTenant === null || currentTenant === void 0 ? void 0 : currentTenant.enable_monetization) && hasMonetizationPermission;
|
|
@@ -205256,10 +205279,10 @@ function Account({ tenant, tenants = [], username, onInviteClick, email, mainPla
|
|
|
205256
205279
|
: 'text-gray-600 hover:bg-gray-50'}`, children: [jsx(CreditCard, { className: "h-4 w-4" }), jsx("span", { className: "hidden sm:inline", children: "Billing" }), jsx("span", { className: "sm:hidden", children: "Billing" })] }, 'billing'))] }) }) }), jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", style: { height: '100%' }, children: [jsxs("div", { className: "hidden lg:block flex-shrink-0 p-6 border-b border-gray-200 bg-white dark:bg-gray-900", children: [jsx("h3", { className: "text-lg font-medium text-gray-900 dark:text-gray-100 mb-2 capitalize", children: activeTab }), jsxs("p", { className: "text-gray-600 dark:text-gray-400 text-sm", children: [activeTab === 'management' && 'Manage users and their permissions in the system.', activeTab === 'organization' && 'Manage your organization settings.', activeTab === 'integrations' && 'Manage your integrations with other services.', activeTab === 'billing' && 'Manage your billing and subscription.', activeTab === 'monetization' && 'Configure paywalls, pricing, and revenue.', activeTab === 'advanced' && 'Configure advanced organization settings.'] })] }), jsxs("div", { className: "flex-1 p-6 space-y-6", style: {
|
|
205257
205280
|
overflowY: 'auto',
|
|
205258
205281
|
overflowX: 'hidden',
|
|
205259
|
-
}, children: [jsxs("div", { className: "lg:hidden mb-6", children: [jsx("h3", { className: "text-lg font-medium text-gray-900 dark:text-gray-100 mb-2 capitalize", children: activeTab }), jsxs("p", { className: "text-gray-600 dark:text-gray-400 text-sm", children: [activeTab === 'basic' && 'Manage your basic account information and preferences.', activeTab === 'social' && 'Connect and manage your social media accounts.', activeTab === 'security' && 'Update your security settings and password.', activeTab === 'management' && 'Manage users and their permissions in the system.', activeTab === 'organization' && 'Manage your organization settings.', activeTab === 'monetization' && 'Configure paywalls, pricing, and revenue.', activeTab === 'advanced' && 'Configure advanced organization settings.'] })] }), activeTab === 'management' && hasManagementPermissions && (jsx(Admin, { onInviteClick: onInviteClick, tenant: tenant, hasUserTabPermission: hasUserTabPermission, hasGroupsTabPermission: hasGroupsTabPermission, hasPoliciesTabPermission: hasPoliciesTabPermission, hasRolesTabPermission: hasRolesTabPermission, hasTeamsTabPermission: hasTeamsTabPermission, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, hasAlertsTabPermission: hasAlertsTabPermission, rbacPermissions: rbacPermissions, enableRbac: enableRbac })), activeTab === 'organization' && (jsx(OrganizationTab, { platformKey: tenant, tenant: tenants.find((t) => t.key === tenant), onTenantUpdate: onTenantUpdate, setOrganizationLogoFromOutside: setOrganizationLogo })), activeTab === 'integrations' && (jsx(IntegrationsTab, { tenantKey: tenant, username: username })), activeTab === 'billing' && (jsx(BillingTab, { tenant: tenant, userActiveApp: userActiveApp, username: username, currentUserEmail: email, mainPlatformKey: mainPlatformKey })), activeTab === 'monetization' && (jsx(MonetizationTab, { platformKey: tenant, authURL: authURL })), activeTab === 'advanced' && (jsx(AdvancedTab, { platformKey: tenant, currentSPA: currentSPA, username: username, authURL: authURL, currentPlatformBaseDomain: currentPlatformBaseDomain }))] })] }), jsx(ToastProvider, {})] }));
|
|
205282
|
+
}, children: [jsxs("div", { className: "lg:hidden mb-6", children: [jsx("h3", { className: "text-lg font-medium text-gray-900 dark:text-gray-100 mb-2 capitalize", children: activeTab }), jsxs("p", { className: "text-gray-600 dark:text-gray-400 text-sm", children: [activeTab === 'basic' && 'Manage your basic account information and preferences.', activeTab === 'social' && 'Connect and manage your social media accounts.', activeTab === 'security' && 'Update your security settings and password.', activeTab === 'management' && 'Manage users and their permissions in the system.', activeTab === 'organization' && 'Manage your organization settings.', activeTab === 'monetization' && 'Configure paywalls, pricing, and revenue.', activeTab === 'advanced' && 'Configure advanced organization settings.'] })] }), activeTab === 'management' && hasManagementPermissions && (jsx(Admin, { onInviteClick: onInviteClick, tenant: tenant, hasUserTabPermission: hasUserTabPermission, hasGroupsTabPermission: hasGroupsTabPermission, hasPoliciesTabPermission: hasPoliciesTabPermission, hasRolesTabPermission: hasRolesTabPermission, hasTeamsTabPermission: hasTeamsTabPermission, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, hasAlertsTabPermission: hasAlertsTabPermission, rbacPermissions: rbacPermissions, enableRbac: enableRbac })), activeTab === 'organization' && (jsx(OrganizationTab, { platformKey: tenant, tenant: tenants.find((t) => t.key === tenant), onTenantUpdate: onTenantUpdate, setOrganizationLogoFromOutside: setOrganizationLogo, defaultSupportPhone: defaultSupportPhone })), activeTab === 'integrations' && (jsx(IntegrationsTab, { tenantKey: tenant, username: username })), activeTab === 'billing' && (jsx(BillingTab, { tenant: tenant, userActiveApp: userActiveApp, username: username, currentUserEmail: email, mainPlatformKey: mainPlatformKey })), activeTab === 'monetization' && (jsx(MonetizationTab, { platformKey: tenant, authURL: authURL })), activeTab === 'advanced' && (jsx(AdvancedTab, { platformKey: tenant, currentSPA: currentSPA, username: username, authURL: authURL, currentPlatformBaseDomain: currentPlatformBaseDomain }))] })] }), jsx(ToastProvider, {})] }));
|
|
205260
205283
|
}
|
|
205261
205284
|
|
|
205262
|
-
function UserProfileModal({ isOpen, onClose, params, email, mainPlatformKey, showMentorAIDisplayCheckbox = false, showLeaderboardDisplayCheckbox = false, showUsernameField = false, showPlatformName = false, useGravatarPicFallback = true, enableCatalogInvite = false, targetTab = 'basic', currentPlan = '', currentSPA = '', userActiveApp = null, authURL, tenants = [], onTenantUpdate, currentPlatformBaseDomain = '', rbacPermissions = {}, enableRbac = false, onLoadGroupPermissions, onTabChange, onBillingTabRequest, onAccountDeleted, enableMemoryTab = false, localLLMProps, }) {
|
|
205285
|
+
function UserProfileModal({ isOpen, onClose, params, email, mainPlatformKey, showMentorAIDisplayCheckbox = false, showLeaderboardDisplayCheckbox = false, showUsernameField = false, showPlatformName = false, useGravatarPicFallback = true, enableCatalogInvite = false, targetTab = 'basic', currentPlan = '', currentSPA = '', userActiveApp = null, authURL, tenants = [], onTenantUpdate, currentPlatformBaseDomain = '', rbacPermissions = {}, enableRbac = false, onLoadGroupPermissions, onTabChange, defaultSupportPhone = '', onBillingTabRequest, onAccountDeleted, enableMemoryTab = false, localLLMProps, }) {
|
|
205263
205286
|
console.log('[UserProfileModal] localLLMProps received:', {
|
|
205264
205287
|
isAvailable: localLLMProps === null || localLLMProps === void 0 ? void 0 : localLLMProps.isAvailable,
|
|
205265
205288
|
foundryStatus: localLLMProps === null || localLLMProps === void 0 ? void 0 : localLLMProps.foundryStatus,
|
|
@@ -205323,7 +205346,7 @@ function UserProfileModal({ isOpen, onClose, params, email, mainPlatformKey, sho
|
|
|
205323
205346
|
showUsernameField: showUsernameField,
|
|
205324
205347
|
showPlatformName: showPlatformName,
|
|
205325
205348
|
useGravatarPicFallback: useGravatarPicFallback,
|
|
205326
|
-
}, isAdmin: params.isAdmin, targetTab: targetTab, onClose: onClose, onAccountDeleted: onAccountDeleted, enableMemoryTab: enableMemoryTab, localLLMProps: localLLMProps })), ['organization', 'management', 'integrations', 'billing', 'monetization'].includes(targetTab) && (jsxs(Fragment$1, { children: [jsx(Account, { onInviteClick: () => setIsInviteUserDialogOpen(true), tenant: params.tenantKey, tenants: tenants, username: getUserName$1(), email: email, mainPlatformKey: mainPlatformKey, showUsernameField: showUsernameField, showPlatformName: showPlatformName, useGravatarPicFallback: useGravatarPicFallback, onClose: onClose, isAdmin: params.isAdmin, targetTab: targetTab, currentPlan: currentPlan, currentSPA: currentSPA, userActiveApp: userActiveApp, authURL: authURL, onTenantUpdate: onTenantUpdate, currentPlatformBaseDomain: currentPlatformBaseDomain, rbacPermissions: rbacPermissions, enableRbac: enableRbac, onLoadGroupPermissions: onLoadGroupPermissions, onTabChange: onTabChange }), isInviteUserDialogOpen && (jsx(InviteUserDialog, { tenant: params.tenantKey, onClose: () => setIsInviteUserDialogOpen(false), isOpen: isInviteUserDialogOpen, enableCatalogInvite: enableCatalogInvite, hasManageUsersPermission: hasManageUsersPermission })), isInvitedUsersDialogOpen && (jsx(InvitedUsersDialog, { onClose: () => setIsInvitedUsersDialogOpen(false), tenant: params.tenantKey }))] }))] }) }) }));
|
|
205349
|
+
}, isAdmin: params.isAdmin, targetTab: targetTab, onClose: onClose, onAccountDeleted: onAccountDeleted, enableMemoryTab: enableMemoryTab, localLLMProps: localLLMProps })), ['organization', 'management', 'integrations', 'billing', 'monetization'].includes(targetTab) && (jsxs(Fragment$1, { children: [jsx(Account, { onInviteClick: () => setIsInviteUserDialogOpen(true), tenant: params.tenantKey, tenants: tenants, username: getUserName$1(), email: email, mainPlatformKey: mainPlatformKey, showUsernameField: showUsernameField, showPlatformName: showPlatformName, useGravatarPicFallback: useGravatarPicFallback, onClose: onClose, isAdmin: params.isAdmin, targetTab: targetTab, currentPlan: currentPlan, currentSPA: currentSPA, userActiveApp: userActiveApp, authURL: authURL, onTenantUpdate: onTenantUpdate, currentPlatformBaseDomain: currentPlatformBaseDomain, rbacPermissions: rbacPermissions, enableRbac: enableRbac, onLoadGroupPermissions: onLoadGroupPermissions, onTabChange: onTabChange, defaultSupportPhone: defaultSupportPhone }), isInviteUserDialogOpen && (jsx(InviteUserDialog, { tenant: params.tenantKey, onClose: () => setIsInviteUserDialogOpen(false), isOpen: isInviteUserDialogOpen, enableCatalogInvite: enableCatalogInvite, hasManageUsersPermission: hasManageUsersPermission })), isInvitedUsersDialogOpen && (jsx(InvitedUsersDialog, { onClose: () => setIsInvitedUsersDialogOpen(false), tenant: params.tenantKey }))] }))] }) }) }));
|
|
205327
205350
|
}
|
|
205328
205351
|
|
|
205329
205352
|
// Tauri types for model download functionality
|
|
@@ -205866,7 +205889,7 @@ className = '', dropdownClassName = 'mr-4 w-56 bg-white border border-gray-200 s
|
|
|
205866
205889
|
// Additional data
|
|
205867
205890
|
metadata, metadataLoaded = false,
|
|
205868
205891
|
// Customization
|
|
205869
|
-
currentSPA = '', showMentorAIDisplayCheckbox = false, showLeaderboardDisplayCheckbox = false, showUsernameField = false, showPlatformName = false, enableCatalogInvite = false, authURL, onTenantUpdate, currentPlatformBaseDomain = '', rbacPermissions = {}, enableRbac = false, onLoadGroupPermissions,
|
|
205892
|
+
currentSPA = '', showMentorAIDisplayCheckbox = false, showLeaderboardDisplayCheckbox = false, showUsernameField = false, showPlatformName = false, enableCatalogInvite = false, authURL, onTenantUpdate, currentPlatformBaseDomain = '', rbacPermissions = {}, enableRbac = false, onLoadGroupPermissions, defaultSupportPhone = '',
|
|
205870
205893
|
// Local LLM props
|
|
205871
205894
|
localLLMProps,
|
|
205872
205895
|
// Controlled modal state
|
|
@@ -206049,6 +206072,7 @@ isModalOpen, onModalOpenChange, defaultActiveTab, onAccountDeleted, enableMemory
|
|
|
206049
206072
|
onLoadGroupPermissions,
|
|
206050
206073
|
onTabChange,
|
|
206051
206074
|
onBillingTabRequest,
|
|
206075
|
+
defaultSupportPhone,
|
|
206052
206076
|
localLLMProps: {
|
|
206053
206077
|
isAvailable: isLocalLLMAvailable,
|
|
206054
206078
|
state: localLLMState,
|
|
@@ -220022,12 +220046,12 @@ function ChatActionBlockingOverlay({ isOpen, actionType, onStopScreenShare, }) {
|
|
|
220022
220046
|
return (jsx("div", { className: "fixed inset-0 flex items-center justify-center bg-black/70 backdrop-blur-sm", style: { zIndex: 9999 }, role: "dialog", "aria-modal": "true", "aria-labelledby": "blocking-overlay-title", "aria-describedby": "blocking-overlay-description", children: jsxs("div", { className: "mx-4 max-w-md rounded-2xl bg-white p-8 text-center shadow-2xl", children: [jsx("div", { className: "mx-auto mb-6 flex h-20 w-20 items-center justify-center rounded-full bg-blue-100", children: jsx(ActionIcon, { className: "h-10 w-10 text-blue-600" }) }), jsx("h2", { id: "blocking-overlay-title", className: "mb-3 text-xl font-semibold text-gray-900", children: isVoiceCall ? 'Voice Call Active' : 'Screen Sharing Active' }), jsxs("p", { id: "blocking-overlay-description", className: "mb-6 text-gray-600", children: ["Your ", actionLabel, " session is now active. Please return to the original window to continue your conversation with your agent."] }), jsx("div", { className: "mb-4 flex flex-col gap-3", children: !isVoiceCall && onStopScreenShare && (jsxs("button", { onClick: onStopScreenShare, className: "flex w-full items-center justify-center gap-2 rounded-lg bg-red-600 px-4 py-3 font-medium text-white transition-colors hover:bg-red-700", children: [jsx(CircleStop, { className: "h-5 w-5" }), jsx("span", { children: "Stop Screen Sharing" })] })) }), jsxs("p", { className: "mt-4 text-xs text-gray-500", children: ["This window will handle your ", actionLabel, " in the background. You can close this window when you're done."] })] }) }));
|
|
220023
220047
|
}
|
|
220024
220048
|
|
|
220025
|
-
const ToastErrorMessage = ({ message, supportEmail, tenantKey, }) => {
|
|
220049
|
+
const ToastErrorMessage = ({ message, supportEmail, supportPhone, useSupportPhone = false, tenantKey, }) => {
|
|
220026
220050
|
useEffect(() => {
|
|
220027
220051
|
console.error(JSON.stringify({ tenant: tenantKey, error: message }));
|
|
220028
220052
|
}, [message]);
|
|
220029
220053
|
const plainMessage = markdownToPlainText(message);
|
|
220030
|
-
return (jsx("div", { children: jsxs("span", { children: ["Sorry about that! ", String(plainMessage).match(/[.!?]$/) ? plainMessage : `${plainMessage}.`, ' ', "Please try again or", ' ', jsx("a", { className: "toast-wrapped-contact-tag text-blue-600 hover:text-blue-800", href: `mailto:${supportEmail}`, children: "contact us" }), "."] }) }));
|
|
220054
|
+
return (jsx("div", { children: jsxs("span", { children: ["Sorry about that! ", String(plainMessage).match(/[.!?]$/) ? plainMessage : `${plainMessage}.`, ' ', "Please try again or", ' ', jsx("a", { className: "toast-wrapped-contact-tag text-blue-600 hover:text-blue-800", href: `mailto:${supportEmail}`, children: "contact us" }), ".", useSupportPhone && supportPhone ? (jsxs(Fragment$1, { children: [' ', "If you prefer, text us at", ' ', jsx("a", { className: "toast-wrapped-contact-tag text-blue-600 hover:text-blue-800", href: `tel:${supportPhone}`, children: supportPhone }), "."] })) : null] }) }));
|
|
220031
220055
|
};
|
|
220032
220056
|
|
|
220033
220057
|
/* istanbul ignore next -- @preserve dynamic import */
|
|
@@ -220129,7 +220153,7 @@ function Chat({ mode = 'default', isPreviewMode = false, hasBorder = true, isInC
|
|
|
220129
220153
|
// Skip tenant metadata API call in Tauri offline mode
|
|
220130
220154
|
// isTauriOfflineMode() already checks isOfflineServerOrigin() internally
|
|
220131
220155
|
const isTauriOffline = isTauriOfflineMode();
|
|
220132
|
-
const { platformName: tenantPlatformName, metadata: tenantMetadata } = useTenantMetadata({
|
|
220156
|
+
const { platformName: tenantPlatformName, metadata: tenantMetadata, isSupportPhoneEnabled, } = useTenantMetadata({
|
|
220133
220157
|
org: tenantKey,
|
|
220134
220158
|
skip: isTauriOffline,
|
|
220135
220159
|
});
|
|
@@ -220202,7 +220226,7 @@ function Chat({ mode = 'default', isPreviewMode = false, hasBorder = true, isInC
|
|
|
220202
220226
|
if (error) {
|
|
220203
220227
|
console.error(JSON.stringify({ tenant: tenantKey, error }));
|
|
220204
220228
|
}
|
|
220205
|
-
toast.error(jsx(ToastErrorMessage, { message: message, supportEmail: (metadata === null || metadata === void 0 ? void 0 : metadata.support_email) || config.supportEmail(), tenantKey: tenantKey }), { closeButton: true, duration: TOAST_DURATION });
|
|
220229
|
+
toast.error(jsx(ToastErrorMessage, { message: message, supportEmail: (metadata === null || metadata === void 0 ? void 0 : metadata.support_email) || config.supportEmail(), supportPhone: metadata === null || metadata === void 0 ? void 0 : metadata.support_phone, useSupportPhone: isSupportPhoneEnabled(), tenantKey: tenantKey }), { closeButton: true, duration: TOAST_DURATION });
|
|
220206
220230
|
},
|
|
220207
220231
|
redirectToAuthSpa,
|
|
220208
220232
|
sendMessageToParentWebsite,
|
|
@@ -220247,7 +220271,7 @@ function Chat({ mode = 'default', isPreviewMode = false, hasBorder = true, isInC
|
|
|
220247
220271
|
if (error) {
|
|
220248
220272
|
console.error(JSON.stringify({ tenant: tenantKey, error }));
|
|
220249
220273
|
}
|
|
220250
|
-
toast.error(jsx(ToastErrorMessage, { message: message, supportEmail: (metadata === null || metadata === void 0 ? void 0 : metadata.support_email) || config.supportEmail(), tenantKey: tenantKey }), { closeButton: true, duration: TOAST_DURATION });
|
|
220274
|
+
toast.error(jsx(ToastErrorMessage, { message: message, supportEmail: (metadata === null || metadata === void 0 ? void 0 : metadata.support_email) || config.supportEmail(), supportPhone: metadata === null || metadata === void 0 ? void 0 : metadata.support_phone, useSupportPhone: isSupportPhoneEnabled(), tenantKey: tenantKey }), { closeButton: true, duration: TOAST_DURATION });
|
|
220251
220275
|
},
|
|
220252
220276
|
});
|
|
220253
220277
|
const [mentorAccessibilityMessage, setMentorAccessibilityMessage] = useState('');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iblai/iblai-js",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.19",
|
|
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,8 +68,8 @@
|
|
|
68
68
|
"winston": "3.19.0",
|
|
69
69
|
"@iblai/data-layer": "1.7.5",
|
|
70
70
|
"@iblai/mcp": "1.5.6",
|
|
71
|
-
"@iblai/web-containers": "1.8.
|
|
72
|
-
"@iblai/web-utils": "1.10.
|
|
71
|
+
"@iblai/web-containers": "1.8.14",
|
|
72
|
+
"@iblai/web-utils": "1.10.10"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"@radix-ui/react-dialog": "^1.1.7",
|