CoreFiles by mySites.guru
index.min.js1 lines, 4,101 bytes, from wordpress-7.0-beta5.zip
Raw History Compare with 7.0-beta4
md5
4abf962084ff2bfe9aa47487d2a285d2
sha1
c671ad9b74ce9cf625788a250df67383e1817d2a
sha256
5272e038c033781f6c3b84d4012173a3efe68101f41bc4162ac91d5b1de6bd5c
var W=Object.create;var y=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,Q=Object.prototype.hasOwnProperty;var m=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Z=(e,t,s,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of X(t))!Q.call(e,a)&&a!==s&&y(e,a,{get:()=>t[a],enumerable:!(i=J(t,a))||i.enumerable});return e};var l=(e,t,s)=>(s=e!=null?W(q(e)):{},Z(t||!e||!e.__esModule?y(s,"default",{value:e,enumerable:!0}):s,e));var w=m((se,E)=>{E.exports=window.wp.data});var T=m((ae,A)=>{A.exports=window.wp.privateApis});var N=m((de,D)=>{D.exports=window.wp.components});var O=m((ge,L)=>{L.exports=window.wp.element});var z=m((xe,j)=>{j.exports=window.wp.i18n});var F=m((ve,B)=>{B.exports=window.ReactJSXRuntime});var P=l(w(),1);var f=l(w(),1);var b=l(T(),1),{lock:R,unlock:d}=(0,b.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/connectors");var k="core/connectors",$={connectors:{}},U={registerConnector(e,t){return{type:"REGISTER_CONNECTOR",slug:e,config:t}}};function ee(e=$,t){return t.type==="REGISTER_CONNECTOR"?{...e,connectors:{...e.connectors,[t.slug]:{slug:t.slug,...t.config}}}:e}var te={getConnectors:(0,f.createSelector)(e=>Object.values(e.connectors),e=>[e.connectors]),getConnector(e,t){return e.connectors[t]}},p=(0,f.createReduxStore)(k,{reducer:ee});(0,f.register)(p);d(p).registerPrivateActions(U);d(p).registerPrivateSelectors(te);function re(e,t){d((0,P.dispatch)(p)).registerConnector(e,t)}var r=l(N(),1),u=l(O(),1),o=l(z(),1),n=l(F(),1);function ne({className:e,icon:t,name:s,description:i,actionArea:a,children:c}){return(0,n.jsx)(r.__experimentalItem,{className:e,children:(0,n.jsxs)(r.__experimentalVStack,{spacing:4,children:[(0,n.jsxs)(r.__experimentalHStack,{alignment:"center",spacing:4,wrap:!0,children:[t,(0,n.jsx)(r.FlexBlock,{children:(0,n.jsxs)(r.__experimentalVStack,{spacing:0,children:[(0,n.jsx)(r.__experimentalText,{weight:600,size:15,children:s}),(0,n.jsx)(r.__experimentalText,{variant:"muted",size:12,children:i})]})}),a]}),c]})})}function oe({onSave:e,onRemove:t,initialValue:s="",helpUrl:i,helpLabel:a,readOnly:c=!1,keySource:g}){let[v,H]=(0,u.useState)(s),[h,C]=(0,u.useState)(!1),[S,_]=(0,u.useState)(null),I=a||i?.replace(/^https?:\/\//,""),K=i?(0,u.createInterpolateElement)((0,o.sprintf)((0,o.__)("Get your API key at %s"),"<a></a>"),{a:(0,n.jsx)(r.ExternalLink,{href:i,children:I})}):void 0,M=g==="env"||g==="constant",Y=()=>{if(M){if(g==="env")return(0,o.__)("This API key is configured using an environment variable.");if(g==="constant")return(0,o.__)("This API key is configured as a constant.")}return c?i?(0,u.createInterpolateElement)((0,o.sprintf)((0,o.__)("Your API key is stored securely. You can reset it at %s"),"<a></a>"),{a:(0,n.jsx)(r.ExternalLink,{href:i,children:I})}):(0,o.__)("Your API key is stored securely."):S?(0,n.jsx)("span",{style:{color:"#cc1818"},children:S}):K},V=async()=>{_(null),C(!0);try{await e?.(v)}catch(x){_(x instanceof Error?x.message:(0,o.__)("It was not possible to connect to the provider using this key."))}finally{C(!1)}};return(0,n.jsxs)(r.__experimentalVStack,{spacing:4,className:"connector-settings",style:c?{"--wp-components-color-background":"#f0f0f0"}:void 0,children:[(0,n.jsx)(r.TextControl,{__next40pxDefaultSize:!0,label:(0,o.__)("API Key"),value:v,onChange:x=>{c||(_(null),H(x))},placeholder:(0,o.__)("Enter your API key"),disabled:c||h,help:Y()}),c?t&&(0,n.jsx)(r.Button,{variant:"link",isDestructive:!0,onClick:t,children:(0,o.__)("Remove and replace")}):(0,n.jsx)(r.__experimentalHStack,{justify:"flex-start",children:(0,n.jsx)(r.Button,{__next40pxDefaultSize:!0,variant:"primary",disabled:!v||h,accessibleWhenDisabled:!0,isBusy:h,onClick:V,children:(0,o.__)("Save")})})]})}var G={};R(G,{store:p,STORE_NAME:k});export{ne as __experimentalConnectorItem,oe as __experimentalDefaultConnectorSettings,re as __experimentalRegisterConnector,G as privateApis};

No other release has this exact content. See every version of this file.