@ckbox/i18n 1.4.1-rc.0 → 1.5.0-rc.0
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/README.md +3 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Using a build served from the CDN is the simplest and fastest way of embedding C
|
|
|
12
12
|
To start using CKBox on your website, embed the following `script` element in the HTML code of the page:
|
|
13
13
|
|
|
14
14
|
```html
|
|
15
|
-
<script src="https://cdn.ckbox.io/ckbox/1.
|
|
15
|
+
<script src="https://cdn.ckbox.io/ckbox/1.5.0-rc.0/ckbox.js"></script>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
Quick implementation example:
|
|
@@ -22,7 +22,7 @@ Quick implementation example:
|
|
|
22
22
|
<html>
|
|
23
23
|
<head>
|
|
24
24
|
<meta charset="UTF-8" />
|
|
25
|
-
<script src="https://cdn.ckbox.io/ckbox/1.
|
|
25
|
+
<script src="https://cdn.ckbox.io/ckbox/1.5.0-rc.0/ckbox.js"></script>
|
|
26
26
|
</head>
|
|
27
27
|
<body>
|
|
28
28
|
<div id="ckbox"></div>
|
|
@@ -48,7 +48,7 @@ The code snippet below presents the simplest scenario for integration of CKEdito
|
|
|
48
48
|
<head>
|
|
49
49
|
<meta charset="UTF-8" />
|
|
50
50
|
<script src="https://cdn.ckeditor.com/ckeditor5/36.0.0/classic/ckeditor.js"></script>
|
|
51
|
-
<script src="https://cdn.ckbox.io/ckbox/1.
|
|
51
|
+
<script src="https://cdn.ckbox.io/ckbox/1.5.0-rc.0/ckbox.js"></script>
|
|
52
52
|
</head>
|
|
53
53
|
<body>
|
|
54
54
|
<div id="editor"></div>
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
const _0x52c47c=_0x585f;(function(_0x4bb270,_0x17201a){const _0x442e17=_0x585f,_0x4e9dbb=_0x4bb270();while(!![]){try{const _0x4ad279=parseInt(_0x442e17(0x146))/0x1+parseInt(_0x442e17(0x13c))/0x2+parseInt(_0x442e17(0x14c))/0x3*(-parseInt(_0x442e17(0x134))/0x4)+parseInt(_0x442e17(0x150))/0x5+parseInt(_0x442e17(0x144))/0x6*(-parseInt(_0x442e17(0x14f))/0x7)+-parseInt(_0x442e17(0x151))/0x8+parseInt(_0x442e17(0x14a))/0x9;if(_0x4ad279===_0x17201a)break;else _0x4e9dbb['push'](_0x4e9dbb['shift']());}catch(_0x4d6e46){_0x4e9dbb['push'](_0x4e9dbb['shift']());}}}(_0x57de,0x365ef));import*as _0x5c4ca9 from'react';import{sprintf}from'sprintf-js';function _0x585f(_0x5a0f39,_0x251fbf){const _0x57de31=_0x57de();return _0x585f=function(_0x585fc4,_0x4cf816){_0x585fc4=_0x585fc4-0x132;let _0x37384f=_0x57de31[_0x585fc4];return _0x37384f;},_0x585f(_0x5a0f39,_0x251fbf);}function _0x57de(){const _0x2eba9d=['exec','1335273zfzLhW','map','\x22\x20is\x20not\x20supported.','2208850mdMHsr','1502315wZSoer','1392856zPQElt','_one','filter','getKey','push','PluralRules','charAt','tag','supportedLocalesOf','indexOf','length','text','_rules','4qwIybR','code','createElement','slice','Plural\x20rules\x20could\x20not\x20be\x20created.\x20Perhaps\x20`Intl.PluralRules`\x20is\x20not\x20supported?','log','values','includes','806810phPEyc','Provider','pluralUtils','isSupported','useContext','select','processTags','plural','6jDucsz','Fragment','153463BbwDaa','warn',']:\x20Translation\x20for\x20key\x20\x27','strong','2701080ZubyqG'];_0x57de=function(){return _0x2eba9d;};return _0x57de();}class Plural{constructor(_0x1a7ced){const _0x1b1d52=_0x585f;this['lang']=_0x1a7ced;try{this[_0x1b1d52(0x133)]=new Intl[(_0x1b1d52(0x156))](_0x1a7ced);}catch(_0x1f49b0){console[_0x1b1d52(0x147)](_0x1b1d52(0x138));}}[_0x52c47c(0x154)](_0x37b2ca,_0x36c791){const _0x9b0b63=_0x52c47c;if(!this[_0x9b0b63(0x133)])return _0x37b2ca+_0x9b0b63(0x152);const _0xbd00ef=this['_rules'][_0x9b0b63(0x141)](_0x36c791);return _0x37b2ca+'_'+_0xbd00ef;}}Plural['isSupported']=_0x2aa6ee=>{const _0x3a192a=_0x52c47c;try{return Intl['PluralRules'][_0x3a192a(0x159)]([_0x2aa6ee])[_0x3a192a(0x15b)]>0x0;}catch(_0x54fb6b){return![];}};const I18nContext=_0x5c4ca9['createContext']({'debug':![],'lang':'en','resources':{},'pluralUtils':new Plural('en')}),I18nProvider=({children:_0x6be902,debug:debug=![],lang:lang='en',resources:resources={}})=>{const _0x1f3243=_0x52c47c;return _0x5c4ca9['useEffect'](()=>{const _0x5a225e=_0x585f,_0x366f2b=Plural[_0x5a225e(0x13f)](lang);!_0x366f2b&&console['warn']('Plural\x20form\x20for\x20language\x20\x22'+lang+_0x5a225e(0x14e));},[lang]),_0x5c4ca9[_0x1f3243(0x136)](I18nContext[_0x1f3243(0x13d)],{'value':{'debug':debug,'lang':lang,'pluralUtils':new Plural(lang),'resources':resources}},_0x6be902);},TAG_REGEX=/<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ALLOWED_TAGS=['em',_0x52c47c(0x149),_0x52c47c(0x135)],getMsg=(_0x2c62e3,_0x502079={},_0xb8f2cc)=>{const _0x5882db=_0x52c47c,_0x515ed2=_0xb8f2cc[_0x5882db(0x143)];if(_0x502079[_0x2c62e3]&&_0x515ed2===undefined)return{'found':!![],'msg':_0x502079[_0x2c62e3]};const _0x1d9ab4=Object['keys'](_0x502079)[_0x5882db(0x153)](_0x298039=>_0x298039[_0x5882db(0x15a)](_0x2c62e3)===0x0);if(_0x1d9ab4['length']===0x0||_0x515ed2===undefined)return{'found':![],'msg':_0x2c62e3};const _0x3e3993=_0xb8f2cc[_0x5882db(0x13e)][_0x5882db(0x154)](_0x2c62e3,_0x515ed2);return{'found':!![],'msg':_0x502079[_0x3e3993]};},parseMsgTags=_0x3f629f=>{const _0x9d5ffe=_0x52c47c,_0x18be01=[];let _0x5c248e=0x0,_0xf9897a;while((_0xf9897a=TAG_REGEX[_0x9d5ffe(0x14b)](_0x3f629f))!==null){const _0x50fa7a=_0xf9897a[0x0],{index:_0x140982}=_0xf9897a,_0x258f77=_0x50fa7a[_0x9d5ffe(0x157)](0x1)==='/',_0x3023ff=_0x258f77?_0x50fa7a[_0x9d5ffe(0x137)](0x2,-0x1):_0x50fa7a[_0x9d5ffe(0x137)](0x1,-0x1),_0x72136=ALLOWED_TAGS[_0x9d5ffe(0x13b)](_0x3023ff);if(!_0x72136)continue;const _0xb84b1e=_0x3f629f[_0x9d5ffe(0x137)](_0x5c248e,_0x140982);if(!_0xb84b1e){_0x5c248e=_0x140982+_0x50fa7a[_0x9d5ffe(0x15b)];continue;}_0x258f77?_0x18be01[_0x9d5ffe(0x155)]({'type':_0x9d5ffe(0x158),'name':_0x50fa7a['slice'](0x2,-0x1),'content':_0xb84b1e}):_0x18be01[_0x9d5ffe(0x155)]({'type':_0x9d5ffe(0x132),'content':_0xb84b1e}),_0x5c248e=_0x140982+_0x50fa7a[_0x9d5ffe(0x15b)];}return _0x5c248e<_0x3f629f[_0x9d5ffe(0x15b)]&&_0x18be01[_0x9d5ffe(0x155)]({'type':_0x9d5ffe(0x132),'content':_0x3f629f['slice'](_0x5c248e)}),_0x18be01;};function formatMsgWithTags(_0x7d0a1e){const _0xe23808=_0x52c47c,_0x3b3b67=parseMsgTags(_0x7d0a1e),_0x2beeeb=_0x3b3b67[_0xe23808(0x14d)](({content:_0x1eeffd,type:_0x1b0eb0,name:_0x208c1c},_0x5a85bd)=>{const _0x19ded7=_0xe23808,_0x30f711=_0x1b0eb0!==_0x19ded7(0x132)&&_0x208c1c?_0x208c1c:_0x5c4ca9[_0x19ded7(0x145)];return _0x5c4ca9[_0x19ded7(0x136)](_0x30f711,{'key':''+_0x5a85bd},_0x1eeffd);});return _0x2beeeb;}function formatMsg(_0x49f74c,_0x223728,_0x11ab6a){const _0x33cd27=sprintf(_0x49f74c,..._0x223728!==null&&_0x223728!==void 0x0?_0x223728:[]);if(!_0x11ab6a)return _0x33cd27;return formatMsgWithTags(_0x33cd27);}const useTranslation=()=>{const _0x5929c1=_0x52c47c,{lang:_0x3434c0,debug:_0xbb91e6,pluralUtils:_0x3a5d62,resources:_0x487a43}=_0x5c4ca9[_0x5929c1(0x140)](I18nContext);function _0x46197f(_0x5da34c,_0xb4f98b){const _0x17c421=_0x5929c1,{found:_0xebe959,msg:_0x2b30d4}=getMsg(_0x5da34c,_0x487a43[_0x3434c0],{'plural':_0xb4f98b===null||_0xb4f98b===void 0x0?void 0x0:_0xb4f98b['plural'],'pluralUtils':_0x3a5d62});_0xbb91e6&&!_0xebe959&&console[_0x17c421(0x139)]('['+_0x3434c0+_0x17c421(0x148)+_0x5da34c+'\x27\x20is\x20missing.');if(_0xb4f98b===null||_0xb4f98b===void 0x0?void 0x0:_0xb4f98b[_0x17c421(0x142)])return formatMsg(_0x2b30d4,_0xb4f98b===null||_0xb4f98b===void 0x0?void 0x0:_0xb4f98b['values'],!![]);return formatMsg(_0x2b30d4,_0xb4f98b===null||_0xb4f98b===void 0x0?void 0x0:_0xb4f98b[_0x17c421(0x13a)],![]);}return{'t':_0x46197f,'lang':_0x3434c0};};export{I18nContext,I18nProvider,useTranslation};
|