@ckeditor/ckeditor5-case-change 48.5.0-alpha.1 → 48.5.0-alpha.3
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.
- package/dist/index.js +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as _0x268287,Plugin as _0x3080ba}from'@ckeditor/ckeditor5-core';import{Collection as _0x42ad91,uid as _0x1c5c07}from'@ckeditor/ckeditor5-utils';import{MenuBarMenuListItemButtonView as _0x1d0fe9,MenuBarMenuListItemView as _0x2ac33b,MenuBarMenuListView as _0x27e521,MenuBarMenuView as _0x2beb1b,UIModel as _0x4fc513,addListToDropdown as _0x32c8e3,createDropdown as _0x1d165b}from'@ckeditor/ckeditor5-ui';import{IconCaseChange as _0x10cceb}from'@ckeditor/ckeditor5-icons';var h=class extends _0x268287{_transformCallback;constructor(_0x2b111f,_0x4b5f3d){super(_0x2b111f),this['_transformCallback']=_0x4b5f3d;}execute(){const _0x5b3a76=this['editor']['model'],_0x1565dd=Array['from'](this['_getAffectedRanges']()),_0x2890bf=Array['from'](_0x5b3a76['document']['selection']['getRanges']());_0x5b3a76['change'](_0x59b842=>{for(const _0x3dae1a of _0x1565dd)this['_modifyContent'](_0x3dae1a,_0x59b842);_0x59b842['setSelection'](_0x2890bf);});}['refresh'](){for(const _0x1d5d03 of this['_getAffectedRanges']())for(const _0xd312e7 of _0x1d5d03)if(_0xd312e7['item']['is']('$textProxy'))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}_getAffectedRanges(){const _0x532041=this['editor']['model'],_0x3b8c52=_0x532041['document']['selection'];if(_0x3b8c52['isCollapsed']){const _0x42c64d=this['_findAncestorTextBlock'](_0x3b8c52['getFirstPosition']()['parent']);return _0x42c64d?[_0x532041['createRangeIn'](_0x42c64d)]:[];}return _0x3b8c52['getRanges']();}_modifyContent(_0x237dfa,_0x18c807){for(const _0x32feec of this['_getElementsAllowingText'](_0x237dfa)){const _0x49559d=this['_getElementTextContent'](_0x32feec),_0x412037=this['_transformCallback'](_0x49559d);for(const _0x52d06d of this['_getTextNodesRangeLimited'](_0x32feec,_0x237dfa))this['_replaceTextNodeData'](_0x52d06d,_0x412037,_0x18c807);}}_findAncestorTextBlock(_0x25745b){const _0x156ccc=this['editor']['model']['schema'];if(_0x25745b['is']('element')&&_0x156ccc['checkChild'](_0x25745b,'$text'))return _0x25745b;const _0x14ea31=_0x25745b['parent'];return!_0x14ea31||_0x156ccc['isLimit'](_0x25745b)?null:this['_findAncestorTextBlock'](_0x14ea31);}*_getElementsAllowingText(_0x593812){const _0x563a8e=new Set();for(const {item:_0x5a34b7}of _0x593812['getWalker']()){const _0x276baf=this['_findAncestorTextBlock'](_0x5a34b7);_0x276baf&&!_0x563a8e['has'](_0x276baf)&&(_0x563a8e['add'](_0x276baf),yield _0x276baf);}}_getElementTextContent(_0x2f721c){return Array['from'](_0x2f721c['getChildren']())['reduce']((_0x527278,_0x32fb1e)=>_0x527278+(_0x32fb1e['is']('$text')?_0x32fb1e['data']:'\x20'),'');}*_getTextNodesRangeLimited(_0x1d7f7e,_0x5bd119){const _0x9880cd=_0x5bd119['getIntersection'](this['editor']['model']['createRangeIn'](_0x1d7f7e));if(_0x9880cd){for(const _0x111e46 of _0x9880cd['getItems']())_0x111e46['is']('$textProxy')&&_0x111e46['parent']==_0x1d7f7e&&(yield _0x111e46);}}_replaceTextNodeData(_0x12e1bc,_0x18d0bd,_0x579b7c){const _0xc79b90=_0x18d0bd['substring'](_0x12e1bc['startOffset'],_0x12e1bc['endOffset']);if(_0xc79b90===_0x12e1bc['data'])return;const _0x1e6395=_0x12e1bc['getAttributes']();this['editor']['model']['insertContent'](_0x579b7c['createText'](_0xc79b90,_0x1e6395),_0x579b7c['createSelection'](_0x579b7c['createRangeOn'](_0x12e1bc)));}};function w(_0x1d412d,_0x156f7f,..._0x269d99){const t=_0x1d412d['t'];switch(_0x156f7f){case'Case\x20change':return t('Case\x20change');case'UPPERCASE':return t('UPPERCASE');case'lowercase':return t('lowercase');case'Title\x20Case':return t('Title\x20Case');case'Change\x20text\x20case':return t('Change\x20text\x20case');case'Changed\x20case\x20to\x20%0':return t('Changed\x20case\x20to\x20%0',..._0x269d99);default:return _0x156f7f;}}var g=class extends _0x3080ba{_currentCommandIndex=0x0;static get['pluginName'](){return'CaseChangeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x4e481b=this['editor'],_0x45cd6b=_0x4e481b['locale']['contentLanguage'],_0x5b0094=function(_0x46391b=[]){return'function'==typeof _0x46391b?_0x46391b:(_0x4e43e8,{wordIndex:_0x3b722f})=>_0x3b722f>0x0&&_0x46391b['includes'](_0x4e43e8);}(_0x4e481b['config']['get']('caseChange.titleCase.excludeWords')),_0x3f7a97={'changeCaseUpper':new h(_0x4e481b,_0xc18532=>_0xc18532['toLocaleUpperCase'](_0x45cd6b)),'changeCaseLower':new h(_0x4e481b,_0x23a7b3=>_0x23a7b3['toLocaleLowerCase'](_0x45cd6b)),'changeCaseTitle':new h(_0x4e481b,_0x56236d=>function(_0x2acd57,_0x55fb19,_0x423a01){return function(_0xf335f4,_0x15b2f9){let _0x372351='',_0x242c57=0x0,_0x4e9d1b=0x0;for(const _0x565e33 of _0xf335f4['matchAll'](/ +/g)){const _0x5a6cf0=_0x565e33['index'],_0x381c89=_0xf335f4['substring'](_0x242c57,_0x5a6cf0);_0x381c89['length']&&(_0x372351+=_0x15b2f9(_0x381c89,_0x242c57,_0x4e9d1b++)),_0x372351+=_0x565e33[0x0],_0x242c57=_0x5a6cf0+_0x565e33[0x0]['length'];}const _0x177d61=_0xf335f4['substring'](_0x242c57);return _0x177d61['length']&&(_0x372351+=_0x15b2f9(_0x177d61,_0x242c57,_0x4e9d1b)),_0x372351;}(_0x2acd57,(_0x419135,_0x505594,_0x2e6ee4)=>{const _0x5703b5=_0x419135['toLocaleLowerCase'](_0x423a01);return _0x55fb19(_0x5703b5,{'charOffset':_0x505594,'wordIndex':_0x2e6ee4,'blockText':_0x2acd57})?_0x5703b5:_0x5703b5['replace'](/(?:^|[^\p{L}\d'])\p{L}/gu,_0x5e5009=>_0x5e5009['toLocaleUpperCase'](_0x423a01));});}(_0x56236d,_0x5b0094,_0x45cd6b))};for(const [_0x28f7f8,_0x3c3ac1]of Object['entries'](_0x3f7a97))_0x4e481b['commands']['add'](_0x28f7f8,_0x3c3ac1),_0x3c3ac1['on']('execute',()=>{this['_announceCaseChangeOperation'](_0x28f7f8);});this['listenTo'](_0x4e481b['editing']['view']['document'],'selectionChange',()=>{this['_currentCommandIndex']=0x0;}),_0x4e481b['keystrokes']['set']('shift+f3',(_0x396130,_0x52a9ec)=>{const _0x166dfb=m(this['editor']['locale']),_0x26e12e=_0x166dfb[this['_currentCommandIndex']%_0x166dfb['length']]['commandName'];_0x4e481b['execute'](_0x26e12e),this['_currentCommandIndex']++,_0x52a9ec();});}afterInit(){!async function(_0x3cfafb){const _0x202e45='aWxlPG0A3CDdHBsZEqwULojOrgMXVTRvu1bI2487ptzJKQeihfNkYS9n6y5mcF',_0x430cc7=0x793e0,_0x33a30f={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x40c54b(_0x5d00ec){const _0x5720cb=new window['Promise'](_0x5870f4=>{_0x5d00ec['once']('ready',_0x5870f4);}),_0x17ed84=window['Date']['now'](),_0xc107bd=_0x5d00ec['config']['get']('licenseKey');async function _0x3acd16(){let _0x243a6a,_0x47b399=null,_0x5d1621=null;try{return'GPL'==_0xc107bd?'NotAllowed':(_0x243a6a=_0x162ad7(),_0x243a6a?(_0x243a6a['usageEndpoint']&&(_0x5d1621=_0x45029e(_0x243a6a['usageEndpoint'],_0x243a6a['jti'])),await _0x4245a2()?_0x526f5f()?_0x491077()?'Expired':_0x561b5d()?('evaluation'==_0x243a6a['licenseType']&&(_0x47b399=_0x533584('EvaluationLimit')),await _0x198847()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x491077(){const _0x3e3223=['evaluation','trial']['includes'](_0x243a6a['licenseType'])?_0x17ed84/0x3e8:0xe10*_0x430cc7;return _0x243a6a['exp']<_0x3e3223;}function _0x526f5f(){const _0x277abf=_0x243a6a['features'];return!!_0x277abf&&(!!_0x277abf['includes']('*')||(!!_0x277abf['includes']('CC')||!!_0x277abf['includes']('PP')));}function _0x561b5d(){const _0x35b551=_0x243a6a['licensedHosts'];if(!_0x35b551||0x0==_0x35b551['length'])return!0x0;const {hostname:_0x19e446}=new URL(window['location']['href']);if(_0x35b551['includes'](_0x19e446))return!0x0;const _0xb8ab5a=_0x19e446['split']('.');return _0x35b551['filter'](_0x2399a7=>_0x2399a7['includes']('*'))['map'](_0xd5d539=>_0xd5d539['split']('.'))['filter'](_0x59139a=>_0x59139a['length']<=_0xb8ab5a['length'])['map'](_0x18ffe7=>Array(_0xb8ab5a['length']-_0x18ffe7['length'])['fill']('*'===_0x18ffe7[0x0]?'*':'')['concat'](_0x18ffe7))['some'](_0x2ec30c=>_0xb8ab5a['every']((_0x45acfd,_0x12f6b1)=>_0x2ec30c[_0x12f6b1]===_0x45acfd||'*'===_0x2ec30c[_0x12f6b1]));}function _0x198847(){return _0x47b399&&_0x5d1621?new window['Promise']((_0x52a8eb,_0x33cba0)=>{_0x47b399['then'](_0x52a8eb,_0x33cba0),_0x5d1621['then'](_0xfc6ece=>{'Valid'!=_0xfc6ece&&_0x52a8eb(_0xfc6ece);},_0x33cba0);}):_0x47b399||_0x5d1621||'Valid';}}function _0x45029e(_0x2a66c3,_0x3d922e){return new window['Promise'](_0x14346d=>{if(_0x4b46b4())return _0x14346d('Valid');_0x34a29b(),_0x5d00ec['decorate']('_sendUsageRequest');let _0x463fc4=!0x1;const _0x3a3c35=_0x1c5c07();function _0xe0a03c(_0x5524ae){return!!_0x5524ae&&('object'==typeof _0x5524ae||'function'==typeof _0x5524ae)&&'function'==typeof _0x5524ae['then']&&'function'==typeof _0x5524ae['catch'];}function _0x3c89c3(_0x1a3f01){_0x428afe(_0x1a3f01)['then'](_0x53ae24=>_0x53ae24&&'ok'==_0x53ae24['status']?_0x4c34cf(_0x574e65(_0x3a3c35+_0x3d922e))!=_0x53ae24['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5dc42d=>(_0x19046b(),_0x5dc42d),()=>{const _0x4580b1=_0x122060();return null==_0x4580b1?(_0x19046b(),'Valid'):_0x17ed84-_0x4580b1>0x240c8400?'UsageLimit':'Valid';})['then'](_0x14346d)['catch'](()=>{_0x14346d('UsageLimit');});const _0x22422b=0x36ee80;function _0x19046b(){const _0x4d2a71='llct-'+_0x4c34cf(_0x574e65(_0x2a66c3)),_0x4810e6=_0x2ffbba(_0x4c34cf(window['Math']['ceil'](_0x17ed84/_0x22422b)));window['localStorage']['setItem'](_0x4d2a71,_0x4810e6);}function _0x122060(){const _0x4a007f='llct-'+_0x4c34cf(_0x574e65(_0x2a66c3)),_0x226ee8=window['localStorage']['getItem'](_0x4a007f);return _0x226ee8?window['parseInt'](_0x2ffbba(_0x226ee8),0x10)*_0x22422b:null;}function _0x428afe(_0x48278d){return new window['Promise']((_0x368d42,_0x4c179f)=>{_0x48278d['then'](_0x368d42,_0x4c179f),window['setTimeout'](_0x4c179f,0x1d4c0);});}}_0x5d00ec['on']('_sendUsageRequest',(_0x59d226,_0x3d730e)=>{if(_0x3d730e[0x0]!=_0x2a66c3)return _0x14346d('UsageLimit');_0x3d730e[0x1]={..._0x3d730e[0x1],'requestId':_0x3a3c35};},{'priority':'high'}),_0x5d00ec['on']('_sendUsageRequest',_0x390c67=>{_0xe0a03c(_0x390c67['return'])&&(_0x463fc4=!0x0,_0x3c89c3(_0x390c67['return']));},{'priority':'low'}),_0x5720cb['then'](()=>{_0x463fc4||_0x14346d('UsageLimit');});});function _0x4b46b4(){return'auto'==_0x5d00ec['editing']['view']['_overlayModeHint'];}function _0x34a29b(){_0x5d00ec['editing']['view']['_overlayModeHint']='auto';}}function _0x533584(_0x22030e){const _0x4a332f=[new window['Promise'](_0x5492f5=>setTimeout(_0x5492f5,0x93ecc)),_0x5720cb['then'](()=>new window['Promise'](_0x51934f=>{let _0x30bd59=0x0;_0x5d00ec['model']['on']('applyOperation',(_0x607260,_0x41171b)=>{_0x41171b[0x0]['isDocumentOperation']&&_0x30bd59++,0x5e8==_0x30bd59&&(_0x51934f(),_0x607260['off']());});}))];return window['Promise']['race'](_0x4a332f)['then'](()=>_0x22030e);}async function _0x4f15db(){await _0x5720cb,_0x5d00ec['model']['change']=_0x5b0a21,_0x5d00ec['model']['enqueueChange']=_0x5b0a21,_0x5d00ec['enableReadOnlyMode']('model');}function _0x591a31(_0xa327bf){const _0x50b412=_0x4104cd();_0x5d00ec[_0x50b412]='caseChangeLicenseKey'+_0xa327bf,'Valid'!=_0xa327bf&&_0x4f15db();}function _0x4104cd(){const _0x3bbab5=window['String'](window['performance']['now']())['replace']('.','');let _0x1c6b17='a';for(let _0x4dd954=0x0;_0x4dd954<_0x3bbab5['length'];_0x4dd954+=0x2){let _0x374385=window['parseInt'](_0x3bbab5['substring'](_0x4dd954,_0x4dd954+0x2));_0x374385>=0x3e&&(_0x374385-=0x3e),_0x1c6b17+=_0x202e45[_0x374385];}return _0x1c6b17;}function _0x162ad7(){const _0x383da4=_0xc107bd['split']('.');if(0x3!=_0x383da4['length'])return null;return _0x2fe9d2(_0x383da4[0x1]);function _0x2fe9d2(_0x1845d4){const _0xeeee40=_0x45fe2e(_0x1845d4);return _0xeeee40&&_0x138f8f()?_0xeeee40:null;function _0x138f8f(){const _0x79a4dc=_0xeeee40['jti'],_0x1b94de=window['parseInt'](_0x79a4dc['substring'](_0x79a4dc['length']-0x8),0x10),_0x3e4b1f={..._0xeeee40,'jti':_0x79a4dc['substring'](0x0,_0x79a4dc['length']-0x8)};return delete _0x3e4b1f['vc'],_0x574e65(_0x3e4b1f)==_0x1b94de;}}}async function _0x4245a2(){let _0x46e416=!0x0;try{const [_0x1d81c7,_0x357e84,_0x2ea8c5]=_0xc107bd['split']('.');return _0x2b5574(_0x1d81c7),await _0x5bce18(_0x1d81c7,_0x357e84,_0x2ea8c5),_0x46e416;}catch{return!0x1;}function _0x2b5574(_0x5df119){const _0x3054ba=_0x45fe2e(_0x5df119);_0x3054ba&&'ES256'==_0x3054ba['alg']||(_0x46e416=!0x1);}async function _0x5bce18(_0x2923f8,_0x557e0e,_0x5f1623){const _0x17d655=window['Uint8Array']['from'](_0x163224(_0x5f1623),_0x3b66af=>_0x3b66af['charCodeAt'](0x0)),_0x24c6e7=new window['TextEncoder']()['encode'](_0x2923f8+'.'+_0x557e0e),_0x543679=window['crypto']['subtle'];if(!_0x543679)return;const _0x3c980e=await _0x543679['importKey']('jwk',_0x33a30f,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x543679['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3c980e,_0x17d655,_0x24c6e7)||(_0x46e416=!0x1);}}function _0x45fe2e(_0x47e1b4){return _0x47e1b4['startsWith']('ey')?JSON['parse'](_0x163224(_0x47e1b4)):null;}function _0x163224(_0x2ad430){return window['atob'](_0x2ad430['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x574e65(_0x14c476){let _0x25595a=0x1505;function _0x5ddf41(_0x39a775){for(let _0x12f4e7=0x0;_0x12f4e7<_0x39a775['length'];_0x12f4e7++){const _0x2bd68c=_0x39a775['charCodeAt'](_0x12f4e7);_0x25595a=(_0x25595a<<0x5)+_0x25595a+_0x2bd68c,_0x25595a&=_0x25595a;}}function _0x191c8b(_0x4097df){Array['isArray'](_0x4097df)?_0x4097df['forEach'](_0x191c8b):_0x4097df&&'object'==typeof _0x4097df?Object['entries'](_0x4097df)['sort']()['forEach'](([_0xb5969a,_0x5d6664])=>{_0x5ddf41(_0xb5969a),_0x191c8b(_0x5d6664);}):_0x5ddf41(window['String'](_0x4097df));}return _0x191c8b(_0x14c476),_0x25595a>>>0x0;}function _0x4c34cf(_0x47ba2b){return _0x47ba2b['toString'](0x10)['padStart'](0x8,'0');}function _0x2ffbba(_0x36948b){return _0x36948b['split']('')['reverse']()['join']('');}function _0x5b0a21(){}_0x591a31(await _0x3acd16());}_0x40c54b(_0x3cfafb['editor']);}(this);}_announceCaseChangeOperation(_0x4b2869){const {ui:_0x173891,locale:_0x12a89c}=this['editor'],_0x2e607e=m(_0x12a89c)['find'](_0x357f37=>_0x357f37['commandName']===_0x4b2869)['label']['toLowerCase']();_0x173891['ariaLiveAnnouncer']['announce'](w(_0x12a89c,'Changed\x20case\x20to\x20%0',_0x2e607e));}};function m(_0x1088c6){return[{'label':w(_0x1088c6,'UPPERCASE'),'commandName':'changeCaseUpper'},{'label':w(_0x1088c6,'lowercase'),'commandName':'changeCaseLower'},{'label':w(_0x1088c6,'Title\x20Case'),'commandName':'changeCaseTitle'}];}var C=class extends _0x3080ba{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CaseChangeUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x268612=this['editor'];this['_registerComponents'](),_0x268612['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':w(_0x268612['locale'],'Change\x20text\x20case'),'keystroke':'Shift+f3','mayRequireFn':!0x0}]}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x4d6065=[this['editor']];for(const _0x42847 of _0x4d6065){let _0x5479e;for(const _0x54bc82 in _0x42847){const _0x48f3c7=_0x54bc82,_0xa37c5f=_0x42847[_0x48f3c7];if('caseChangeLicenseKeyValid'==_0xa37c5f||'caseChangeLicenseKeyInvalid'==_0xa37c5f||'caseChangeLicenseKeyExpired'==_0xa37c5f||'caseChangeLicenseKeyDomainLimit'==_0xa37c5f||'caseChangeLicenseKeyNotAllowed'==_0xa37c5f||'caseChangeLicenseKeyEvaluationLimit'==_0xa37c5f||'caseChangeLicenseKeyUsageLimit'==_0xa37c5f){delete _0x42847[_0x48f3c7],_0x5479e=_0xa37c5f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'caseChangeLicenseKeyInvalid'==_0x5479e&&_0x42847['_showLicenseError']('invalid'),'caseChangeLicenseKeyExpired'==_0x5479e&&_0x42847['_showLicenseError']('expired'),'caseChangeLicenseKeyDomainLimit'==_0x5479e&&_0x42847['_showLicenseError']('domainLimit'),'caseChangeLicenseKeyNotAllowed'==_0x5479e&&_0x42847['_showLicenseError']('featureNotAllowed','CaseChange'),'caseChangeLicenseKeyEvaluationLimit'==_0x5479e&&_0x42847['_showLicenseError']('evaluationLimit'),'caseChangeLicenseKeyUsageLimit'==_0x5479e&&_0x42847['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_registerComponents(){const _0x41485c=this['editor'],{itemDefinitions:_0xce1414,commands:_0x54e999}=this['_getListItemDefinitionsAndCommands']();_0x41485c['ui']['componentFactory']['add']('caseChange',()=>this['_createDropdownView'](_0xce1414,_0x54e999)),_0x41485c['ui']['componentFactory']['add']('menuBar:caseChange',()=>this['_createMenuBarMenuView'](_0xce1414,_0x54e999));}_createMenuBarMenuView(_0x287575,_0x347ec7){const _0x19415c=this['editor'],_0x32dad0=_0x19415c['locale'],_0x2db285=new _0x2beb1b(_0x32dad0),_0x239fb3=new _0x27e521(_0x32dad0);_0x239fb3['set']({'ariaLabel':w(_0x32dad0,'Case\x20change'),'role':'menu'}),this['_setButtonProperties'](_0x2db285['buttonView']),_0x2db285['bind']('isEnabled')['toMany'](_0x347ec7,'isEnabled',(..._0x5133cd)=>_0x5133cd['some'](_0x22ee39=>_0x22ee39));for(const _0x6d35ad of _0x287575){const _0x3e81c3=new _0x2ac33b(_0x32dad0,_0x2db285),_0x2df205=new _0x1d0fe9(_0x32dad0);_0x2df205['delegate']('execute')['to'](_0x2db285),_0x2df205['bind'](...Object['keys'](_0x6d35ad['model']))['to'](_0x6d35ad['model']),_0x2df205['on']('execute',()=>{_0x19415c['execute'](_0x6d35ad['model']['commandName']),_0x19415c['editing']['view']['focus']();}),_0x3e81c3['children']['add'](_0x2df205),_0x239fb3['items']['add'](_0x3e81c3);}return _0x2db285['panelView']['children']['add'](_0x239fb3),_0x2db285;}_createDropdownView(_0x551d42,_0x360470){const _0x255fec=this['editor'],_0xe18310=_0x1d165b(_0x255fec['locale']);return this['_setButtonProperties'](_0xe18310['buttonView']),_0xe18310['buttonView']['set']({'tooltip':!0x0}),_0xe18310['extendTemplate']({'attributes':{'class':['ck-case-change-dropdown']}}),_0x32c8e3(_0xe18310,_0x551d42,{'ariaLabel':w(_0x255fec['locale'],'Case\x20change'),'role':'menu'}),_0xe18310['bind']('isEnabled')['toMany'](_0x360470,'isEnabled',(..._0x40ca10)=>_0x40ca10['some'](_0x1701b9=>_0x1701b9)),this['listenTo'](_0xe18310,'execute',_0x27670d=>{_0x255fec['execute'](_0x27670d['source']['commandName']),_0x255fec['editing']['view']['focus']();}),_0xe18310;}_setButtonProperties(_0x677e5d){const _0x39feb6=this['editor'];_0x677e5d['set']({'label':w(_0x39feb6['locale'],'Case\x20change'),'icon':_0x10cceb,'keystroke':'Shift+F3'});}_getListItemDefinitionsAndCommands(){const _0x41633a=new _0x42ad91(),_0x5bfd86=[];for(const _0x3c1b50 of m(this['editor']['locale'])){const _0x4e4164=this['editor']['commands']['get'](_0x3c1b50['commandName']),_0x2c1e62=new _0x4fc513({'commandName':_0x3c1b50['commandName'],'label':_0x3c1b50['label'],'role':'menuitemradio','withText':!0x0});_0x2c1e62['bind']('isEnabled')['to'](_0x4e4164,'isEnabled'),_0x41633a['add']({'type':'button','model':_0x2c1e62}),_0x5bfd86['push'](_0x4e4164);}return{'itemDefinitions':_0x41633a,'commands':_0x5bfd86};}},y=class extends _0x3080ba{static get requires(){return[g,C];}static get['pluginName'](){return'CaseChange';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{y as CaseChange,h as CaseChangeCommand,g as CaseChangeEditing,C as CaseChangeUI};
|
|
23
|
+
import{Command as _0x53cd63,Plugin as _0x5ed300}from'@ckeditor/ckeditor5-core';import{Collection as _0x2ea394,uid as _0x3a0e25}from'@ckeditor/ckeditor5-utils';import{MenuBarMenuListItemButtonView as _0x16a902,MenuBarMenuListItemView as _0x17b795,MenuBarMenuListView as _0x5a1f4a,MenuBarMenuView as _0x2b02ae,UIModel as _0x521a8b,addListToDropdown as _0x752eb,createDropdown as _0x528cc7}from'@ckeditor/ckeditor5-ui';import{IconCaseChange as _0x3de04b}from'@ckeditor/ckeditor5-icons';var h=class extends _0x53cd63{_transformCallback;constructor(_0x258574,_0x393d6b){super(_0x258574),this['_transformCallback']=_0x393d6b;}execute(){const _0x70a141=this['editor']['model'],_0x25532f=Array['from'](this['_getAffectedRanges']()),_0x331d8e=Array['from'](_0x70a141['document']['selection']['getRanges']());_0x70a141['change'](_0x379c4a=>{for(const _0xd9468c of _0x25532f)this['_modifyContent'](_0xd9468c,_0x379c4a);_0x379c4a['setSelection'](_0x331d8e);});}['refresh'](){for(const _0x8e2bc5 of this['_getAffectedRanges']())for(const _0x9fe719 of _0x8e2bc5)if(_0x9fe719['item']['is']('$textProxy'))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}_getAffectedRanges(){const _0xaa4a65=this['editor']['model'],_0x34c461=_0xaa4a65['document']['selection'];if(_0x34c461['isCollapsed']){const _0xd128b3=this['_findAncestorTextBlock'](_0x34c461['getFirstPosition']()['parent']);return _0xd128b3?[_0xaa4a65['createRangeIn'](_0xd128b3)]:[];}return _0x34c461['getRanges']();}_modifyContent(_0x1509ab,_0x31ae9c){for(const _0x2e2675 of this['_getElementsAllowingText'](_0x1509ab)){const _0x1f9a5f=this['_getElementTextContent'](_0x2e2675),_0x534f71=this['_transformCallback'](_0x1f9a5f);for(const _0x28b5e4 of this['_getTextNodesRangeLimited'](_0x2e2675,_0x1509ab))this['_replaceTextNodeData'](_0x28b5e4,_0x534f71,_0x31ae9c);}}_findAncestorTextBlock(_0x5a3b5b){const _0x15225f=this['editor']['model']['schema'];if(_0x5a3b5b['is']('element')&&_0x15225f['checkChild'](_0x5a3b5b,'$text'))return _0x5a3b5b;const _0x20bade=_0x5a3b5b['parent'];return!_0x20bade||_0x15225f['isLimit'](_0x5a3b5b)?null:this['_findAncestorTextBlock'](_0x20bade);}*_getElementsAllowingText(_0x550d6a){const _0x10dffb=new Set();for(const {item:_0x3dc35a}of _0x550d6a['getWalker']()){const _0xb96caf=this['_findAncestorTextBlock'](_0x3dc35a);_0xb96caf&&!_0x10dffb['has'](_0xb96caf)&&(_0x10dffb['add'](_0xb96caf),yield _0xb96caf);}}_getElementTextContent(_0x4b6781){return Array['from'](_0x4b6781['getChildren']())['reduce']((_0x4cab11,_0x798cd5)=>_0x4cab11+(_0x798cd5['is']('$text')?_0x798cd5['data']:'\x20'),'');}*_getTextNodesRangeLimited(_0x58aa3a,_0x31157e){const _0x4c999b=_0x31157e['getIntersection'](this['editor']['model']['createRangeIn'](_0x58aa3a));if(_0x4c999b){for(const _0x51950c of _0x4c999b['getItems']())_0x51950c['is']('$textProxy')&&_0x51950c['parent']==_0x58aa3a&&(yield _0x51950c);}}_replaceTextNodeData(_0x4ddfb4,_0x200126,_0x423bf1){const _0x3fa98a=_0x200126['substring'](_0x4ddfb4['startOffset'],_0x4ddfb4['endOffset']);if(_0x3fa98a===_0x4ddfb4['data'])return;const _0x312e17=_0x4ddfb4['getAttributes']();this['editor']['model']['insertContent'](_0x423bf1['createText'](_0x3fa98a,_0x312e17),_0x423bf1['createSelection'](_0x423bf1['createRangeOn'](_0x4ddfb4)));}};function w(_0x268f0c,_0x2ded0a,..._0x1dafb2){const t=_0x268f0c['t'];switch(_0x2ded0a){case'Case\x20change':return t('Case\x20change');case'UPPERCASE':return t('UPPERCASE');case'lowercase':return t('lowercase');case'Title\x20Case':return t('Title\x20Case');case'Change\x20text\x20case':return t('Change\x20text\x20case');case'Changed\x20case\x20to\x20%0':return t('Changed\x20case\x20to\x20%0',..._0x1dafb2);default:return _0x2ded0a;}}var g=class extends _0x5ed300{_currentCommandIndex=0x0;static get['pluginName'](){return'CaseChangeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x1d7ce5=this['editor'],_0x4e3b81=_0x1d7ce5['locale']['contentLanguage'],_0x546f4f=function(_0x3f74e0=[]){return'function'==typeof _0x3f74e0?_0x3f74e0:(_0x2516ed,{wordIndex:_0x1c0be6})=>_0x1c0be6>0x0&&_0x3f74e0['includes'](_0x2516ed);}(_0x1d7ce5['config']['get']('caseChange.titleCase.excludeWords')),_0x2e566c={'changeCaseUpper':new h(_0x1d7ce5,_0x181235=>_0x181235['toLocaleUpperCase'](_0x4e3b81)),'changeCaseLower':new h(_0x1d7ce5,_0x213b0=>_0x213b0['toLocaleLowerCase'](_0x4e3b81)),'changeCaseTitle':new h(_0x1d7ce5,_0x4fa514=>function(_0x15ef33,_0x5e285b,_0x197c93){return function(_0x35854f,_0x54270e){let _0x1749fc='',_0x175794=0x0,_0x31e10a=0x0;for(const _0x47eba1 of _0x35854f['matchAll'](/ +/g)){const _0x3324e9=_0x47eba1['index'],_0x380eba=_0x35854f['substring'](_0x175794,_0x3324e9);_0x380eba['length']&&(_0x1749fc+=_0x54270e(_0x380eba,_0x175794,_0x31e10a++)),_0x1749fc+=_0x47eba1[0x0],_0x175794=_0x3324e9+_0x47eba1[0x0]['length'];}const _0x9ed17=_0x35854f['substring'](_0x175794);return _0x9ed17['length']&&(_0x1749fc+=_0x54270e(_0x9ed17,_0x175794,_0x31e10a)),_0x1749fc;}(_0x15ef33,(_0x48a8f4,_0x48c890,_0x298568)=>{const _0x1393e3=_0x48a8f4['toLocaleLowerCase'](_0x197c93);return _0x5e285b(_0x1393e3,{'charOffset':_0x48c890,'wordIndex':_0x298568,'blockText':_0x15ef33})?_0x1393e3:_0x1393e3['replace'](/(?:^|[^\p{L}\d'])\p{L}/gu,_0x5a5c07=>_0x5a5c07['toLocaleUpperCase'](_0x197c93));});}(_0x4fa514,_0x546f4f,_0x4e3b81))};for(const [_0x39e2f1,_0x205234]of Object['entries'](_0x2e566c))_0x1d7ce5['commands']['add'](_0x39e2f1,_0x205234),_0x205234['on']('execute',()=>{this['_announceCaseChangeOperation'](_0x39e2f1);});this['listenTo'](_0x1d7ce5['editing']['view']['document'],'selectionChange',()=>{this['_currentCommandIndex']=0x0;}),_0x1d7ce5['keystrokes']['set']('shift+f3',(_0x2b9984,_0x32b616)=>{const _0xe54066=m(this['editor']['locale']),_0x302240=_0xe54066[this['_currentCommandIndex']%_0xe54066['length']]['commandName'];_0x1d7ce5['execute'](_0x302240),this['_currentCommandIndex']++,_0x32b616();});}afterInit(){!async function(_0x3e9a90){const _0x4ac316='aWxlPG0A3CDdHBsZEqwULojOrgMXVTRvu1bI2487ptzJKQeihfNkYS9n6y5mcF',_0x537945=0x79410,_0x58a281={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x2ab53d(_0x34480c){const _0x32adde=new window['Promise'](_0x40e230=>{_0x34480c['once']('ready',_0x40e230);}),_0x5183ba=window['Date']['now'](),_0x542aaf=_0x34480c['config']['get']('licenseKey');async function _0x284c0e(){let _0x2c4645,_0x35e482=null,_0x273808=null;try{return'GPL'==_0x542aaf?'NotAllowed':(_0x2c4645=_0x18b8e4(),_0x2c4645?(_0x2c4645['usageEndpoint']&&(_0x273808=_0x579da1(_0x2c4645['usageEndpoint'],_0x2c4645['jti'])),await _0xd27eb4()?_0x2d0614()?_0xf22d6d()?'Expired':_0x1224f4()?('evaluation'==_0x2c4645['licenseType']&&(_0x35e482=_0x456793('EvaluationLimit')),await _0x12c631()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0xf22d6d(){const _0x3b11d0=['evaluation','trial']['includes'](_0x2c4645['licenseType'])?_0x5183ba/0x3e8:0xe10*_0x537945;return _0x2c4645['exp']<_0x3b11d0;}function _0x2d0614(){const _0xb39d1b=_0x2c4645['features'];return!!_0xb39d1b&&(!!_0xb39d1b['includes']('*')||(!!_0xb39d1b['includes']('CC')||!!_0xb39d1b['includes']('PP')));}function _0x1224f4(){const _0x4a88dd=_0x2c4645['licensedHosts'];if(!_0x4a88dd||0x0==_0x4a88dd['length'])return!0x0;const {hostname:_0x4c8f1a}=new URL(window['location']['href']);if(_0x4a88dd['includes'](_0x4c8f1a))return!0x0;const _0x532145=_0x4c8f1a['split']('.');return _0x4a88dd['filter'](_0x234fe2=>_0x234fe2['includes']('*'))['map'](_0x488feb=>_0x488feb['split']('.'))['filter'](_0x2676c3=>_0x2676c3['length']<=_0x532145['length'])['map'](_0x4e27cb=>Array(_0x532145['length']-_0x4e27cb['length'])['fill']('*'===_0x4e27cb[0x0]?'*':'')['concat'](_0x4e27cb))['some'](_0x127648=>_0x532145['every']((_0x3dd226,_0x3712ae)=>_0x127648[_0x3712ae]===_0x3dd226||'*'===_0x127648[_0x3712ae]));}function _0x12c631(){return _0x35e482&&_0x273808?new window['Promise']((_0x52146d,_0x2745d0)=>{_0x35e482['then'](_0x52146d,_0x2745d0),_0x273808['then'](_0xbf917a=>{'Valid'!=_0xbf917a&&_0x52146d(_0xbf917a);},_0x2745d0);}):_0x35e482||_0x273808||'Valid';}}function _0x579da1(_0x151451,_0x23ab5a){return new window['Promise'](_0xf0fbcd=>{if(_0x38d047())return _0xf0fbcd('Valid');_0x176219(),_0x34480c['decorate']('_sendUsageRequest');let _0x248e29=!0x1;const _0x1f2379=_0x3a0e25();function _0x4bc3e3(_0x131232){return!!_0x131232&&('object'==typeof _0x131232||'function'==typeof _0x131232)&&'function'==typeof _0x131232['then']&&'function'==typeof _0x131232['catch'];}function _0x35d7a6(_0x44a62d){_0xf96711(_0x44a62d)['then'](_0x4697dc=>_0x4697dc&&'ok'==_0x4697dc['status']?_0x28d4bc(_0x4619cb(_0x1f2379+_0x23ab5a))!=_0x4697dc['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x215a04=>(_0x11ebbb(),_0x215a04),()=>{const _0x3c5c28=_0x16c5c3();return null==_0x3c5c28?(_0x11ebbb(),'Valid'):_0x5183ba-_0x3c5c28>0x240c8400?'UsageLimit':'Valid';})['then'](_0xf0fbcd)['catch'](()=>{_0xf0fbcd('UsageLimit');});const _0x4e004b=0x36ee80;function _0x11ebbb(){const _0x394c9e='llct-'+_0x28d4bc(_0x4619cb(_0x151451)),_0x3f6903=_0x51b6e6(_0x28d4bc(window['Math']['ceil'](_0x5183ba/_0x4e004b)));window['localStorage']['setItem'](_0x394c9e,_0x3f6903);}function _0x16c5c3(){const _0x2f07e2='llct-'+_0x28d4bc(_0x4619cb(_0x151451)),_0x210450=window['localStorage']['getItem'](_0x2f07e2);return _0x210450?window['parseInt'](_0x51b6e6(_0x210450),0x10)*_0x4e004b:null;}function _0xf96711(_0x591a6d){return new window['Promise']((_0x371b20,_0x212e2e)=>{_0x591a6d['then'](_0x371b20,_0x212e2e),window['setTimeout'](_0x212e2e,0x1d4c0);});}}_0x34480c['on']('_sendUsageRequest',(_0x26daf5,_0x15ca34)=>{if(_0x15ca34[0x0]!=_0x151451)return _0xf0fbcd('UsageLimit');_0x15ca34[0x1]={..._0x15ca34[0x1],'requestId':_0x1f2379};},{'priority':'high'}),_0x34480c['on']('_sendUsageRequest',_0x5acb18=>{_0x4bc3e3(_0x5acb18['return'])&&(_0x248e29=!0x0,_0x35d7a6(_0x5acb18['return']));},{'priority':'low'}),_0x32adde['then'](()=>{_0x248e29||_0xf0fbcd('UsageLimit');});});function _0x38d047(){return'auto'==_0x34480c['editing']['view']['_overlayModeHint'];}function _0x176219(){_0x34480c['editing']['view']['_overlayModeHint']='auto';}}function _0x456793(_0x4a68a0){const _0x45b1ca=[new window['Promise'](_0x1167b1=>setTimeout(_0x1167b1,0x93ecc)),_0x32adde['then'](()=>new window['Promise'](_0x450287=>{let _0x22aaed=0x0;_0x34480c['model']['on']('applyOperation',(_0x9cf69a,_0x4ebfca)=>{_0x4ebfca[0x0]['isDocumentOperation']&&_0x22aaed++,0x5e8==_0x22aaed&&(_0x450287(),_0x9cf69a['off']());});}))];return window['Promise']['race'](_0x45b1ca)['then'](()=>_0x4a68a0);}async function _0x1f896a(){await _0x32adde,_0x34480c['model']['change']=_0x38a385,_0x34480c['model']['enqueueChange']=_0x38a385,_0x34480c['enableReadOnlyMode']('model');}function _0x5b8fb8(_0x1ea002){const _0x5cbf6e=_0x59b12d();_0x34480c[_0x5cbf6e]='caseChangeLicenseKey'+_0x1ea002,'Valid'!=_0x1ea002&&_0x1f896a();}function _0x59b12d(){const _0x3b0a17=window['String'](window['performance']['now']())['replace']('.','');let _0x3171e6='a';for(let _0x5cc696=0x0;_0x5cc696<_0x3b0a17['length'];_0x5cc696+=0x2){let _0x2e8f66=window['parseInt'](_0x3b0a17['substring'](_0x5cc696,_0x5cc696+0x2));_0x2e8f66>=0x3e&&(_0x2e8f66-=0x3e),_0x3171e6+=_0x4ac316[_0x2e8f66];}return _0x3171e6;}function _0x18b8e4(){const _0x45bbcb=_0x542aaf['split']('.');if(0x3!=_0x45bbcb['length'])return null;return _0x339118(_0x45bbcb[0x1]);function _0x339118(_0x29c83f){const _0x4c99ff=_0x2af3b4(_0x29c83f);return _0x4c99ff&&_0x31ab97()?_0x4c99ff:null;function _0x31ab97(){const _0x6f9a6b=_0x4c99ff['jti'],_0x32c1b4=window['parseInt'](_0x6f9a6b['substring'](_0x6f9a6b['length']-0x8),0x10),_0x5d1d72={..._0x4c99ff,'jti':_0x6f9a6b['substring'](0x0,_0x6f9a6b['length']-0x8)};return delete _0x5d1d72['vc'],_0x4619cb(_0x5d1d72)==_0x32c1b4;}}}async function _0xd27eb4(){let _0x29e2d8=!0x0;try{const [_0x1c4a02,_0x1f0abf,_0x4bd8b8]=_0x542aaf['split']('.');return _0x3750eb(_0x1c4a02),await _0x2ef7b1(_0x1c4a02,_0x1f0abf,_0x4bd8b8),_0x29e2d8;}catch{return!0x1;}function _0x3750eb(_0x422774){const _0x376e8c=_0x2af3b4(_0x422774);_0x376e8c&&'ES256'==_0x376e8c['alg']||(_0x29e2d8=!0x1);}async function _0x2ef7b1(_0x7b02ac,_0x1ba184,_0x12d173){const _0x41c1db=window['Uint8Array']['from'](_0x680a01(_0x12d173),_0x257fe1=>_0x257fe1['charCodeAt'](0x0)),_0x58c5af=new window['TextEncoder']()['encode'](_0x7b02ac+'.'+_0x1ba184),_0x5d13b8=window['crypto']['subtle'];if(!_0x5d13b8)return;const _0x3bd2e7=await _0x5d13b8['importKey']('jwk',_0x58a281,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x5d13b8['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3bd2e7,_0x41c1db,_0x58c5af)||(_0x29e2d8=!0x1);}}function _0x2af3b4(_0x45580d){return _0x45580d['startsWith']('ey')?JSON['parse'](_0x680a01(_0x45580d)):null;}function _0x680a01(_0x4dcdfd){return window['atob'](_0x4dcdfd['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x4619cb(_0x33da93){let _0x555b44=0x1505;function _0x547dc0(_0x18dd7e){for(let _0x5bc738=0x0;_0x5bc738<_0x18dd7e['length'];_0x5bc738++){const _0x56cc2d=_0x18dd7e['charCodeAt'](_0x5bc738);_0x555b44=(_0x555b44<<0x5)+_0x555b44+_0x56cc2d,_0x555b44&=_0x555b44;}}function _0xb221ae(_0xe3192f){Array['isArray'](_0xe3192f)?_0xe3192f['forEach'](_0xb221ae):_0xe3192f&&'object'==typeof _0xe3192f?Object['entries'](_0xe3192f)['sort']()['forEach'](([_0x3caa1c,_0x53fb02])=>{_0x547dc0(_0x3caa1c),_0xb221ae(_0x53fb02);}):_0x547dc0(window['String'](_0xe3192f));}return _0xb221ae(_0x33da93),_0x555b44>>>0x0;}function _0x28d4bc(_0x4ca788){return _0x4ca788['toString'](0x10)['padStart'](0x8,'0');}function _0x51b6e6(_0x2f920a){return _0x2f920a['split']('')['reverse']()['join']('');}function _0x38a385(){}_0x5b8fb8(await _0x284c0e());}_0x2ab53d(_0x3e9a90['editor']);}(this);}_announceCaseChangeOperation(_0x278c29){const {ui:_0x2142a6,locale:_0x2024e7}=this['editor'],_0x29d4f9=m(_0x2024e7)['find'](_0x1ecf66=>_0x1ecf66['commandName']===_0x278c29)['label']['toLowerCase']();_0x2142a6['ariaLiveAnnouncer']['announce'](w(_0x2024e7,'Changed\x20case\x20to\x20%0',_0x29d4f9));}};function m(_0x3fef9c){return[{'label':w(_0x3fef9c,'UPPERCASE'),'commandName':'changeCaseUpper'},{'label':w(_0x3fef9c,'lowercase'),'commandName':'changeCaseLower'},{'label':w(_0x3fef9c,'Title\x20Case'),'commandName':'changeCaseTitle'}];}var C=class extends _0x5ed300{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CaseChangeUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x1c745=this['editor'];this['_registerComponents'](),_0x1c745['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':w(_0x1c745['locale'],'Change\x20text\x20case'),'keystroke':'Shift+f3','mayRequireFn':!0x0}]}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x3ad99b=[this['editor']];for(const _0x44b41a of _0x3ad99b){let _0x559695;for(const _0x288c59 in _0x44b41a){const _0x275181=_0x288c59,_0x299241=_0x44b41a[_0x275181];if('caseChangeLicenseKeyValid'==_0x299241||'caseChangeLicenseKeyInvalid'==_0x299241||'caseChangeLicenseKeyExpired'==_0x299241||'caseChangeLicenseKeyDomainLimit'==_0x299241||'caseChangeLicenseKeyNotAllowed'==_0x299241||'caseChangeLicenseKeyEvaluationLimit'==_0x299241||'caseChangeLicenseKeyUsageLimit'==_0x299241){delete _0x44b41a[_0x275181],_0x559695=_0x299241,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'caseChangeLicenseKeyInvalid'==_0x559695&&_0x44b41a['_showLicenseError']('invalid'),'caseChangeLicenseKeyExpired'==_0x559695&&_0x44b41a['_showLicenseError']('expired'),'caseChangeLicenseKeyDomainLimit'==_0x559695&&_0x44b41a['_showLicenseError']('domainLimit'),'caseChangeLicenseKeyNotAllowed'==_0x559695&&_0x44b41a['_showLicenseError']('featureNotAllowed','CaseChange'),'caseChangeLicenseKeyEvaluationLimit'==_0x559695&&_0x44b41a['_showLicenseError']('evaluationLimit'),'caseChangeLicenseKeyUsageLimit'==_0x559695&&_0x44b41a['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_registerComponents(){const _0x3979d0=this['editor'],{itemDefinitions:_0x1f35a7,commands:_0x5d53a3}=this['_getListItemDefinitionsAndCommands']();_0x3979d0['ui']['componentFactory']['add']('caseChange',()=>this['_createDropdownView'](_0x1f35a7,_0x5d53a3)),_0x3979d0['ui']['componentFactory']['add']('menuBar:caseChange',()=>this['_createMenuBarMenuView'](_0x1f35a7,_0x5d53a3));}_createMenuBarMenuView(_0x3f17da,_0x128780){const _0x260d20=this['editor'],_0x3502c8=_0x260d20['locale'],_0x480a68=new _0x2b02ae(_0x3502c8),_0x5c3624=new _0x5a1f4a(_0x3502c8);_0x5c3624['set']({'ariaLabel':w(_0x3502c8,'Case\x20change'),'role':'menu'}),this['_setButtonProperties'](_0x480a68['buttonView']),_0x480a68['bind']('isEnabled')['toMany'](_0x128780,'isEnabled',(..._0x4975b1)=>_0x4975b1['some'](_0x434d29=>_0x434d29));for(const _0x1fb38d of _0x3f17da){const _0x347685=new _0x17b795(_0x3502c8,_0x480a68),_0x48c1a0=new _0x16a902(_0x3502c8);_0x48c1a0['delegate']('execute')['to'](_0x480a68),_0x48c1a0['bind'](...Object['keys'](_0x1fb38d['model']))['to'](_0x1fb38d['model']),_0x48c1a0['on']('execute',()=>{_0x260d20['execute'](_0x1fb38d['model']['commandName']),_0x260d20['editing']['view']['focus']();}),_0x347685['children']['add'](_0x48c1a0),_0x5c3624['items']['add'](_0x347685);}return _0x480a68['panelView']['children']['add'](_0x5c3624),_0x480a68;}_createDropdownView(_0x53e5d9,_0x4d7f0e){const _0x215d1f=this['editor'],_0x1e0aa6=_0x528cc7(_0x215d1f['locale']);return this['_setButtonProperties'](_0x1e0aa6['buttonView']),_0x1e0aa6['buttonView']['set']({'tooltip':!0x0}),_0x1e0aa6['extendTemplate']({'attributes':{'class':['ck-case-change-dropdown']}}),_0x752eb(_0x1e0aa6,_0x53e5d9,{'ariaLabel':w(_0x215d1f['locale'],'Case\x20change'),'role':'menu'}),_0x1e0aa6['bind']('isEnabled')['toMany'](_0x4d7f0e,'isEnabled',(..._0x1d02d0)=>_0x1d02d0['some'](_0x19e59f=>_0x19e59f)),this['listenTo'](_0x1e0aa6,'execute',_0x31bdea=>{_0x215d1f['execute'](_0x31bdea['source']['commandName']),_0x215d1f['editing']['view']['focus']();}),_0x1e0aa6;}_setButtonProperties(_0x2ba3d6){const _0x56fecf=this['editor'];_0x2ba3d6['set']({'label':w(_0x56fecf['locale'],'Case\x20change'),'icon':_0x3de04b,'keystroke':'Shift+F3'});}_getListItemDefinitionsAndCommands(){const _0x4bd38f=new _0x2ea394(),_0x47f685=[];for(const _0x1c94f of m(this['editor']['locale'])){const _0x4b310c=this['editor']['commands']['get'](_0x1c94f['commandName']),_0x5c3279=new _0x521a8b({'commandName':_0x1c94f['commandName'],'label':_0x1c94f['label'],'role':'menuitemradio','withText':!0x0});_0x5c3279['bind']('isEnabled')['to'](_0x4b310c,'isEnabled'),_0x4bd38f['add']({'type':'button','model':_0x5c3279}),_0x47f685['push'](_0x4b310c);}return{'itemDefinitions':_0x4bd38f,'commands':_0x47f685};}},y=class extends _0x5ed300{static get requires(){return[g,C];}static get['pluginName'](){return'CaseChange';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{y as CaseChange,h as CaseChangeCommand,g as CaseChangeEditing,C as CaseChangeUI};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-case-change",
|
|
3
|
-
"version": "48.5.0-alpha.
|
|
3
|
+
"version": "48.5.0-alpha.3",
|
|
4
4
|
"description": "Case change feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"./package.json": "./package.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@ckeditor/ckeditor5-core": "48.5.0-alpha.
|
|
40
|
-
"@ckeditor/ckeditor5-engine": "48.5.0-alpha.
|
|
41
|
-
"@ckeditor/ckeditor5-icons": "48.5.0-alpha.
|
|
42
|
-
"@ckeditor/ckeditor5-ui": "48.5.0-alpha.
|
|
43
|
-
"@ckeditor/ckeditor5-utils": "48.5.0-alpha.
|
|
39
|
+
"@ckeditor/ckeditor5-core": "48.5.0-alpha.3",
|
|
40
|
+
"@ckeditor/ckeditor5-engine": "48.5.0-alpha.3",
|
|
41
|
+
"@ckeditor/ckeditor5-icons": "48.5.0-alpha.3",
|
|
42
|
+
"@ckeditor/ckeditor5-ui": "48.5.0-alpha.3",
|
|
43
|
+
"@ckeditor/ckeditor5-utils": "48.5.0-alpha.3"
|
|
44
44
|
},
|
|
45
45
|
"files": [
|
|
46
46
|
"dist",
|