Making WordPress.org

Changeset 13644


Ignore:
Timestamp:
05/01/2024 11:23:26 PM (5 months ago)
Author:
adamwood
Message:

Learn: Sync with git WordPress/learn@dfdc48a

Location:
sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/locale-switcher
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/locale-switcher/build/index.asset.php

    r10880 r13644  
    1 <?php return array('dependencies' => array('wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'c8505bd3f3f0056808121052a9fbcc6e');
     1<?php return array('dependencies' => array('react', 'wp-components', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '2d1c892e1f993afe9f08');
  • sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/locale-switcher/build/index.js

    r10880 r13644  
    1 (window.webpackJsonp=window.webpackJsonp||[]).push([[1],{11:function(t,e,n){}}]),function(t){function e(e){for(var r,u,c=e[0],a=e[1],l=e[2],p=0,s=[];p<c.length;p++)u=c[p],Object.prototype.hasOwnProperty.call(o,u)&&o[u]&&s.push(o[u][0]),o[u]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(t[r]=a[r]);for(f&&f(e);s.length;)s.shift()();return i.push.apply(i,l||[]),n()}function n(){for(var t,e=0;e<i.length;e++){for(var n=i[e],r=!0,c=1;c<n.length;c++){var a=n[c];0!==o[a]&&(r=!1)}r&&(i.splice(e--,1),t=u(u.s=n[0]))}return t}var r={},o={0:0},i=[];function u(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,u),n.l=!0,n.exports}u.m=t,u.c=r,u.d=function(t,e,n){u.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},u.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},u.t=function(t,e){if(1&e&&(t=u(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(u.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)u.d(n,r,function(e){return t[e]}.bind(null,r));return n},u.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return u.d(e,"a",e),e},u.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},u.p="";var c=window.webpackJsonp=window.webpackJsonp||[],a=c.push.bind(c);c.push=e,c=c.slice();for(var l=0;l<c.length;l++)e(c[l]);var f=a;i.push([5,1]),n()}([function(t,e){!function(){t.exports=this.wp.element}()},function(t,e,n){var r=n(6),o=n(7),i=n(8),u=n(10);t.exports=function(t,e){return r(t)||o(t,e)||i(t,e)||u()}},function(t,e){!function(){t.exports=this.wp.components}()},function(t,e){!function(){t.exports=this.wp.i18n}()},function(t,e){!function(){t.exports=this.wp.url}()},function(t,e,n){"use strict";n.r(e);var r=n(1),o=n.n(r),i=n(0),u=n(2),c=n(3),a=n(4),l=(n(11),window.wporgLocaleSwitcherConfig||{}),f=function(t){var e=t.externalButton,n=l.initialValue,r=l.options,f=Object(i.useState)(!1),p=o()(f,2),s=p[0],d=p[1],b=Object(i.useState)(!1),y=o()(b,2),w=y[0],h=y[1];return e.addEventListener("click",(function(t){t.preventDefault(),d(!0)})),Object(i.createElement)(i.Fragment,null,s&&Object(i.createElement)(u.Modal,{closeButtonLabel:Object(c.__)("Cancel","wporg"),onRequestClose:function(){return d(!1)},title:Object(c.__)("Change language","wporg")},Object(i.createElement)(u.ComboboxControl,{onChange:function(t){h(t),function(t){var e=window.location.href;window.location=Object(a.addQueryArgs)(e,{locale:t})}(t)},onFilterValueChange:function(){},options:r,value:w||n})))};document.addEventListener("DOMContentLoaded",(function(){var t=document.getElementById("wporg-locale-switcher-container"),e={externalButton:document.getElementById("wp-admin-bar-locale-switcher")};Object(i.render)(Object(i.createElement)(f,e),t)}))},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}},function(t,e,n){var r=n(9);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}}]);
     1(()=>{"use strict";var e,t={918:()=>{const e=window.React,t=window.wp.components,n=window.wp.element,o=window.wp.i18n,r=window.wp.url,a=window.wporgLocaleSwitcherConfig||{},l=l=>{const{externalButton:i}=l,{initialValue:c,options:w}=a,[s,d]=(0,n.useState)(!1),[u,p]=(0,n.useState)(!1);return i.addEventListener("click",(e=>{e.preventDefault(),d(!0)})),(0,n.createElement)(e.Fragment,null,s&&(0,n.createElement)(t.Modal,{closeButtonLabel:(0,o.__)("Cancel","wporg"),onRequestClose:()=>d(!1),title:(0,o.__)("Change language","wporg")},(0,n.createElement)(t.ComboboxControl,{onChange:e=>{p(e),(e=>{const t=window.location.href;window.location=(0,r.addQueryArgs)(t,{locale:e})})(e)},onFilterValueChange:()=>{},options:w,value:u||c})))};document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("wporg-locale-switcher-container"),t={externalButton:document.getElementById("wp-admin-bar-locale-switcher")};(0,n.render)((0,n.createElement)(l,t),e)}))}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,o),a.exports}o.m=t,e=[],o.O=(t,n,r,a)=>{if(!n){var l=1/0;for(s=0;s<e.length;s++){for(var[n,r,a]=e[s],i=!0,c=0;c<n.length;c++)(!1&a||l>=a)&&Object.keys(o.O).every((e=>o.O[e](n[c])))?n.splice(c--,1):(i=!1,a<l&&(l=a));if(i){e.splice(s--,1);var w=r();void 0!==w&&(t=w)}}return t}a=a||0;for(var s=e.length;s>0&&e[s-1][2]>a;s--)e[s]=e[s-1];e[s]=[n,r,a]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={57:0,350:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,a,[l,i,c]=n,w=0;if(l.some((t=>0!==e[t]))){for(r in i)o.o(i,r)&&(o.m[r]=i[r]);if(c)var s=c(o)}for(t&&t(n);w<l.length;w++)a=l[w],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return o.O(s)},n=globalThis.webpackChunkwporg_locale_switcher=globalThis.webpackChunkwporg_locale_switcher||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=o.O(void 0,[350],(()=>o(918)));r=o.O(r)})();
  • sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/locale-switcher/build/style-index.css

    r10880 r13644  
    1 #wpadminbar #wp-admin-bar-locale-switcher>.ab-item{cursor:pointer}#wpadminbar #wp-admin-bar-locale-switcher>.ab-item::before{content:"\f326";top:2px}
    2 
     1#wpadminbar #wp-admin-bar-locale-switcher>.ab-item{cursor:pointer}#wpadminbar #wp-admin-bar-locale-switcher>.ab-item:before{content:"";top:2px}
  • sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/locale-switcher/package.json

    r12151 r13644  
    2121    },
    2222    "devDependencies": {
    23         "@wordpress/scripts": "^19.2.2"
     23        "@wordpress/scripts": "27.2.0"
     24    },
     25    "stylelint": {
     26        "extends": "../../../../.stylelintrc"
    2427    }
    2528}
  • sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/locale-switcher/src/index.js

    r10880 r13644  
    5757
    5858const initLocaleSwitcher = () => {
    59     const container = document.getElementById(
    60         'wporg-locale-switcher-container'
    61     );
    62     const externalButton = document.getElementById(
    63         'wp-admin-bar-locale-switcher'
    64     );
     59    const container = document.getElementById( 'wporg-locale-switcher-container' );
     60    const externalButton = document.getElementById( 'wp-admin-bar-locale-switcher' );
    6561
    6662    const props = {
  • sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/locale-switcher/src/style.scss

    r10880 r13644  
    11#wpadminbar #wp-admin-bar-locale-switcher {
    2 
    32    > .ab-item {
    43        cursor: pointer;
Note: See TracChangeset for help on using the changeset viewer.