@ckbox/i18n 1.5.0 → 1.5.1
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.5.
|
|
15
|
+
<script src="https://cdn.ckbox.io/ckbox/1.5.1/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.5.
|
|
25
|
+
<script src="https://cdn.ckbox.io/ckbox/1.5.1/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.5.
|
|
51
|
+
<script src="https://cdn.ckbox.io/ckbox/1.5.1/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
|
-
const
|
|
4
|
+
const _0x58750e=_0x2381;(function(_0x5adb16,_0x330aeb){const _0x2f2d2e=_0x2381,_0x5da6bc=_0x5adb16();while(!![]){try{const _0x365708=parseInt(_0x2f2d2e(0x10a))/0x1*(-parseInt(_0x2f2d2e(0x108))/0x2)+-parseInt(_0x2f2d2e(0x106))/0x3*(-parseInt(_0x2f2d2e(0x111))/0x4)+parseInt(_0x2f2d2e(0x113))/0x5+-parseInt(_0x2f2d2e(0x107))/0x6+-parseInt(_0x2f2d2e(0x118))/0x7+-parseInt(_0x2f2d2e(0x114))/0x8*(parseInt(_0x2f2d2e(0x124))/0x9)+parseInt(_0x2f2d2e(0x116))/0xa;if(_0x365708===_0x330aeb)break;else _0x5da6bc['push'](_0x5da6bc['shift']());}catch(_0x196d12){_0x5da6bc['push'](_0x5da6bc['shift']());}}}(_0x435b,0x2c316));import*as _0x2e3c80 from'react';import{sprintf}from'sprintf-js';class Plural{constructor(_0x10365a){const _0x3ec9a5=_0x2381;this[_0x3ec9a5(0x10e)]=_0x10365a;try{this[_0x3ec9a5(0x117)]=new Intl['PluralRules'](_0x10365a);}catch(_0x5d5215){console[_0x3ec9a5(0x12b)]('Plural\x20rules\x20could\x20not\x20be\x20created.\x20Perhaps\x20`Intl.PluralRules`\x20is\x20not\x20supported?');}}[_0x58750e(0x126)](_0x519aa4,_0x862f98){const _0x45c2b8=_0x58750e;if(!this[_0x45c2b8(0x117)])return _0x519aa4+_0x45c2b8(0x10f);const _0x5e1e9=this[_0x45c2b8(0x117)][_0x45c2b8(0x123)](_0x862f98);return _0x519aa4+'_'+_0x5e1e9;}}function _0x2381(_0x25f9fd,_0x582791){const _0x435b97=_0x435b();return _0x2381=function(_0x238198,_0x4def36){_0x238198=_0x238198-0x104;let _0x460438=_0x435b97[_0x238198];return _0x460438;},_0x2381(_0x25f9fd,_0x582791);}Plural[_0x58750e(0x104)]=_0x389cce=>{const _0x480fda=_0x58750e;try{return Intl[_0x480fda(0x109)][_0x480fda(0x120)]([_0x389cce])[_0x480fda(0x12f)]>0x0;}catch(_0x6b842a){return![];}};const I18nContext=_0x2e3c80[_0x58750e(0x11d)]({'debug':![],'lang':'en','resources':{},'pluralUtils':new Plural('en')}),I18nProvider=({children:_0x215807,debug:debug=![],lang:lang='en',resources:resources={}})=>{const _0x52ca19=_0x58750e;return _0x2e3c80[_0x52ca19(0x127)](()=>{const _0x1a7830=_0x52ca19,_0x2fd1a3=Plural[_0x1a7830(0x104)](lang);!_0x2fd1a3&&console[_0x1a7830(0x12b)](_0x1a7830(0x11a)+lang+_0x1a7830(0x121));},[lang]),_0x2e3c80[_0x52ca19(0x12d)](I18nContext[_0x52ca19(0x11f)],{'value':{'debug':debug,'lang':lang,'pluralUtils':new Plural(lang),'resources':resources}},_0x215807);},TAG_REGEX=/<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ALLOWED_TAGS=['em',_0x58750e(0x125),_0x58750e(0x12c)],getMsg=(_0x2442ab,_0x1ffd3a={},_0x5c2a7b)=>{const _0x5aee8f=_0x58750e,_0x159b87=_0x5c2a7b[_0x5aee8f(0x110)];if(_0x1ffd3a[_0x2442ab]&&_0x159b87===undefined)return{'found':!![],'msg':_0x1ffd3a[_0x2442ab]};const _0x37540f=Object[_0x5aee8f(0x10d)](_0x1ffd3a)[_0x5aee8f(0x119)](_0x200c96=>_0x200c96[_0x5aee8f(0x11b)](_0x2442ab)===0x0);if(_0x37540f[_0x5aee8f(0x12f)]===0x0||_0x159b87===undefined)return{'found':![],'msg':_0x2442ab};const _0x4c9769=_0x5c2a7b['pluralUtils'][_0x5aee8f(0x126)](_0x2442ab,_0x159b87);return{'found':!![],'msg':_0x1ffd3a[_0x4c9769]};},parseMsgTags=_0x4c7e15=>{const _0x308f29=_0x58750e,_0x2ad39e=[];let _0x3e4351=0x0,_0x1d9d32;while((_0x1d9d32=TAG_REGEX['exec'](_0x4c7e15))!==null){const _0xa1a35a=_0x1d9d32[0x0],{index:_0x86054}=_0x1d9d32,_0x5c9548=_0xa1a35a[_0x308f29(0x11e)](0x1)==='/',_0x399fc0=_0x5c9548?_0xa1a35a[_0x308f29(0x12a)](0x2,-0x1):_0xa1a35a[_0x308f29(0x12a)](0x1,-0x1),_0x550c2f=ALLOWED_TAGS[_0x308f29(0x11c)](_0x399fc0);if(!_0x550c2f)continue;const _0x5b307c=_0x4c7e15[_0x308f29(0x12a)](_0x3e4351,_0x86054);if(!_0x5b307c){_0x3e4351=_0x86054+_0xa1a35a['length'];continue;}_0x5c9548?_0x2ad39e[_0x308f29(0x112)]({'type':_0x308f29(0x128),'name':_0xa1a35a[_0x308f29(0x12a)](0x2,-0x1),'content':_0x5b307c}):_0x2ad39e[_0x308f29(0x112)]({'type':_0x308f29(0x10c),'content':_0x5b307c}),_0x3e4351=_0x86054+_0xa1a35a[_0x308f29(0x12f)];}return _0x3e4351<_0x4c7e15[_0x308f29(0x12f)]&&_0x2ad39e[_0x308f29(0x112)]({'type':_0x308f29(0x10c),'content':_0x4c7e15['slice'](_0x3e4351)}),_0x2ad39e;};function formatMsgWithTags(_0x2a574c){const _0x44c4c1=_0x58750e,_0x3cf996=parseMsgTags(_0x2a574c),_0x278ca3=_0x3cf996[_0x44c4c1(0x129)](({content:_0x481670,type:_0x1a5627,name:_0x95ff01},_0x124975)=>{const _0x172ee5=_0x44c4c1,_0x4dde0c=_0x1a5627!==_0x172ee5(0x10c)&&_0x95ff01?_0x95ff01:_0x2e3c80['Fragment'];return _0x2e3c80[_0x172ee5(0x12d)](_0x4dde0c,{'key':''+_0x124975},_0x481670);});return _0x278ca3;}function formatMsg(_0x2a931f,_0x519dc7,_0x981dd){const _0x505cfc=sprintf(_0x2a931f,..._0x519dc7!==null&&_0x519dc7!==void 0x0?_0x519dc7:[]);if(!_0x981dd)return _0x505cfc;return formatMsgWithTags(_0x505cfc);}const useTranslation=()=>{const _0x3dbbdc=_0x58750e,{lang:_0x112220,debug:_0x5947ce,pluralUtils:_0x15eb1a,resources:_0x536a65}=_0x2e3c80[_0x3dbbdc(0x115)](I18nContext);function _0x138c4a(_0x41021c,_0x252bd7){const _0x352caf=_0x3dbbdc,{found:_0x270d52,msg:_0x28050f}=getMsg(_0x41021c,_0x536a65[_0x112220],{'plural':_0x252bd7===null||_0x252bd7===void 0x0?void 0x0:_0x252bd7[_0x352caf(0x110)],'pluralUtils':_0x15eb1a});_0x5947ce&&!_0x270d52&&console[_0x352caf(0x105)]('['+_0x112220+_0x352caf(0x12e)+_0x41021c+'\x27\x20is\x20missing.');if(_0x252bd7===null||_0x252bd7===void 0x0?void 0x0:_0x252bd7[_0x352caf(0x122)])return formatMsg(_0x28050f,_0x252bd7===null||_0x252bd7===void 0x0?void 0x0:_0x252bd7[_0x352caf(0x10b)],!![]);return formatMsg(_0x28050f,_0x252bd7===null||_0x252bd7===void 0x0?void 0x0:_0x252bd7['values'],![]);}return{'t':_0x138c4a,'lang':_0x112220};};function _0x435b(){const _0x4413df=['\x22\x20is\x20not\x20supported.','processTags','select','306WzaLPl','strong','getKey','useEffect','tag','map','slice','warn','code','createElement',']:\x20Translation\x20for\x20key\x20\x27','length','isSupported','log','16353uxGZHb','50712jBLpCU','337462mXmGyb','PluralRules','1GHsFpq','values','text','keys','lang','_one','plural','76yBhjDg','push','35420AmQGqr','40840KcESIA','useContext','5931470PlhSir','_rules','1204231VRsboA','filter','Plural\x20form\x20for\x20language\x20\x22','indexOf','includes','createContext','charAt','Provider','supportedLocalesOf'];_0x435b=function(){return _0x4413df;};return _0x435b();}export{I18nContext,I18nProvider,useTranslation};
|