@iblai/iblai-js 2.6.0 → 2.6.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.
|
@@ -63830,12 +63830,14 @@ var profileOrganization$3 = {
|
|
|
63830
63830
|
defaultName: "Default",
|
|
63831
63831
|
support: "Support",
|
|
63832
63832
|
supportEmailPlaceholder: "Enter organization support address",
|
|
63833
|
-
supportPhone: "
|
|
63833
|
+
supportPhone: "Call / Text",
|
|
63834
63834
|
supportPhonePlaceholder: "Enter organization support phone number",
|
|
63835
63835
|
notSet: "Not set",
|
|
63836
63836
|
helpCenter: "Help Center",
|
|
63837
63837
|
toggleHelpCenterVisibility: "Toggle Help Center visibility",
|
|
63838
63838
|
helpCenterUrlPlaceholder: "Enter help center URL",
|
|
63839
|
+
documentation: "Documentation",
|
|
63840
|
+
documentationPlaceholder: "Enter organization documentation URL",
|
|
63839
63841
|
lightLogo: "Light Logo",
|
|
63840
63842
|
removeImage: "Remove image",
|
|
63841
63843
|
upload: "+ Upload",
|
|
@@ -63848,6 +63850,7 @@ var profileOrganization$3 = {
|
|
|
63848
63850
|
supportUpdated: "Support updated successfully",
|
|
63849
63851
|
updateFailed: "Failed to update",
|
|
63850
63852
|
supportPhoneUpdated: "Support phone updated successfully",
|
|
63853
|
+
documentationUpdated: "Documentation updated successfully",
|
|
63851
63854
|
helpCenterUpdated: "Help Center updated successfully",
|
|
63852
63855
|
helpCenterEnabled: "Help Center enabled",
|
|
63853
63856
|
helpCenterDisabled: "Help Center disabled"
|
|
@@ -70950,12 +70953,14 @@ var profileOrganization$2 = {
|
|
|
70950
70953
|
defaultName: "Par défaut",
|
|
70951
70954
|
support: "Assistance",
|
|
70952
70955
|
supportEmailPlaceholder: "Entrez l'adresse d'assistance de l'organisation",
|
|
70953
|
-
supportPhone: "
|
|
70956
|
+
supportPhone: "Appel / SMS",
|
|
70954
70957
|
supportPhonePlaceholder: "Entrez le numéro de téléphone d'assistance de l'organisation",
|
|
70955
70958
|
notSet: "Non défini",
|
|
70956
70959
|
helpCenter: "Centre d'aide",
|
|
70957
70960
|
toggleHelpCenterVisibility: "Activer/désactiver la visibilité du centre d'aide",
|
|
70958
70961
|
helpCenterUrlPlaceholder: "Entrez l'URL du centre d'aide",
|
|
70962
|
+
documentation: "Documentation",
|
|
70963
|
+
documentationPlaceholder: "Entrez l'URL de la documentation de l'organisation",
|
|
70959
70964
|
lightLogo: "Logo clair",
|
|
70960
70965
|
removeImage: "Supprimer l'image",
|
|
70961
70966
|
upload: "+ Télécharger",
|
|
@@ -70968,6 +70973,7 @@ var profileOrganization$2 = {
|
|
|
70968
70973
|
supportUpdated: "Assistance mise à jour avec succès",
|
|
70969
70974
|
updateFailed: "Échec de la mise à jour",
|
|
70970
70975
|
supportPhoneUpdated: "Téléphone d'assistance mis à jour avec succès",
|
|
70976
|
+
documentationUpdated: "Documentation mise à jour avec succès",
|
|
70971
70977
|
helpCenterUpdated: "Centre d'aide mis à jour avec succès",
|
|
70972
70978
|
helpCenterEnabled: "Centre d'aide activé",
|
|
70973
70979
|
helpCenterDisabled: "Centre d'aide désactivé"
|
|
@@ -77904,12 +77910,14 @@ var profileOrganization$1 = {
|
|
|
77904
77910
|
defaultName: "Predeterminado",
|
|
77905
77911
|
support: "Soporte",
|
|
77906
77912
|
supportEmailPlaceholder: "Ingrese la dirección de soporte de la organización",
|
|
77907
|
-
supportPhone: "
|
|
77913
|
+
supportPhone: "Llamar / Mensaje",
|
|
77908
77914
|
supportPhonePlaceholder: "Ingrese el número de teléfono de soporte de la organización",
|
|
77909
77915
|
notSet: "No establecido",
|
|
77910
77916
|
helpCenter: "Centro de ayuda",
|
|
77911
77917
|
toggleHelpCenterVisibility: "Alternar visibilidad del centro de ayuda",
|
|
77912
77918
|
helpCenterUrlPlaceholder: "Ingrese la URL del centro de ayuda",
|
|
77919
|
+
documentation: "Documentación",
|
|
77920
|
+
documentationPlaceholder: "Ingrese la URL de la documentación de la organización",
|
|
77913
77921
|
lightLogo: "Logo claro",
|
|
77914
77922
|
removeImage: "Eliminar imagen",
|
|
77915
77923
|
upload: "+ Subir",
|
|
@@ -77922,6 +77930,7 @@ var profileOrganization$1 = {
|
|
|
77922
77930
|
supportUpdated: "Soporte actualizado correctamente",
|
|
77923
77931
|
updateFailed: "Error al actualizar",
|
|
77924
77932
|
supportPhoneUpdated: "Teléfono de soporte actualizado correctamente",
|
|
77933
|
+
documentationUpdated: "Documentación actualizada correctamente",
|
|
77925
77934
|
helpCenterUpdated: "Centro de ayuda actualizado correctamente",
|
|
77926
77935
|
helpCenterEnabled: "Centro de ayuda habilitado",
|
|
77927
77936
|
helpCenterDisabled: "Centro de ayuda deshabilitado"
|
|
@@ -84858,12 +84867,14 @@ var profileOrganization = {
|
|
|
84858
84867
|
defaultName: "默认",
|
|
84859
84868
|
support: "支持",
|
|
84860
84869
|
supportEmailPlaceholder: "输入组织支持地址",
|
|
84861
|
-
supportPhone: "
|
|
84870
|
+
supportPhone: "电话 / 短信",
|
|
84862
84871
|
supportPhonePlaceholder: "输入组织支持电话号码",
|
|
84863
84872
|
notSet: "未设置",
|
|
84864
84873
|
helpCenter: "帮助中心",
|
|
84865
84874
|
toggleHelpCenterVisibility: "切换帮助中心可见性",
|
|
84866
84875
|
helpCenterUrlPlaceholder: "输入帮助中心 URL",
|
|
84876
|
+
documentation: "文档",
|
|
84877
|
+
documentationPlaceholder: "输入组织文档网址",
|
|
84867
84878
|
lightLogo: "浅色徽标",
|
|
84868
84879
|
removeImage: "删除图片",
|
|
84869
84880
|
upload: "+ 上传",
|
|
@@ -84876,6 +84887,7 @@ var profileOrganization = {
|
|
|
84876
84887
|
supportUpdated: "支持信息更新成功",
|
|
84877
84888
|
updateFailed: "更新失败",
|
|
84878
84889
|
supportPhoneUpdated: "支持电话更新成功",
|
|
84890
|
+
documentationUpdated: "文档更新成功",
|
|
84879
84891
|
helpCenterUpdated: "帮助中心更新成功",
|
|
84880
84892
|
helpCenterEnabled: "帮助中心已启用",
|
|
84881
84893
|
helpCenterDisabled: "帮助中心已禁用"
|
|
@@ -195864,22 +195876,25 @@ function AdvancedTab({ platformKey, username, currentSPA, authURL, currentPlatfo
|
|
|
195864
195876
|
'enable_profile_screen_on_start_page',
|
|
195865
195877
|
'enable_get_started_screen_on_start_page',
|
|
195866
195878
|
];
|
|
195879
|
+
// Settings that are edited in the Organization tab, so they are not duplicated here
|
|
195880
|
+
const organizationTabSlugs = ['show_help', 'support_url', 'help_center_url', 'documentation_url'];
|
|
195867
195881
|
// String settings rendered as a free-text input; every other string setting is
|
|
195868
195882
|
// either handled by a dedicated component or exposed through its own options list
|
|
195869
195883
|
const stringSettingSlugs = [
|
|
195870
195884
|
'overall_default_mentor',
|
|
195871
|
-
'help_center_url',
|
|
195872
195885
|
'monetization_base_path',
|
|
195873
195886
|
'skills_welcome_tagline',
|
|
195874
195887
|
];
|
|
195875
195888
|
const getConfigurableMetadatas = () => {
|
|
195876
195889
|
// Include boolean, select and whitelisted string settings, but exclude start
|
|
195877
|
-
// screen settings which are handled by the StartScreenContent component
|
|
195890
|
+
// screen settings which are handled by the StartScreenContent component and
|
|
195891
|
+
// settings owned by the Organization tab
|
|
195878
195892
|
const configurableMetadatas = getAllMetadatas().filter((metadata) => (typeof metadata.defaultValue === 'boolean' ||
|
|
195879
195893
|
hasSelectableOptions(metadata) ||
|
|
195880
195894
|
(typeof metadata.defaultValue === 'string' &&
|
|
195881
195895
|
stringSettingSlugs.includes(metadata.slug))) &&
|
|
195882
|
-
!startScreenSlugs.includes(metadata.slug)
|
|
195896
|
+
!startScreenSlugs.includes(metadata.slug) &&
|
|
195897
|
+
!organizationTabSlugs.includes(metadata.slug));
|
|
195883
195898
|
// Show all configurable settings when no SPA is specified
|
|
195884
195899
|
if (!currentSPA)
|
|
195885
195900
|
return configurableMetadatas;
|
|
@@ -100655,12 +100655,14 @@ var profileOrganization$3 = {
|
|
|
100655
100655
|
defaultName: "Default",
|
|
100656
100656
|
support: "Support",
|
|
100657
100657
|
supportEmailPlaceholder: "Enter organization support address",
|
|
100658
|
-
supportPhone: "
|
|
100658
|
+
supportPhone: "Call / Text",
|
|
100659
100659
|
supportPhonePlaceholder: "Enter organization support phone number",
|
|
100660
100660
|
notSet: "Not set",
|
|
100661
100661
|
helpCenter: "Help Center",
|
|
100662
100662
|
toggleHelpCenterVisibility: "Toggle Help Center visibility",
|
|
100663
100663
|
helpCenterUrlPlaceholder: "Enter help center URL",
|
|
100664
|
+
documentation: "Documentation",
|
|
100665
|
+
documentationPlaceholder: "Enter organization documentation URL",
|
|
100664
100666
|
lightLogo: "Light Logo",
|
|
100665
100667
|
removeImage: "Remove image",
|
|
100666
100668
|
upload: "+ Upload",
|
|
@@ -100673,6 +100675,7 @@ var profileOrganization$3 = {
|
|
|
100673
100675
|
supportUpdated: "Support updated successfully",
|
|
100674
100676
|
updateFailed: "Failed to update",
|
|
100675
100677
|
supportPhoneUpdated: "Support phone updated successfully",
|
|
100678
|
+
documentationUpdated: "Documentation updated successfully",
|
|
100676
100679
|
helpCenterUpdated: "Help Center updated successfully",
|
|
100677
100680
|
helpCenterEnabled: "Help Center enabled",
|
|
100678
100681
|
helpCenterDisabled: "Help Center disabled"
|
|
@@ -107775,12 +107778,14 @@ var profileOrganization$2 = {
|
|
|
107775
107778
|
defaultName: "Par défaut",
|
|
107776
107779
|
support: "Assistance",
|
|
107777
107780
|
supportEmailPlaceholder: "Entrez l'adresse d'assistance de l'organisation",
|
|
107778
|
-
supportPhone: "
|
|
107781
|
+
supportPhone: "Appel / SMS",
|
|
107779
107782
|
supportPhonePlaceholder: "Entrez le numéro de téléphone d'assistance de l'organisation",
|
|
107780
107783
|
notSet: "Non défini",
|
|
107781
107784
|
helpCenter: "Centre d'aide",
|
|
107782
107785
|
toggleHelpCenterVisibility: "Activer/désactiver la visibilité du centre d'aide",
|
|
107783
107786
|
helpCenterUrlPlaceholder: "Entrez l'URL du centre d'aide",
|
|
107787
|
+
documentation: "Documentation",
|
|
107788
|
+
documentationPlaceholder: "Entrez l'URL de la documentation de l'organisation",
|
|
107784
107789
|
lightLogo: "Logo clair",
|
|
107785
107790
|
removeImage: "Supprimer l'image",
|
|
107786
107791
|
upload: "+ Télécharger",
|
|
@@ -107793,6 +107798,7 @@ var profileOrganization$2 = {
|
|
|
107793
107798
|
supportUpdated: "Assistance mise à jour avec succès",
|
|
107794
107799
|
updateFailed: "Échec de la mise à jour",
|
|
107795
107800
|
supportPhoneUpdated: "Téléphone d'assistance mis à jour avec succès",
|
|
107801
|
+
documentationUpdated: "Documentation mise à jour avec succès",
|
|
107796
107802
|
helpCenterUpdated: "Centre d'aide mis à jour avec succès",
|
|
107797
107803
|
helpCenterEnabled: "Centre d'aide activé",
|
|
107798
107804
|
helpCenterDisabled: "Centre d'aide désactivé"
|
|
@@ -114729,12 +114735,14 @@ var profileOrganization$1 = {
|
|
|
114729
114735
|
defaultName: "Predeterminado",
|
|
114730
114736
|
support: "Soporte",
|
|
114731
114737
|
supportEmailPlaceholder: "Ingrese la dirección de soporte de la organización",
|
|
114732
|
-
supportPhone: "
|
|
114738
|
+
supportPhone: "Llamar / Mensaje",
|
|
114733
114739
|
supportPhonePlaceholder: "Ingrese el número de teléfono de soporte de la organización",
|
|
114734
114740
|
notSet: "No establecido",
|
|
114735
114741
|
helpCenter: "Centro de ayuda",
|
|
114736
114742
|
toggleHelpCenterVisibility: "Alternar visibilidad del centro de ayuda",
|
|
114737
114743
|
helpCenterUrlPlaceholder: "Ingrese la URL del centro de ayuda",
|
|
114744
|
+
documentation: "Documentación",
|
|
114745
|
+
documentationPlaceholder: "Ingrese la URL de la documentación de la organización",
|
|
114738
114746
|
lightLogo: "Logo claro",
|
|
114739
114747
|
removeImage: "Eliminar imagen",
|
|
114740
114748
|
upload: "+ Subir",
|
|
@@ -114747,6 +114755,7 @@ var profileOrganization$1 = {
|
|
|
114747
114755
|
supportUpdated: "Soporte actualizado correctamente",
|
|
114748
114756
|
updateFailed: "Error al actualizar",
|
|
114749
114757
|
supportPhoneUpdated: "Teléfono de soporte actualizado correctamente",
|
|
114758
|
+
documentationUpdated: "Documentación actualizada correctamente",
|
|
114750
114759
|
helpCenterUpdated: "Centro de ayuda actualizado correctamente",
|
|
114751
114760
|
helpCenterEnabled: "Centro de ayuda habilitado",
|
|
114752
114761
|
helpCenterDisabled: "Centro de ayuda deshabilitado"
|
|
@@ -121683,12 +121692,14 @@ var profileOrganization = {
|
|
|
121683
121692
|
defaultName: "默认",
|
|
121684
121693
|
support: "支持",
|
|
121685
121694
|
supportEmailPlaceholder: "输入组织支持地址",
|
|
121686
|
-
supportPhone: "
|
|
121695
|
+
supportPhone: "电话 / 短信",
|
|
121687
121696
|
supportPhonePlaceholder: "输入组织支持电话号码",
|
|
121688
121697
|
notSet: "未设置",
|
|
121689
121698
|
helpCenter: "帮助中心",
|
|
121690
121699
|
toggleHelpCenterVisibility: "切换帮助中心可见性",
|
|
121691
121700
|
helpCenterUrlPlaceholder: "输入帮助中心 URL",
|
|
121701
|
+
documentation: "文档",
|
|
121702
|
+
documentationPlaceholder: "输入组织文档网址",
|
|
121692
121703
|
lightLogo: "浅色徽标",
|
|
121693
121704
|
removeImage: "删除图片",
|
|
121694
121705
|
upload: "+ 上传",
|
|
@@ -121701,6 +121712,7 @@ var profileOrganization = {
|
|
|
121701
121712
|
supportUpdated: "支持信息更新成功",
|
|
121702
121713
|
updateFailed: "更新失败",
|
|
121703
121714
|
supportPhoneUpdated: "支持电话更新成功",
|
|
121715
|
+
documentationUpdated: "文档更新成功",
|
|
121704
121716
|
helpCenterUpdated: "帮助中心更新成功",
|
|
121705
121717
|
helpCenterEnabled: "帮助中心已启用",
|
|
121706
121718
|
helpCenterDisabled: "帮助中心已禁用"
|
|
@@ -228957,22 +228969,25 @@ function AdvancedTab({ platformKey, username, currentSPA, authURL, currentPlatfo
|
|
|
228957
228969
|
'enable_profile_screen_on_start_page',
|
|
228958
228970
|
'enable_get_started_screen_on_start_page',
|
|
228959
228971
|
];
|
|
228972
|
+
// Settings that are edited in the Organization tab, so they are not duplicated here
|
|
228973
|
+
const organizationTabSlugs = ['show_help', 'support_url', 'help_center_url', 'documentation_url'];
|
|
228960
228974
|
// String settings rendered as a free-text input; every other string setting is
|
|
228961
228975
|
// either handled by a dedicated component or exposed through its own options list
|
|
228962
228976
|
const stringSettingSlugs = [
|
|
228963
228977
|
'overall_default_mentor',
|
|
228964
|
-
'help_center_url',
|
|
228965
228978
|
'monetization_base_path',
|
|
228966
228979
|
'skills_welcome_tagline',
|
|
228967
228980
|
];
|
|
228968
228981
|
const getConfigurableMetadatas = () => {
|
|
228969
228982
|
// Include boolean, select and whitelisted string settings, but exclude start
|
|
228970
|
-
// screen settings which are handled by the StartScreenContent component
|
|
228983
|
+
// screen settings which are handled by the StartScreenContent component and
|
|
228984
|
+
// settings owned by the Organization tab
|
|
228971
228985
|
const configurableMetadatas = getAllMetadatas().filter((metadata) => (typeof metadata.defaultValue === 'boolean' ||
|
|
228972
228986
|
hasSelectableOptions(metadata) ||
|
|
228973
228987
|
(typeof metadata.defaultValue === 'string' &&
|
|
228974
228988
|
stringSettingSlugs.includes(metadata.slug))) &&
|
|
228975
|
-
!startScreenSlugs.includes(metadata.slug)
|
|
228989
|
+
!startScreenSlugs.includes(metadata.slug) &&
|
|
228990
|
+
!organizationTabSlugs.includes(metadata.slug));
|
|
228976
228991
|
// Show all configurable settings when no SPA is specified
|
|
228977
228992
|
if (!currentSPA)
|
|
228978
228993
|
return configurableMetadatas;
|
|
@@ -263453,6 +263468,9 @@ function OrganizationTab({ platformKey, setOrganizationLogoFromOutside, tenant,
|
|
|
263453
263468
|
const [isEditingSupportPhone, setIsEditingSupportPhone] = useState(false);
|
|
263454
263469
|
const [tempSupportPhone, setTempSupportPhone] = useState('');
|
|
263455
263470
|
const [showSupportPhone, setShowSupportPhone] = useState(true);
|
|
263471
|
+
const [documentationUrl, setDocumentationUrl] = useState('');
|
|
263472
|
+
const [isEditingDocumentationUrl, setIsEditingDocumentationUrl] = useState(false);
|
|
263473
|
+
const [tempDocumentationUrl, setTempDocumentationUrl] = useState('');
|
|
263456
263474
|
const [helpCenterUrl, setHelpCenterUrl] = useState('');
|
|
263457
263475
|
const [isEditingHelpCenterUrl, setIsEditingHelpCenterUrl] = useState(false);
|
|
263458
263476
|
const [tempHelpCenterUrl, setTempHelpCenterUrl] = useState('');
|
|
@@ -263461,7 +263479,8 @@ function OrganizationTab({ platformKey, setOrganizationLogoFromOutside, tenant,
|
|
|
263461
263479
|
const [organizationDarkLogo, setOrganizationDarkLogo] = useState(`${LOGO_ENDPOINTS.dark_logo(platformKey)}?v=${Date.now()}`);
|
|
263462
263480
|
const lightLogoInputRef = useRef(null);
|
|
263463
263481
|
const darkLogoInputRef = useRef(null);
|
|
263464
|
-
const DEFAULT_HELP_CENTER_URL = 'https://
|
|
263482
|
+
const DEFAULT_HELP_CENTER_URL = 'https://ibl.ai/support';
|
|
263483
|
+
const DEFAULT_DOCUMENTATION_URL = 'https://ibl.ai/docs';
|
|
263465
263484
|
useEffect(() => {
|
|
263466
263485
|
if (tenant) {
|
|
263467
263486
|
setOrganizationName((isAlphaNumeric32((tenant === null || tenant === void 0 ? void 0 : tenant.platform_name) || '') ? '' : tenant === null || tenant === void 0 ? void 0 : tenant.platform_name) || '');
|
|
@@ -263479,7 +263498,10 @@ function OrganizationTab({ platformKey, setOrganizationLogoFromOutside, tenant,
|
|
|
263479
263498
|
setSupportPhone((metadata === null || metadata === void 0 ? void 0 : metadata.support_phone) || defaultSupportPhone);
|
|
263480
263499
|
setTempSupportPhone((metadata === null || metadata === void 0 ? void 0 : metadata.support_phone) || defaultSupportPhone);
|
|
263481
263500
|
setShowSupportPhone(enableSupportPhone !== null && enableSupportPhone !== void 0 ? enableSupportPhone : (metadata === null || metadata === void 0 ? void 0 : metadata.enable_support_phone) !== false);
|
|
263482
|
-
const
|
|
263501
|
+
const strippedDocumentationUrl = stripProtocol((metadata === null || metadata === void 0 ? void 0 : metadata.documentation_url) || DEFAULT_DOCUMENTATION_URL);
|
|
263502
|
+
setDocumentationUrl(strippedDocumentationUrl);
|
|
263503
|
+
setTempDocumentationUrl(strippedDocumentationUrl);
|
|
263504
|
+
const strippedHelpCenterUrl = stripProtocol((metadata === null || metadata === void 0 ? void 0 : metadata.support_url) || (metadata === null || metadata === void 0 ? void 0 : metadata.help_center_url) || DEFAULT_HELP_CENTER_URL);
|
|
263483
263505
|
setHelpCenterUrl(strippedHelpCenterUrl);
|
|
263484
263506
|
setTempHelpCenterUrl(strippedHelpCenterUrl);
|
|
263485
263507
|
setShowHelp((metadata === null || metadata === void 0 ? void 0 : metadata.show_help) !== false);
|
|
@@ -263594,13 +263616,29 @@ function OrganizationTab({ platformKey, setOrganizationLogoFromOutside, tenant,
|
|
|
263594
263616
|
setTempSupportPhone(supportPhone);
|
|
263595
263617
|
setIsEditingSupportPhone(false);
|
|
263596
263618
|
};
|
|
263619
|
+
const handleEditDocumentationUrl = () => {
|
|
263620
|
+
setTempDocumentationUrl(documentationUrl);
|
|
263621
|
+
setIsEditingDocumentationUrl(true);
|
|
263622
|
+
};
|
|
263623
|
+
const handleSaveDocumentationUrl = async () => {
|
|
263624
|
+
const strippedDocumentationUrl = stripProtocol(tempDocumentationUrl);
|
|
263625
|
+
updateOrganizationMetadata('documentation_url', tempDocumentationUrl, () => {
|
|
263626
|
+
toast.success(t('profileOrganization.documentationUpdated'));
|
|
263627
|
+
setDocumentationUrl(strippedDocumentationUrl);
|
|
263628
|
+
setIsEditingDocumentationUrl(false);
|
|
263629
|
+
});
|
|
263630
|
+
};
|
|
263631
|
+
const handleCancelDocumentationUrl = () => {
|
|
263632
|
+
setTempDocumentationUrl(documentationUrl);
|
|
263633
|
+
setIsEditingDocumentationUrl(false);
|
|
263634
|
+
};
|
|
263597
263635
|
const handleEditHelpCenterUrl = () => {
|
|
263598
263636
|
setTempHelpCenterUrl(helpCenterUrl);
|
|
263599
263637
|
setIsEditingHelpCenterUrl(true);
|
|
263600
263638
|
};
|
|
263601
263639
|
const handleSaveHelpCenterUrl = async () => {
|
|
263602
263640
|
const strippedHelpCenterUrl = stripProtocol(tempHelpCenterUrl);
|
|
263603
|
-
updateOrganizationMetadata('
|
|
263641
|
+
updateOrganizationMetadata('support_url', tempHelpCenterUrl, () => {
|
|
263604
263642
|
toast.success(t('profileOrganization.helpCenterUpdated'));
|
|
263605
263643
|
setHelpCenterUrl(strippedHelpCenterUrl);
|
|
263606
263644
|
setIsEditingHelpCenterUrl(false);
|
|
@@ -263622,7 +263660,7 @@ function OrganizationTab({ platformKey, setOrganizationLogoFromOutside, tenant,
|
|
|
263622
263660
|
? t('profileOrganization.saving')
|
|
263623
263661
|
: t('profileOrganization.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" }), t('profileOrganization.cancel')] })] })) : (jsxs("div", { className: "flex items-center gap-2 mt-1", children: [jsx("span", { className: "text-sm text-gray-600 font-semibold", children: organizationName || t('profileOrganization.defaultName') }), 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$1, { htmlFor: "orgName", className: "text-gray-500 dark:text-gray-400 text-base", children: t('profileOrganization.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: t('profileOrganization.supportEmailPlaceholder'), 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" }), t('profileOrganization.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" }), t('profileOrganization.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$1, { htmlFor: "supportPhone", className: "text-gray-500 dark:text-gray-400 text-base", children: t('profileOrganization.supportPhone') }), 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: t('profileOrganization.supportPhonePlaceholder'), 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" }), t('profileOrganization.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" }), t('profileOrganization.cancel')] })] })) : (jsxs("div", { className: "flex items-center gap-2 mt-1", children: [jsx("span", { className: "text-sm text-gray-600 font-semibold", children: supportPhone || t('profileOrganization.notSet') }), 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$1, { htmlFor: "helpCenterUrl", className: "text-gray-500 dark:text-gray-400 text-base", children: t('profileOrganization.helpCenter') }), jsx(Switch, { checked: showHelp, onCheckedChange: handleToggleShowHelp, disabled: isUpdatingTenantMetadata, "aria-label": t('profileOrganization.toggleHelpCenterVisibility'), 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: t('profileOrganization.helpCenterUrlPlaceholder'), autoFocus: true }), jsxs(Button$1, { onClick: handleSaveHelpCenterUrl, size: "sm",
|
|
263624
263662
|
//disabled={!tempCustomFaqUrl.trim()}
|
|
263625
|
-
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" }), t('profileOrganization.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" }), t('profileOrganization.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$1, { htmlFor: "orgName", className: "text-gray-500 dark:text-gray-400 text-base", children: t('profileOrganization.lightLogo') }), 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) => {
|
|
263663
|
+
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" }), t('profileOrganization.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" }), t('profileOrganization.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: "mb-6", children: [jsx(Label$1, { htmlFor: "documentationUrl", className: "text-gray-500 dark:text-gray-400 text-base", children: t('profileOrganization.documentation') }), isEditingDocumentationUrl ? (jsxs("div", { className: "flex items-center gap-2 mt-1", children: [jsx(Input, { id: "documentationUrl", value: tempDocumentationUrl, onChange: (e) => setTempDocumentationUrl(e.target.value), className: "max-w-md text-sm font-semibold", placeholder: t('profileOrganization.documentationPlaceholder'), autoFocus: true }), jsxs(Button$1, { onClick: handleSaveDocumentationUrl, size: "sm", disabled: 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" }), t('profileOrganization.save')] }), jsxs(Button$1, { onClick: handleCancelDocumentationUrl, variant: "outline", size: "sm", className: "h-9 bg-transparent", children: [jsx(X$2, { className: "w-4 h-4 mr-1" }), t('profileOrganization.cancel')] })] })) : (jsxs("div", { className: "flex items-center gap-2 mt-1", children: [jsx("span", { className: "text-sm text-gray-600 font-semibold", children: documentationUrl }), jsx(Button$1, { onClick: handleEditDocumentationUrl, 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$1, { htmlFor: "orgName", className: "text-gray-500 dark:text-gray-400 text-base", children: t('profileOrganization.lightLogo') }), 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) => {
|
|
263626
263664
|
event.stopPropagation();
|
|
263627
263665
|
if (lightLogoInputRef.current) {
|
|
263628
263666
|
lightLogoInputRef.current.click();
|
|
@@ -265123,7 +265161,7 @@ isModalOpen, onModalOpenChange, defaultActiveTab, onAccountDeleted, enableMemory
|
|
|
265123
265161
|
return `https://${url}`;
|
|
265124
265162
|
};
|
|
265125
265163
|
const getHelpUrl = () => {
|
|
265126
|
-
return addProtocolToUrl((metadata === null || metadata === void 0 ? void 0 : metadata.help_center_url) || helpCenterUrl);
|
|
265164
|
+
return addProtocolToUrl((metadata === null || metadata === void 0 ? void 0 : metadata.support_url) || (metadata === null || metadata === void 0 ? void 0 : metadata.help_center_url) || helpCenterUrl);
|
|
265127
265165
|
};
|
|
265128
265166
|
const getShowHelp = () => {
|
|
265129
265167
|
return (metadata === null || metadata === void 0 ? void 0 : metadata.show_help) !== false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iblai/iblai-js",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.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": {
|
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
"dotenv": "16.6.1",
|
|
78
78
|
"winston": "3.19.0",
|
|
79
79
|
"@iblai/data-layer": "1.13.0",
|
|
80
|
-
"@iblai/mcp": "1.11.
|
|
81
|
-
"@iblai/web-
|
|
82
|
-
"@iblai/web-
|
|
80
|
+
"@iblai/mcp": "1.11.1",
|
|
81
|
+
"@iblai/web-utils": "2.2.1",
|
|
82
|
+
"@iblai/web-containers": "1.18.11"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"@iblai/iblai-api": "4.166.0-ai",
|