mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-04 18:01:42 +01:00
e76d4e1bcd
This includes: - Suggestion List: Check if a node exists to scroll into view. - Autocomplete: reset state for empty text. - Adds auxiliary class names for editor styles in the widgets editor. - Extract snackbars into a separate component. - Rich text: run input rules after composition end. - iframe: load inline styles. - Multi select: select all: restore ref callback. - Writing flow: allow select all from empty selection. - Post Excerpt: Fix excerpt_more filter conflict and remove wordCount attribute. - Add the percent unit to the default units in Core. Props desrosj. See #53397. Built from https://develop.svn.wordpress.org/trunk@51443 git-svn-id: http://core.svn.wordpress.org/trunk@51054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2 lines
4.5 KiB
JavaScript
2 lines
4.5 KiB
JavaScript
/*! This file is auto-generated */
|
|
this.wp=this.wp||{},this.wp.keyboardShortcuts=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="cFS5")}({"1ZqX":function(t,e){t.exports=window.wp.data},K9lf:function(t,e){t.exports=window.wp.compose},RxS6:function(t,e){t.exports=window.wp.keycodes},YLtl:function(t,e){t.exports=window.lodash},cFS5:function(t,e,n){"use strict";n.r(e),n.d(e,"store",(function(){return O})),n.d(e,"useShortcut",(function(){return x})),n.d(e,"__unstableUseShortcutEventMatch",(function(){return R}));var r={};n.r(r),n.d(r,"registerShortcut",(function(){return c})),n.d(r,"unregisterShortcut",(function(){return s}));var o={};n.r(o),n.d(o,"getShortcutKeyCombination",(function(){return y})),n.d(o,"getShortcutRepresentation",(function(){return b})),n.d(o,"getShortcutDescription",(function(){return S})),n.d(o,"getShortcutAliases",(function(){return g})),n.d(o,"getAllShortcutKeyCombinations",(function(){return v})),n.d(o,"getAllShortcutRawKeyCombinations",(function(){return m})),n.d(o,"getCategoryShortcuts",(function(){return w}));var u=n("1ZqX"),a=n("YLtl");var i=function(t={},e){switch(e.type){case"REGISTER_SHORTCUT":return{...t,[e.name]:{category:e.category,keyCombination:e.keyCombination,aliases:e.aliases,description:e.description}};case"UNREGISTER_SHORTCUT":return Object(a.omit)(t,e.name)}return t};function c({name:t,category:e,description:n,keyCombination:r,aliases:o}){return{type:"REGISTER_SHORTCUT",name:t,category:e,keyCombination:r,aliases:o,description:n}}function s(t){return{type:"UNREGISTER_SHORTCUT",name:t}}var l=n("pPDe"),f=n("RxS6");const d=[],p={display:f.displayShortcut,raw:f.rawShortcut,ariaLabel:f.shortcutAriaLabel};function h(t,e){return t?t.modifier?p[e][t.modifier](t.character):t.character:null}function y(t,e){return t[e]?t[e].keyCombination:null}function b(t,e,n="display"){return h(y(t,e),n)}function S(t,e){return t[e]?t[e].description:null}function g(t,e){return t[e]&&t[e].aliases?t[e].aliases:d}const v=Object(l.a)((t,e)=>Object(a.compact)([y(t,e),...g(t,e)]),(t,e)=>[t[e]]),m=Object(l.a)((t,e)=>v(t,e).map(t=>h(t,"raw")),(t,e)=>[t[e]]),w=Object(l.a)((t,e)=>Object.entries(t).filter(([,t])=>t.category===e).map(([t])=>t),t=>[t]),O=Object(u.createReduxStore)("core/keyboard-shortcuts",{reducer:i,actions:r,selectors:o});Object(u.register)(O);var j=n("K9lf");var x=function(t,e,n){const r=Object(u.useSelect)(e=>e(O).getAllShortcutRawKeyCombinations(t),[t]);Object(j.useKeyboardShortcut)(r,e,n)};function R(){const{getAllShortcutKeyCombinations:t}=Object(u.useSelect)(O);return function(e,n){return t(e).some(({modifier:t,character:e})=>f.isKeyboardEvent[t](n,e))}}},pPDe:function(t,e,n){"use strict";var r,o;function u(t){return[t]}function a(){var t={clear:function(){t.head=null}};return t}function i(t,e,n){var r;if(t.length!==e.length)return!1;for(r=n;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,e.a=function(t,e){var n,c;function s(){n=o?new WeakMap:a()}function l(){var n,r,o,u,a,s=arguments.length;for(u=new Array(s),o=0;o<s;o++)u[o]=arguments[o];for(a=e.apply(null,u),(n=c(a)).isUniqueByDependants||(n.lastDependants&&!i(a,n.lastDependants,0)&&n.clear(),n.lastDependants=a),r=n.head;r;){if(i(r.args,u,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:t.apply(null,u)},u[0]=null,r.args=u,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return e||(e=u),c=o?function(t){var e,o,u,i,c,s=n,l=!0;for(e=0;e<t.length;e++){if(o=t[e],!(c=o)||"object"!=typeof c){l=!1;break}s.has(o)?s=s.get(o):(u=new WeakMap,s.set(o,u),s=u)}return s.has(r)||((i=a()).isUniqueByDependants=l,s.set(r,i)),s.get(r)}:function(){return n},l.getDependants=e,l.clear=s,s(),l}}}); |