@wellesley/settings 1.0.624 → 1.0.626

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 Ns,createSlice as Ts,createSelector as Vt}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";import Oy,{useState as jy,useEffect as Ly,forwardRef as Ds,createElement as Wo}from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import{Checkbox as My,RadioGroup as Wy,RadioGroupItem as Ny,TooltipProvider as Ty,Tooltip as Dy,TooltipTrigger as Fy,Label as By,TooltipContent as zy,Select as Uy,SelectTrigger as Vy,SelectValue as qy,SelectContent as $y,SelectGroup as Ky,SelectItem as Qy,Switch as Gy,Input as Jy,cn as Yy}from"https://cdn.jsdelivr.net/npm/@wellesley/ui@1.0.629";import{useForm as Zy,FormProvider as Hy}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.11";import{api as Ze,QueryTags as gs}from"https://cdn.jsdelivr.net/npm/@wellesley/openapi@1.0.667";import{getErrorMsg as Hn}from"https://cdn.jsdelivr.net/npm/@wellesley/error-kit@1.0.518";import{authSlice as Qr,useHasUserPermissions as Xy}from"https://cdn.jsdelivr.net/npm/@wellesley/auth@1.0.723";import{userSlice as ys}from"https://cdn.jsdelivr.net/npm/@wellesley/user@1.0.682";import{AppsLink as e_}from"https://cdn.jsdelivr.net/npm/@wellesley/router@1.0.595";import{useMatch as _s}from"https://cdn.jsdelivr.net/npm/react-router-dom@6.22.2/+esm";const t_=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)},r_=t=>t_(t)&&"type"in t&&"string"==typeof t.type,Y=t=>{const e=e=>({type:t,payload:e});return e.toString=()=>`${t}`,e.type=t,e.match=e=>r_(e)&&e.type===t,e};Y("remoteReady"),Y("askLogin"),Y("reselectUser"),Y("requestLogout"),Y("setConfirmLeavePage"),Y("requestChangePath"),Y("wsSubscribe"),Y("wsUnSubscribe"),Y("hostStoreConnect"),Y("remoteLogin"),Y("remoteLogout"),Y("wsOnMessage"),Y("setRouterPath"),Y("setDeviceType"),Y("setUserError"),Y("setUserIsError"),Y("setUserPending"),Y("setUserSuccess"),Y("setUserData"),Y("updateAccountData"),Y("updateUser"),Y("addNotification"),Y("markNotification"),Y("setNotificationsError"),Y("setNotificationsList"),Y("setNotificationsPending"),Y("setNotificationsTotalCount"),Y("setNotificationsUnreadCount"),Y("resetNotificationsState"),Y("undoNotification"),Y("setInstanceInfo"),Y("setInstanceInfoPending"),Y("setInstanceInfoError");const No=Y("setPlatformSettings"),To=Y("setProfileSettings");Y("setGroupData"),Y("setGroupLoading"),Ns("requestMicroFrontendFetch"),Ns("sendMicroFrontendFetchResponse");const n_={data:null,isPending:!1,isSuccess:!1},i_=Ts({name:"profileSettings",initialState:n_,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(To,((t,{payload:e})=>{t.data=e}))},selectors:{selectProfileSettings:t=>t.data,selectPending:t=>t.isPending,selectError:t=>t.error,selectSuccess:t=>t.isSuccess}}),L={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"},Qv=[L.uploadsPolicyImageExtensions,L.uploadsPolicyImageKeepOriginal,L.uploadsPolicyImageResolutions,L.uploadsPolicyImageMaxResolution,L.uploadsPolicyImageMaxMatrix,L.uploadsPolicyImageMaxSize,L.uploadsPolicyVideoExtensions,L.uploadsPolicyVideoResolutions,L.uploadsPolicyVideoKeepOriginal,L.uploadsPolicyVideoMaxResolution,L.uploadsPolicyVideoMaxMatrix,L.uploadsPolicyVideoMaxSize,L.uploadsPolicyVideoMaxDuration,L.uploadsPolicyVideoStreamingThreshold,L.uploadsPolicyAudioExtensions,L.uploadsPolicyAudioKeepOriginal,L.uploadsPolicyAudioMaxSize,L.uploadsPolicyDocExtensions,L.uploadsPolicyDocMaxSize,L.mediacacheEnabled,L.mediacacheMaxTotalSize,L.mediacacheMaxFileSize,L.mediacacheLimitPerRun,L.mediacacheSingleRun,L.mediacacheCheckInterval,L.postsMaxMediaAttachments,L.postsMaxCharacters,L.postsMaxPins,L.registrationMode,L.registrationInvitesEnabled,L.registrationReasonToJoin,L.registrationShowCaptcha,L.registrationNotAvailableMessage],Gv="wellesley",_e={followAutoAccept:"user.follow.autoAccept",notificationsPrefsFollow:"user.notifications.prefs.follow",notificationsPrefsFollow_request:"user.notifications.prefs.followRequest",notificationsPrefsLike:"user.notifications.prefs.like",notificationsPrefsComment:"user.notifications.prefs.comment",notificationsPrefsMention:"user.notifications.prefs.mention",notificationsPrefsRepost:"user.notifications.prefs.repost",notificationsPrefsList_post_create:"user.notifications.prefs.list_post_create",notificationsPrefsPost_update:"user.notifications.prefs.post_update",notificationsPrefsSubscribeOnComment:"user.notifications.prefs.subscribeOnComment",notificationsPrefsAlwaysSendEmail:"user.notifications.prefs.alwaysSendEmail",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"},Jv="user",o_=["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"],a_=["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"],u_={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"},ri={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"},s_={data:null,isPending:!1},{posts:Io,uploadsPolicyDoc:vs,uploadsPolicyAudio:Ro,uploadsPolicyImage:Xn,uploadsPolicyVideo:Vr,registration:c_,captcha:l_,instanceAdmin:f_,branding:p_,translation:h_,access:d_}=ri,{captcha:g_,language:y_,translation:__,openai:v_,link_service:m_}=u_,hr=t=>t.data,w_=Vt(hr,(t=>{var e,n,r;return{max_characters:(null==(e=null==t?void 0:t[Io])?void 0:e.max_characters)||0,max_media_attachments:(null==(n=null==t?void 0:t[Io])?void 0:n.max_media_attachments)||0,max_pins:(null==(r=null==t?void 0:t[Io])?void 0:r.max_pins)||0}})),Fs=Vt(hr,(t=>{var e,n,r;return{...null==t?void 0:t[Xn],maxSize:(null==(e=null==t?void 0:t[Xn])?void 0:e.maxSize)||0,maxMatrix:(null==(n=null==t?void 0:t[Xn])?void 0:n.maxMatrix)||0,maxResolution:(null==(r=null==t?void 0:t[Xn])?void 0:r.maxResolution)||0}})),Bs=Vt(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}})),zs=Vt(hr,(t=>{var e,n;return{...null==t?void 0:t[Ro],maxSize:null==(e=null==t?void 0:t[Ro])?void 0:e.maxSize,keepOriginal:(null==(n=null==t?void 0:t[Ro])?void 0:n.keepOriginal)||0}})),Us=Vt(hr,(t=>{var e;return{...null==t?void 0:t[vs],maxSize:(null==(e=null==t?void 0:t[vs])?void 0:e.maxSize)||0}})),Vs=Vt([Fs,Bs,zs,Us],((t,e,n,r)=>({IMAGE:null==t?void 0:t.extensions,VIDEO:null==e?void 0:e.extensions,AUDIO:null==n?void 0:n.extensions,DOCUMENT:null==r?void 0:r.extensions}))),x_=Vt(Vs,(t=>Object.keys(t).reduce(((e,n)=>[...e,...t[n]||[]]),[]))),ko=Ts({name:"platformSettings",initialState:s_,reducers:{setError:(t,e)=>{t.error=e.payload},setPending:(t,e)=>{t.isPending=e.payload}},extraReducers:t=>{t.addCase(No,((t,{payload:e})=>{t.data={...t.data,...e}}))},selectors:{selectSettings:hr,selectPostConfig:w_,selectDocPolicy:Us,selectImagePolicy:Fs,selectVideoPolicy:Bs,selectAudioPolicy:zs,selectSupportedExtensions:Vs,selectFullExtensionsList:x_,selectRegistration:t=>{var e;return null==(e=t.data)?void 0:e[c_]},selectLanguageDetection:t=>{var e;return null==(e=t.data)?void 0:e[y_]},selectLanguageTranslation:t=>{var e;return null==(e=t.data)?void 0:e[__]},selectOpenai:t=>{var e;return null==(e=t.data)?void 0:e[v_]},selectCaptcha:t=>{var e;return null==(e=t.data)?void 0:e[l_]},selectAdminCaptcha:t=>{var e;return null==(e=t.data)?void 0:e[g_]},selectPlatformTranslation:t=>{var e;return null==(e=t.data)?void 0:e[h_]},selectAccess:t=>{var e;return null==(e=t.data)?void 0:e[d_]},selectBranding:t=>{var e;return null==(e=t.data)?void 0:e[p_]},selectLinkService:t=>{var e;return null==(e=t.data)?void 0:e[m_]},selectInstanceAdmin:t=>{var e;return null==(e=t.data)?void 0:e[f_]},selectLegal:t=>{var e;return null==(e=t.data)?void 0:e[ri.legal]},selectDomainBlocks:t=>{var e;return null==(e=t.data)?void 0:e[ri.domainBlocks]},selectContacts:t=>{var e;return null==(e=t.data)?void 0:e[ri.contacts]}}});var ms,ws,ei=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Po={exports:{}},qr={};
1
+ import{createAction as Ns,createSlice as Ts,createSelector as Vt}from"https://cdn.jsdelivr.net/npm/@reduxjs/toolkit@2.2.1/+esm";import Oy,{useState as jy,useEffect as Ly,forwardRef as Ds,createElement as Wo}from"https://cdn.jsdelivr.net/npm/react@18.2.0/+esm";import{Checkbox as My,RadioGroup as Wy,RadioGroupItem as Ny,TooltipProvider as Ty,Tooltip as Dy,TooltipTrigger as Fy,Label as By,TooltipContent as zy,Select as Uy,SelectTrigger as Vy,SelectValue as qy,SelectContent as $y,SelectGroup as Ky,SelectItem as Qy,Switch as Gy,Input as Jy,cn as Yy}from"https://cdn.jsdelivr.net/npm/@wellesley/ui@1.0.631";import{useForm as Zy,FormProvider as Hy}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.13";import{api as Ze,QueryTags as gs}from"https://cdn.jsdelivr.net/npm/@wellesley/openapi@1.0.669";import{getErrorMsg as Hn}from"https://cdn.jsdelivr.net/npm/@wellesley/error-kit@1.0.520";import{authSlice as Qr,useHasUserPermissions as Xy}from"https://cdn.jsdelivr.net/npm/@wellesley/auth@1.0.725";import{userSlice as ys}from"https://cdn.jsdelivr.net/npm/@wellesley/user@1.0.684";import{AppsLink as e_}from"https://cdn.jsdelivr.net/npm/@wellesley/router@1.0.597";import{useMatch as _s}from"https://cdn.jsdelivr.net/npm/react-router-dom@6.22.2/+esm";const t_=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)},r_=t=>t_(t)&&"type"in t&&"string"==typeof t.type,Y=t=>{const e=e=>({type:t,payload:e});return e.toString=()=>`${t}`,e.type=t,e.match=e=>r_(e)&&e.type===t,e};Y("remoteReady"),Y("askLogin"),Y("reselectUser"),Y("requestLogout"),Y("setConfirmLeavePage"),Y("requestChangePath"),Y("wsSubscribe"),Y("wsUnSubscribe"),Y("hostStoreConnect"),Y("remoteLogin"),Y("remoteLogout"),Y("wsOnMessage"),Y("setRouterPath"),Y("setDeviceType"),Y("setUserError"),Y("setUserIsError"),Y("setUserPending"),Y("setUserSuccess"),Y("setUserData"),Y("updateAccountData"),Y("updateUser"),Y("addNotification"),Y("markNotification"),Y("setNotificationsError"),Y("setNotificationsList"),Y("setNotificationsPending"),Y("setNotificationsTotalCount"),Y("setNotificationsUnreadCount"),Y("resetNotificationsState"),Y("undoNotification"),Y("setInstanceInfo"),Y("setInstanceInfoPending"),Y("setInstanceInfoError");const No=Y("setPlatformSettings"),To=Y("setProfileSettings");Y("setGroupData"),Y("setGroupLoading"),Ns("requestMicroFrontendFetch"),Ns("sendMicroFrontendFetchResponse");const n_={data:null,isPending:!1,isSuccess:!1},i_=Ts({name:"profileSettings",initialState:n_,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(To,((t,{payload:e})=>{t.data=e}))},selectors:{selectProfileSettings:t=>t.data,selectPending:t=>t.isPending,selectError:t=>t.error,selectSuccess:t=>t.isSuccess}}),L={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"},Qv=[L.uploadsPolicyImageExtensions,L.uploadsPolicyImageKeepOriginal,L.uploadsPolicyImageResolutions,L.uploadsPolicyImageMaxResolution,L.uploadsPolicyImageMaxMatrix,L.uploadsPolicyImageMaxSize,L.uploadsPolicyVideoExtensions,L.uploadsPolicyVideoResolutions,L.uploadsPolicyVideoKeepOriginal,L.uploadsPolicyVideoMaxResolution,L.uploadsPolicyVideoMaxMatrix,L.uploadsPolicyVideoMaxSize,L.uploadsPolicyVideoMaxDuration,L.uploadsPolicyVideoStreamingThreshold,L.uploadsPolicyAudioExtensions,L.uploadsPolicyAudioKeepOriginal,L.uploadsPolicyAudioMaxSize,L.uploadsPolicyDocExtensions,L.uploadsPolicyDocMaxSize,L.mediacacheEnabled,L.mediacacheMaxTotalSize,L.mediacacheMaxFileSize,L.mediacacheLimitPerRun,L.mediacacheSingleRun,L.mediacacheCheckInterval,L.postsMaxMediaAttachments,L.postsMaxCharacters,L.postsMaxPins,L.registrationMode,L.registrationInvitesEnabled,L.registrationReasonToJoin,L.registrationShowCaptcha,L.registrationNotAvailableMessage],Gv="wellesley",_e={followAutoAccept:"user.follow.autoAccept",notificationsPrefsFollow:"user.notifications.prefs.follow",notificationsPrefsFollow_request:"user.notifications.prefs.followRequest",notificationsPrefsLike:"user.notifications.prefs.like",notificationsPrefsComment:"user.notifications.prefs.comment",notificationsPrefsMention:"user.notifications.prefs.mention",notificationsPrefsRepost:"user.notifications.prefs.repost",notificationsPrefsList_post_create:"user.notifications.prefs.list_post_create",notificationsPrefsPost_update:"user.notifications.prefs.post_update",notificationsPrefsSubscribeOnComment:"user.notifications.prefs.subscribeOnComment",notificationsPrefsAlwaysSendEmail:"user.notifications.prefs.alwaysSendEmail",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"},Jv="user",o_=["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"],a_=["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"],u_={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"},ri={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"},s_={data:null,isPending:!1},{posts:Io,uploadsPolicyDoc:vs,uploadsPolicyAudio:Ro,uploadsPolicyImage:Xn,uploadsPolicyVideo:Vr,registration:c_,captcha:l_,instanceAdmin:f_,branding:p_,translation:h_,access:d_}=ri,{captcha:g_,language:y_,translation:__,openai:v_,link_service:m_}=u_,hr=t=>t.data,w_=Vt(hr,(t=>{var e,n,r;return{max_characters:(null==(e=null==t?void 0:t[Io])?void 0:e.max_characters)||0,max_media_attachments:(null==(n=null==t?void 0:t[Io])?void 0:n.max_media_attachments)||0,max_pins:(null==(r=null==t?void 0:t[Io])?void 0:r.max_pins)||0}})),Fs=Vt(hr,(t=>{var e,n,r;return{...null==t?void 0:t[Xn],maxSize:(null==(e=null==t?void 0:t[Xn])?void 0:e.maxSize)||0,maxMatrix:(null==(n=null==t?void 0:t[Xn])?void 0:n.maxMatrix)||0,maxResolution:(null==(r=null==t?void 0:t[Xn])?void 0:r.maxResolution)||0}})),Bs=Vt(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}})),zs=Vt(hr,(t=>{var e,n;return{...null==t?void 0:t[Ro],maxSize:null==(e=null==t?void 0:t[Ro])?void 0:e.maxSize,keepOriginal:(null==(n=null==t?void 0:t[Ro])?void 0:n.keepOriginal)||0}})),Us=Vt(hr,(t=>{var e;return{...null==t?void 0:t[vs],maxSize:(null==(e=null==t?void 0:t[vs])?void 0:e.maxSize)||0}})),Vs=Vt([Fs,Bs,zs,Us],((t,e,n,r)=>({IMAGE:null==t?void 0:t.extensions,VIDEO:null==e?void 0:e.extensions,AUDIO:null==n?void 0:n.extensions,DOCUMENT:null==r?void 0:r.extensions}))),x_=Vt(Vs,(t=>Object.keys(t).reduce(((e,n)=>[...e,...t[n]||[]]),[]))),ko=Ts({name:"platformSettings",initialState:s_,reducers:{setError:(t,e)=>{t.error=e.payload},setPending:(t,e)=>{t.isPending=e.payload}},extraReducers:t=>{t.addCase(No,((t,{payload:e})=>{t.data={...t.data,...e}}))},selectors:{selectSettings:hr,selectPostConfig:w_,selectDocPolicy:Us,selectImagePolicy:Fs,selectVideoPolicy:Bs,selectAudioPolicy:zs,selectSupportedExtensions:Vs,selectFullExtensionsList:x_,selectRegistration:t=>{var e;return null==(e=t.data)?void 0:e[c_]},selectLanguageDetection:t=>{var e;return null==(e=t.data)?void 0:e[y_]},selectLanguageTranslation:t=>{var e;return null==(e=t.data)?void 0:e[__]},selectOpenai:t=>{var e;return null==(e=t.data)?void 0:e[v_]},selectCaptcha:t=>{var e;return null==(e=t.data)?void 0:e[l_]},selectAdminCaptcha:t=>{var e;return null==(e=t.data)?void 0:e[g_]},selectPlatformTranslation:t=>{var e;return null==(e=t.data)?void 0:e[h_]},selectAccess:t=>{var e;return null==(e=t.data)?void 0:e[d_]},selectBranding:t=>{var e;return null==(e=t.data)?void 0:e[p_]},selectLinkService:t=>{var e;return null==(e=t.data)?void 0:e[m_]},selectInstanceAdmin:t=>{var e;return null==(e=t.data)?void 0:e[f_]},selectLegal:t=>{var e;return null==(e=t.data)?void 0:e[ri.legal]},selectDomainBlocks:t=>{var e;return null==(e=t.data)?void 0:e[ri.domainBlocks]},selectContacts:t=>{var e;return null==(e=t.data)?void 0:e[ri.contacts]}}});var ms,ws,ei=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Po={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.624",
2
+ "version": "1.0.626",
3
3
  "name": "@wellesley/settings",
4
4
  "license": "UNLICENSED",
5
5
  "main": "index.mjs",