@wellesley/settings 1.0.715 → 1.0.717

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.
Files changed (2) hide show
  1. package/index.mjs +1 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import{createAction as Ds,createSlice as Fs,createSelector as Ct}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";import Wy,{useState as Ny,useEffect as Ty,forwardRef as Bs,createElement as No}from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import{Checkbox as Dy,RadioGroup as Fy,RadioGroupItem as By,TooltipProvider as zy,Tooltip as Uy,TooltipTrigger as Vy,Label as qy,TooltipContent as $y,Select as Ky,SelectTrigger as Qy,SelectValue as Gy,SelectContent as Jy,SelectGroup as Yy,SelectItem as Zy,Switch as Hy,Input as Xy,cn as e_}from"https://cdn.jsdelivr.net/npm/@wellesley/ui@1.0.720";import{useForm as t_,FormProvider as r_}from"https://cdn.jsdelivr.net/npm/react-hook-form@7.51.0/+esm";import{useSelector as Et}from"https://cdn.jsdelivr.net/npm/react-redux@9.1.0/+esm";import{toast as $e}from"https://cdn.jsdelivr.net/npm/@wellesley/system-toast@1.0.102";import{api as Ze,QueryTags as _s}from"https://cdn.jsdelivr.net/npm/@wellesley/openapi@1.0.758";import{getErrorMsg as Xn}from"https://cdn.jsdelivr.net/npm/@wellesley/error-kit@1.0.607";import{authSlice as Gr,useHasUserPermissions as n_}from"https://cdn.jsdelivr.net/npm/@wellesley/auth@1.0.814";import{userSlice as vs}from"https://cdn.jsdelivr.net/npm/@wellesley/user@1.0.773";import{AppsLink as i_}from"https://cdn.jsdelivr.net/npm/@wellesley/router@1.0.684";import{useMatch as ms}from"https://cdn.jsdelivr.net/npm/react-router-dom@6.22.2/+esm";const o_=t=>{if("object"!=typeof t||null===t)return!1;let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||null===Object.getPrototypeOf(t)},a_=t=>o_(t)&&"type"in t&&"string"==typeof t.type,J=t=>{const e=e=>({type:t,payload:e});return e.toString=()=>`${t}`,e.type=t,e.match=e=>a_(e)&&e.type===t,e};J("remoteReady"),J("askLogin"),J("reselectUser"),J("requestLogout"),J("setConfirmLeavePage"),J("requestChangePath"),J("wsSubscribe"),J("wsUnSubscribe"),J("hostStoreConnect"),J("remoteLogin"),J("remoteLogout"),J("wsOnMessage"),J("setRouterPath"),J("setDeviceType"),J("setDeviceWidth"),J("setUserError"),J("setUserIsError"),J("setUserPending"),J("setUserSuccess"),J("setUserData"),J("updateAccountData"),J("updateUser"),J("addNotification"),J("markNotification"),J("setNotificationsError"),J("setNotificationsList"),J("setNotificationsPending"),J("setNotificationsTotalCount"),J("setNotificationsUnreadCount"),J("resetNotificationsState"),J("undoNotification"),J("setInstanceInfo"),J("setInstanceInfoPending"),J("setInstanceInfoError");const To=J("setPlatformSettings"),Do=J("setProfileSettings");J("setGroupData"),J("setGroupLoading"),Ds("requestMicroFrontendFetch"),Ds("sendMicroFrontendFetchResponse");const u_={data:null,isPending:!1,isSuccess:!1},s_=Fs({name:"profileSettings",initialState:u_,reducers:{setPending:(t,e)=>{t.isPending=e.payload},setSuccess:(t,{payload:e})=>{t.isSuccess=e},setError:(t,{payload:e})=>{t.error=e}},extraReducers:t=>{t.addCase(Do,((t,{payload:e})=>{t.data=e}))},selectors:{selectProfileSettings:t=>t.data,selectPending:t=>t.isPending,selectError:t=>t.error,selectSuccess:t=>t.isSuccess}}),M={openaiConfigModel:"wellesley.openai.config.model",openaiConfigApiKey:"wellesley.openai.config.apiKey",uploadsProvider:"wellesley.uploads.provider",uploadsS3:"wellesley.uploads.s3",uploadsPolicyImageExtensions:"wellesley.uploads.policy.image.extensions",uploadsPolicyImageKeepOriginal:"wellesley.uploads.policy.image.keepOriginal",uploadsPolicyImageResolutions:"wellesley.uploads.policy.image.resolutions",uploadsPolicyImageMaxResolution:"wellesley.uploads.policy.image.maxResolution",uploadsPolicyImageMaxMatrix:"wellesley.uploads.policy.image.maxMatrix",uploadsPolicyImageMaxSize:"wellesley.uploads.policy.image.maxSize",uploadsPolicyVideoExtensions:"wellesley.uploads.policy.video.extensions",uploadsPolicyVideoResolutions:"wellesley.uploads.policy.video.resolutions",uploadsPolicyVideoKeepOriginal:"wellesley.uploads.policy.video.keepOriginal",uploadsPolicyVideoMaxResolution:"wellesley.uploads.policy.video.maxResolution",uploadsPolicyVideoMaxMatrix:"wellesley.uploads.policy.video.maxMatrix",uploadsPolicyVideoMaxSize:"wellesley.uploads.policy.video.maxSize",uploadsPolicyVideoMaxDuration:"wellesley.uploads.policy.video.maxDuration",uploadsPolicyVideoStreamingThreshold:"wellesley.uploads.policy.video.streamingThreshold",uploadsPolicyAudioExtensions:"wellesley.uploads.policy.audio.extensions",uploadsPolicyAudioKeepOriginal:"wellesley.uploads.policy.audio.keepOriginal",uploadsPolicyAudioMaxSize:"wellesley.uploads.policy.audio.maxSize",uploadsPolicyDocExtensions:"wellesley.uploads.policy.doc.extensions",uploadsPolicyDocMaxSize:"wellesley.uploads.policy.doc.maxSize",mediacacheEnabled:"wellesley.mediacache.enabled",mediacacheMaxTotalSize:"wellesley.mediacache.maxTotalSize",mediacacheMaxFileSize:"wellesley.mediacache.maxFileSize",mediacacheLimitPerRun:"wellesley.mediacache.limitPerRun",mediacacheSingleRun:"wellesley.mediacache.singleRun",mediacacheCheckInterval:"wellesley.mediacache.checkInterval",postsMaxMediaAttachments:"wellesley.posts.max_media_attachments",postsMaxCharacters:"wellesley.posts.max_characters",postsMaxPins:"wellesley.posts.max_pins",registrationMode:"wellesley.registration.mode",registrationInvitesEnabled:"wellesley.registration.invitesEnabled",registrationReasonToJoin:"wellesley.registration.reasonToJoin",registrationShowCaptcha:"wellesley.registration.showCaptcha",registrationNotAvailableMessage:"wellesley.registration.notAvailableMessage",captchaVerifyUrl:"wellesley.captcha.verifyUrl",captchaSecretKey:"wellesley.captcha.secretKey",captchaSiteKey:"wellesley.captcha.siteKey",confirmationCodeCodeExpirationMinutes:"wellesley.confirmationCode.codeExpirationMinutes",confirmationCodeCounterExpirationMinutes:"wellesley.confirmationCode.counterExpirationMinutes",confirmationCodeLimitStoreAttempts:"wellesley.confirmationCode.limitStoreAttempts",confirmationCodeLimitCheckAttempts:"wellesley.confirmationCode.limitCheckAttempts",translation:"wellesley.translation"},Zv=[M.uploadsPolicyImageExtensions,M.uploadsPolicyImageKeepOriginal,M.uploadsPolicyImageResolutions,M.uploadsPolicyImageMaxResolution,M.uploadsPolicyImageMaxMatrix,M.uploadsPolicyImageMaxSize,M.uploadsPolicyVideoExtensions,M.uploadsPolicyVideoResolutions,M.uploadsPolicyVideoKeepOriginal,M.uploadsPolicyVideoMaxResolution,M.uploadsPolicyVideoMaxMatrix,M.uploadsPolicyVideoMaxSize,M.uploadsPolicyVideoMaxDuration,M.uploadsPolicyVideoStreamingThreshold,M.uploadsPolicyAudioExtensions,M.uploadsPolicyAudioKeepOriginal,M.uploadsPolicyAudioMaxSize,M.uploadsPolicyDocExtensions,M.uploadsPolicyDocMaxSize,M.mediacacheEnabled,M.mediacacheMaxTotalSize,M.mediacacheMaxFileSize,M.mediacacheLimitPerRun,M.mediacacheSingleRun,M.mediacacheCheckInterval,M.postsMaxMediaAttachments,M.postsMaxCharacters,M.postsMaxPins,M.registrationMode,M.registrationInvitesEnabled,M.registrationReasonToJoin,M.registrationShowCaptcha,M.registrationNotAvailableMessage],Hv="wellesley",Ae={followAutoAccept:"user.follow.autoAccept",notificationsPrefsFollow:"user.notifications.prefs.email.follow",notificationsPrefsFollow_request:"user.notifications.prefs.email.followRequest",notificationsPrefsLike:"user.notifications.prefs.email.like",notificationsPrefsComment:"user.notifications.prefs.email.comment",notificationsPrefsMention:"user.notifications.prefs.email.mention",notificationsPrefsRepost:"user.notifications.prefs.email.repost",notificationsPrefsList_post_create:"user.notifications.prefs.email.list_post_create",notificationsPrefsPost_update:"user.notifications.prefs.email.post_update",notificationsPrefsSubscribeOnComment:"user.notifications.prefs.subscribeOnComment",notificationsShowPopup:"user.notifications.prefs.showPopup",notificationsPolicyBlockNonFollowers:"user.notifications.policy.blockNonFollowers",notificationsPolicyBlockNonFollowing:"user.notifications.policy.blockNonFollowing",notificationsPolicyBlockNonFollowingMessages:"user.notifications.policy.blockNonFollowingMessages",notificationsPolicyBlockNewAccounts:"user.notifications.policy.blockNewAccounts",privacyShowPublicPosts:"user.privacy.showPublicPosts",privacyShowProfilePage:"user.privacy.showProfilePage",privacyShowFollowers:"user.privacy.showFollowers",translation:"user.translation"},Xv="user",c_=["wellesley.posts","wellesley.captcha","wellesley.registration","wellesley.access","wellesley.branding","wellesley.confirmationCode","wellesley.uploads.policy.doc","wellesley.uploads.policy.audio","wellesley.uploads.policy.image","wellesley.uploads.policy.video","wellesley.translation","wellesley.instance.admin","wellesley.instance.legal","wellesley.instance.domainBlocks","wellesley.instance.contacts"],l_=["wellesley.admin.sms","wellesley.admin.auth","wellesley.admin.openai","wellesley.admin.uploads","wellesley.admin.captcha","wellesley.admin.language","wellesley.admin.mediacache","wellesley.admin.translation","wellesley.admin.link_service"],f_={sms:"wellesley.admin.sms",auth:"wellesley.admin.auth",openai:"wellesley.admin.openai",uploads:"wellesley.admin.uploads",captcha:"wellesley.admin.captcha",language:"wellesley.admin.language",mediacache:"wellesley.admin.mediacache",translation:"wellesley.admin.translation",link_service:"wellesley.admin.link_service"},ni={posts:"wellesley.posts",translation:"wellesley.translation",registration:"wellesley.registration",confirmationCode:"wellesley.confirmationCode",uploadsPolicyDoc:"wellesley.uploads.policy.doc",uploadsPolicyAudio:"wellesley.uploads.policy.audio",uploadsPolicyImage:"wellesley.uploads.policy.image",uploadsPolicyVideo:"wellesley.uploads.policy.video",captcha:"wellesley.captcha",access:"wellesley.access",branding:"wellesley.branding",instanceAdmin:"wellesley.instance.admin",legal:"wellesley.instance.legal",domainBlocks:"wellesley.instance.domainBlocks",contacts:"wellesley.instance.contacts"},$r=t=>(null==t?void 0:t.map((t=>t.value||t)))||[],p_={data:null,isPending:!1},{posts:Ro,uploadsPolicyDoc:ws,uploadsPolicyAudio:ko,uploadsPolicyImage:ei,uploadsPolicyVideo:Vr,registration:h_,captcha:d_,instanceAdmin:g_,branding:y_,translation:__,access:v_}=ni,{captcha:m_,language:w_,translation:x_,openai:S_,link_service:b_}=f_,hr=t=>t.data,A_=Ct(hr,(t=>{var e,n,r;return{max_characters:(null==(e=null==t?void 0:t[Ro])?void 0:e.max_characters)||0,max_media_attachments:(null==(n=null==t?void 0:t[Ro])?void 0:n.max_media_attachments)||0,max_pins:(null==(r=null==t?void 0:t[Ro])?void 0:r.max_pins)||0}})),Bo=Ct(hr,(t=>{var e,n,r;return{...null==t?void 0:t[ei],maxSize:(null==(e=null==t?void 0:t[ei])?void 0:e.maxSize)||0,maxMatrix:(null==(n=null==t?void 0:t[ei])?void 0:n.maxMatrix)||0,maxResolution:(null==(r=null==t?void 0:t[ei])?void 0:r.maxResolution)||0}})),I_=Ct(Bo,(t=>$r(t.extensions))),zs=Ct(hr,(t=>{var e,n,r,i;return{...null==t?void 0:t[Vr],maxSize:(null==(e=null==t?void 0:t[Vr])?void 0:e.maxSize)||0,maxMatrix:(null==(n=null==t?void 0:t[Vr])?void 0:n.maxMatrix)||0,maxDuration:(null==(r=null==t?void 0:t[Vr])?void 0:r.maxDuration)||0,maxResolution:(null==(i=null==t?void 0:t[Vr])?void 0:i.maxResolution)||0}})),Us=Ct(hr,(t=>{var e,n;return{...null==t?void 0:t[ko],maxSize:null==(e=null==t?void 0:t[ko])?void 0:e.maxSize,keepOriginal:(null==(n=null==t?void 0:t[ko])?void 0:n.keepOriginal)||0}})),Vs=Ct(hr,(t=>{var e;return{...null==t?void 0:t[ws],maxSize:(null==(e=null==t?void 0:t[ws])?void 0:e.maxSize)||0}})),qs=Ct([Bo,zs,Us,Vs],((t,e,n,r)=>({IMAGE:$r(null==t?void 0:t.extensions),VIDEO:$r(null==e?void 0:e.extensions),AUDIO:$r(null==n?void 0:n.extensions),DOCUMENT:$r(null==r?void 0:r.extensions)}))),R_=Ct(qs,(t=>Object.keys(t).reduce(((e,n)=>[...e,...t[n]||[]]),[]))),Po=Fs({name:"platformSettings",initialState:p_,reducers:{setError:(t,e)=>{t.error=e.payload},setPending:(t,e)=>{t.isPending=e.payload}},extraReducers:t=>{t.addCase(To,((t,{payload:e})=>{t.data={...t.data,...e}}))},selectors:{selectSettings:hr,selectPostConfig:A_,selectDocPolicy:Vs,selectImagePolicy:Bo,selectVideoPolicy:zs,selectAudioPolicy:Us,selectImageExtensions:I_,selectSupportedExtensions:qs,selectFullExtensionsList:R_,selectRegistration:t=>{var e;return null==(e=t.data)?void 0:e[h_]},selectLanguageDetection:t=>{var e;return null==(e=t.data)?void 0:e[w_]},selectLanguageTranslation:t=>{var e;return null==(e=t.data)?void 0:e[x_]},selectOpenai:t=>{var e;return null==(e=t.data)?void 0:e[S_]},selectCaptcha:t=>{var e;return null==(e=t.data)?void 0:e[d_]},selectAdminCaptcha:t=>{var e;return null==(e=t.data)?void 0:e[m_]},selectPlatformTranslation:t=>{var e;return null==(e=t.data)?void 0:e[__]},selectAccess:t=>{var e;return null==(e=t.data)?void 0:e[v_]},selectBranding:t=>{var e;return null==(e=t.data)?void 0:e[y_]},selectLinkService:t=>{var e;return null==(e=t.data)?void 0:e[b_]},selectInstanceAdmin:t=>{var e;return null==(e=t.data)?void 0:e[g_]},selectLegal:t=>{var e;return null==(e=t.data)?void 0:e[ni.legal]},selectDomainBlocks:t=>{var e;return null==(e=t.data)?void 0:e[ni.domainBlocks]},selectContacts:t=>{var e;return null==(e=t.data)?void 0:e[ni.contacts]}}});var xs,Ss,ti=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Eo={exports:{}},qr={};
1
+ import{createAction as Ds,createSlice as Fs,createSelector as Ct}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";import Wy,{useState as Ny,useEffect as Ty,forwardRef as Bs,createElement as No}from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import{Checkbox as Dy,RadioGroup as Fy,RadioGroupItem as By,TooltipProvider as zy,Tooltip as Uy,TooltipTrigger as Vy,Label as qy,TooltipContent as $y,Select as Ky,SelectTrigger as Qy,SelectValue as Gy,SelectContent as Jy,SelectGroup as Yy,SelectItem as Zy,Switch as Hy,Input as Xy,cn as e_}from"https://cdn.jsdelivr.net/npm/@wellesley/ui@1.0.722";import{useForm as t_,FormProvider as r_}from"https://cdn.jsdelivr.net/npm/react-hook-form@7.51.0/+esm";import{useSelector as Et}from"https://cdn.jsdelivr.net/npm/react-redux@9.1.0/+esm";import{toast as $e}from"https://cdn.jsdelivr.net/npm/@wellesley/system-toast@1.0.104";import{api as Ze,QueryTags as _s}from"https://cdn.jsdelivr.net/npm/@wellesley/openapi@1.0.760";import{getErrorMsg as Xn}from"https://cdn.jsdelivr.net/npm/@wellesley/error-kit@1.0.609";import{authSlice as Gr,useHasUserPermissions as n_}from"https://cdn.jsdelivr.net/npm/@wellesley/auth@1.0.816";import{userSlice as vs}from"https://cdn.jsdelivr.net/npm/@wellesley/user@1.0.775";import{AppsLink as i_}from"https://cdn.jsdelivr.net/npm/@wellesley/router@1.0.686";import{useMatch as ms}from"https://cdn.jsdelivr.net/npm/react-router-dom@6.22.2/+esm";const o_=t=>{if("object"!=typeof t||null===t)return!1;let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||null===Object.getPrototypeOf(t)},a_=t=>o_(t)&&"type"in t&&"string"==typeof t.type,J=t=>{const e=e=>({type:t,payload:e});return e.toString=()=>`${t}`,e.type=t,e.match=e=>a_(e)&&e.type===t,e};J("remoteReady"),J("askLogin"),J("reselectUser"),J("requestLogout"),J("setConfirmLeavePage"),J("requestChangePath"),J("wsSubscribe"),J("wsUnSubscribe"),J("hostStoreConnect"),J("remoteLogin"),J("remoteLogout"),J("wsOnMessage"),J("setRouterPath"),J("setDeviceType"),J("setDeviceWidth"),J("setUserError"),J("setUserIsError"),J("setUserPending"),J("setUserSuccess"),J("setUserData"),J("updateAccountData"),J("updateUser"),J("addNotification"),J("markNotification"),J("setNotificationsError"),J("setNotificationsList"),J("setNotificationsPending"),J("setNotificationsTotalCount"),J("setNotificationsUnreadCount"),J("resetNotificationsState"),J("undoNotification"),J("setInstanceInfo"),J("setInstanceInfoPending"),J("setInstanceInfoError");const To=J("setPlatformSettings"),Do=J("setProfileSettings");J("setGroupData"),J("setGroupLoading"),Ds("requestMicroFrontendFetch"),Ds("sendMicroFrontendFetchResponse");const u_={data:null,isPending:!1,isSuccess:!1},s_=Fs({name:"profileSettings",initialState:u_,reducers:{setPending:(t,e)=>{t.isPending=e.payload},setSuccess:(t,{payload:e})=>{t.isSuccess=e},setError:(t,{payload:e})=>{t.error=e}},extraReducers:t=>{t.addCase(Do,((t,{payload:e})=>{t.data=e}))},selectors:{selectProfileSettings:t=>t.data,selectPending:t=>t.isPending,selectError:t=>t.error,selectSuccess:t=>t.isSuccess}}),M={openaiConfigModel:"wellesley.openai.config.model",openaiConfigApiKey:"wellesley.openai.config.apiKey",uploadsProvider:"wellesley.uploads.provider",uploadsS3:"wellesley.uploads.s3",uploadsPolicyImageExtensions:"wellesley.uploads.policy.image.extensions",uploadsPolicyImageKeepOriginal:"wellesley.uploads.policy.image.keepOriginal",uploadsPolicyImageResolutions:"wellesley.uploads.policy.image.resolutions",uploadsPolicyImageMaxResolution:"wellesley.uploads.policy.image.maxResolution",uploadsPolicyImageMaxMatrix:"wellesley.uploads.policy.image.maxMatrix",uploadsPolicyImageMaxSize:"wellesley.uploads.policy.image.maxSize",uploadsPolicyVideoExtensions:"wellesley.uploads.policy.video.extensions",uploadsPolicyVideoResolutions:"wellesley.uploads.policy.video.resolutions",uploadsPolicyVideoKeepOriginal:"wellesley.uploads.policy.video.keepOriginal",uploadsPolicyVideoMaxResolution:"wellesley.uploads.policy.video.maxResolution",uploadsPolicyVideoMaxMatrix:"wellesley.uploads.policy.video.maxMatrix",uploadsPolicyVideoMaxSize:"wellesley.uploads.policy.video.maxSize",uploadsPolicyVideoMaxDuration:"wellesley.uploads.policy.video.maxDuration",uploadsPolicyVideoStreamingThreshold:"wellesley.uploads.policy.video.streamingThreshold",uploadsPolicyAudioExtensions:"wellesley.uploads.policy.audio.extensions",uploadsPolicyAudioKeepOriginal:"wellesley.uploads.policy.audio.keepOriginal",uploadsPolicyAudioMaxSize:"wellesley.uploads.policy.audio.maxSize",uploadsPolicyDocExtensions:"wellesley.uploads.policy.doc.extensions",uploadsPolicyDocMaxSize:"wellesley.uploads.policy.doc.maxSize",mediacacheEnabled:"wellesley.mediacache.enabled",mediacacheMaxTotalSize:"wellesley.mediacache.maxTotalSize",mediacacheMaxFileSize:"wellesley.mediacache.maxFileSize",mediacacheLimitPerRun:"wellesley.mediacache.limitPerRun",mediacacheSingleRun:"wellesley.mediacache.singleRun",mediacacheCheckInterval:"wellesley.mediacache.checkInterval",postsMaxMediaAttachments:"wellesley.posts.max_media_attachments",postsMaxCharacters:"wellesley.posts.max_characters",postsMaxPins:"wellesley.posts.max_pins",registrationMode:"wellesley.registration.mode",registrationInvitesEnabled:"wellesley.registration.invitesEnabled",registrationReasonToJoin:"wellesley.registration.reasonToJoin",registrationShowCaptcha:"wellesley.registration.showCaptcha",registrationNotAvailableMessage:"wellesley.registration.notAvailableMessage",captchaVerifyUrl:"wellesley.captcha.verifyUrl",captchaSecretKey:"wellesley.captcha.secretKey",captchaSiteKey:"wellesley.captcha.siteKey",confirmationCodeCodeExpirationMinutes:"wellesley.confirmationCode.codeExpirationMinutes",confirmationCodeCounterExpirationMinutes:"wellesley.confirmationCode.counterExpirationMinutes",confirmationCodeLimitStoreAttempts:"wellesley.confirmationCode.limitStoreAttempts",confirmationCodeLimitCheckAttempts:"wellesley.confirmationCode.limitCheckAttempts",translation:"wellesley.translation"},Zv=[M.uploadsPolicyImageExtensions,M.uploadsPolicyImageKeepOriginal,M.uploadsPolicyImageResolutions,M.uploadsPolicyImageMaxResolution,M.uploadsPolicyImageMaxMatrix,M.uploadsPolicyImageMaxSize,M.uploadsPolicyVideoExtensions,M.uploadsPolicyVideoResolutions,M.uploadsPolicyVideoKeepOriginal,M.uploadsPolicyVideoMaxResolution,M.uploadsPolicyVideoMaxMatrix,M.uploadsPolicyVideoMaxSize,M.uploadsPolicyVideoMaxDuration,M.uploadsPolicyVideoStreamingThreshold,M.uploadsPolicyAudioExtensions,M.uploadsPolicyAudioKeepOriginal,M.uploadsPolicyAudioMaxSize,M.uploadsPolicyDocExtensions,M.uploadsPolicyDocMaxSize,M.mediacacheEnabled,M.mediacacheMaxTotalSize,M.mediacacheMaxFileSize,M.mediacacheLimitPerRun,M.mediacacheSingleRun,M.mediacacheCheckInterval,M.postsMaxMediaAttachments,M.postsMaxCharacters,M.postsMaxPins,M.registrationMode,M.registrationInvitesEnabled,M.registrationReasonToJoin,M.registrationShowCaptcha,M.registrationNotAvailableMessage],Hv="wellesley",Ae={followAutoAccept:"user.follow.autoAccept",notificationsPrefsFollow:"user.notifications.prefs.email.follow",notificationsPrefsFollow_request:"user.notifications.prefs.email.followRequest",notificationsPrefsLike:"user.notifications.prefs.email.like",notificationsPrefsComment:"user.notifications.prefs.email.comment",notificationsPrefsMention:"user.notifications.prefs.email.mention",notificationsPrefsRepost:"user.notifications.prefs.email.repost",notificationsPrefsList_post_create:"user.notifications.prefs.email.list_post_create",notificationsPrefsPost_update:"user.notifications.prefs.email.post_update",notificationsPrefsSubscribeOnComment:"user.notifications.prefs.subscribeOnComment",notificationsShowPopup:"user.notifications.prefs.showPopup",notificationsPolicyBlockNonFollowers:"user.notifications.policy.blockNonFollowers",notificationsPolicyBlockNonFollowing:"user.notifications.policy.blockNonFollowing",notificationsPolicyBlockNonFollowingMessages:"user.notifications.policy.blockNonFollowingMessages",notificationsPolicyBlockNewAccounts:"user.notifications.policy.blockNewAccounts",privacyShowPublicPosts:"user.privacy.showPublicPosts",privacyShowProfilePage:"user.privacy.showProfilePage",privacyShowFollowers:"user.privacy.showFollowers",translation:"user.translation"},Xv="user",c_=["wellesley.posts","wellesley.captcha","wellesley.registration","wellesley.access","wellesley.branding","wellesley.confirmationCode","wellesley.uploads.policy.doc","wellesley.uploads.policy.audio","wellesley.uploads.policy.image","wellesley.uploads.policy.video","wellesley.translation","wellesley.instance.admin","wellesley.instance.legal","wellesley.instance.domainBlocks","wellesley.instance.contacts"],l_=["wellesley.admin.sms","wellesley.admin.auth","wellesley.admin.openai","wellesley.admin.uploads","wellesley.admin.captcha","wellesley.admin.language","wellesley.admin.mediacache","wellesley.admin.translation","wellesley.admin.link_service"],f_={sms:"wellesley.admin.sms",auth:"wellesley.admin.auth",openai:"wellesley.admin.openai",uploads:"wellesley.admin.uploads",captcha:"wellesley.admin.captcha",language:"wellesley.admin.language",mediacache:"wellesley.admin.mediacache",translation:"wellesley.admin.translation",link_service:"wellesley.admin.link_service"},ni={posts:"wellesley.posts",translation:"wellesley.translation",registration:"wellesley.registration",confirmationCode:"wellesley.confirmationCode",uploadsPolicyDoc:"wellesley.uploads.policy.doc",uploadsPolicyAudio:"wellesley.uploads.policy.audio",uploadsPolicyImage:"wellesley.uploads.policy.image",uploadsPolicyVideo:"wellesley.uploads.policy.video",captcha:"wellesley.captcha",access:"wellesley.access",branding:"wellesley.branding",instanceAdmin:"wellesley.instance.admin",legal:"wellesley.instance.legal",domainBlocks:"wellesley.instance.domainBlocks",contacts:"wellesley.instance.contacts"},$r=t=>(null==t?void 0:t.map((t=>t.value||t)))||[],p_={data:null,isPending:!1},{posts:Ro,uploadsPolicyDoc:ws,uploadsPolicyAudio:ko,uploadsPolicyImage:ei,uploadsPolicyVideo:Vr,registration:h_,captcha:d_,instanceAdmin:g_,branding:y_,translation:__,access:v_}=ni,{captcha:m_,language:w_,translation:x_,openai:S_,link_service:b_}=f_,hr=t=>t.data,A_=Ct(hr,(t=>{var e,n,r;return{max_characters:(null==(e=null==t?void 0:t[Ro])?void 0:e.max_characters)||0,max_media_attachments:(null==(n=null==t?void 0:t[Ro])?void 0:n.max_media_attachments)||0,max_pins:(null==(r=null==t?void 0:t[Ro])?void 0:r.max_pins)||0}})),Bo=Ct(hr,(t=>{var e,n,r;return{...null==t?void 0:t[ei],maxSize:(null==(e=null==t?void 0:t[ei])?void 0:e.maxSize)||0,maxMatrix:(null==(n=null==t?void 0:t[ei])?void 0:n.maxMatrix)||0,maxResolution:(null==(r=null==t?void 0:t[ei])?void 0:r.maxResolution)||0}})),I_=Ct(Bo,(t=>$r(t.extensions))),zs=Ct(hr,(t=>{var e,n,r,i;return{...null==t?void 0:t[Vr],maxSize:(null==(e=null==t?void 0:t[Vr])?void 0:e.maxSize)||0,maxMatrix:(null==(n=null==t?void 0:t[Vr])?void 0:n.maxMatrix)||0,maxDuration:(null==(r=null==t?void 0:t[Vr])?void 0:r.maxDuration)||0,maxResolution:(null==(i=null==t?void 0:t[Vr])?void 0:i.maxResolution)||0}})),Us=Ct(hr,(t=>{var e,n;return{...null==t?void 0:t[ko],maxSize:null==(e=null==t?void 0:t[ko])?void 0:e.maxSize,keepOriginal:(null==(n=null==t?void 0:t[ko])?void 0:n.keepOriginal)||0}})),Vs=Ct(hr,(t=>{var e;return{...null==t?void 0:t[ws],maxSize:(null==(e=null==t?void 0:t[ws])?void 0:e.maxSize)||0}})),qs=Ct([Bo,zs,Us,Vs],((t,e,n,r)=>({IMAGE:$r(null==t?void 0:t.extensions),VIDEO:$r(null==e?void 0:e.extensions),AUDIO:$r(null==n?void 0:n.extensions),DOCUMENT:$r(null==r?void 0:r.extensions)}))),R_=Ct(qs,(t=>Object.keys(t).reduce(((e,n)=>[...e,...t[n]||[]]),[]))),Po=Fs({name:"platformSettings",initialState:p_,reducers:{setError:(t,e)=>{t.error=e.payload},setPending:(t,e)=>{t.isPending=e.payload}},extraReducers:t=>{t.addCase(To,((t,{payload:e})=>{t.data={...t.data,...e}}))},selectors:{selectSettings:hr,selectPostConfig:A_,selectDocPolicy:Vs,selectImagePolicy:Bo,selectVideoPolicy:zs,selectAudioPolicy:Us,selectImageExtensions:I_,selectSupportedExtensions:qs,selectFullExtensionsList:R_,selectRegistration:t=>{var e;return null==(e=t.data)?void 0:e[h_]},selectLanguageDetection:t=>{var e;return null==(e=t.data)?void 0:e[w_]},selectLanguageTranslation:t=>{var e;return null==(e=t.data)?void 0:e[x_]},selectOpenai:t=>{var e;return null==(e=t.data)?void 0:e[S_]},selectCaptcha:t=>{var e;return null==(e=t.data)?void 0:e[d_]},selectAdminCaptcha:t=>{var e;return null==(e=t.data)?void 0:e[m_]},selectPlatformTranslation:t=>{var e;return null==(e=t.data)?void 0:e[__]},selectAccess:t=>{var e;return null==(e=t.data)?void 0:e[v_]},selectBranding:t=>{var e;return null==(e=t.data)?void 0:e[y_]},selectLinkService:t=>{var e;return null==(e=t.data)?void 0:e[b_]},selectInstanceAdmin:t=>{var e;return null==(e=t.data)?void 0:e[g_]},selectLegal:t=>{var e;return null==(e=t.data)?void 0:e[ni.legal]},selectDomainBlocks:t=>{var e;return null==(e=t.data)?void 0:e[ni.domainBlocks]},selectContacts:t=>{var e;return null==(e=t.data)?void 0:e[ni.contacts]}}});var xs,Ss,ti=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Eo={exports:{}},qr={};
2
2
  /**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.min.js
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.715",
2
+ "version": "1.0.717",
3
3
  "name": "@wellesley/settings",
4
4
  "license": "UNLICENSED",
5
5
  "main": "index.mjs",