vue-intlayer 8.6.2 → 8.6.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/{ContentSelector-U91_pPOg.mjs → ContentSelector-CJ8wOzKS.mjs} +6 -7
- package/dist/ContentSelector-dPyETnBt.js +1 -0
- package/dist/cjs/client/index.cjs +1 -1
- package/dist/cjs/client/installIntlayer.cjs +1 -1
- package/dist/cjs/client/useDictionary.cjs +1 -1
- package/dist/cjs/client/useDictionaryAsync.cjs +1 -1
- package/dist/cjs/client/useIntlayer.cjs +1 -1
- package/dist/cjs/client/useLocale.cjs +1 -1
- package/dist/cjs/editor/ContentSelector.cjs +1 -1
- package/dist/cjs/editor/useEditor.cjs +1 -1
- package/dist/cjs/format/useCompact.cjs +1 -1
- package/dist/cjs/format/useCurrency.cjs +1 -1
- package/dist/cjs/format/useDate.cjs +1 -1
- package/dist/cjs/format/useIntl.cjs +1 -1
- package/dist/cjs/format/useList.cjs +1 -1
- package/dist/cjs/format/useNumber.cjs +1 -1
- package/dist/cjs/format/usePercentage.cjs +1 -1
- package/dist/cjs/format/useRelativeTime.cjs +1 -1
- package/dist/cjs/format/useUnit.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/plugins.cjs +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/client/installIntlayer.mjs +1 -1
- package/dist/esm/client/useDictionary.mjs +1 -1
- package/dist/esm/client/useDictionaryAsync.mjs +1 -1
- package/dist/esm/client/useIntlayer.mjs +1 -1
- package/dist/esm/client/useLocale.mjs +1 -1
- package/dist/esm/editor/ContentSelector.mjs +1 -1
- package/dist/esm/editor/useEditor.mjs +1 -1
- package/dist/esm/format/useCompact.mjs +1 -1
- package/dist/esm/format/useCurrency.mjs +1 -1
- package/dist/esm/format/useDate.mjs +1 -1
- package/dist/esm/format/useIntl.mjs +1 -1
- package/dist/esm/format/useList.mjs +1 -1
- package/dist/esm/format/useNumber.mjs +1 -1
- package/dist/esm/format/usePercentage.mjs +1 -1
- package/dist/esm/format/useRelativeTime.mjs +1 -1
- package/dist/esm/format/useUnit.mjs +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/plugins.mjs +14 -14
- package/dist/installIntlayer-Dwe3JTYs.js +1 -0
- package/dist/{installIntlayer-rcVGPCOC.mjs → installIntlayer-zWEMgu8l.mjs} +16 -16
- package/package.json +7 -7
- package/dist/ContentSelector-BbioElre.js +0 -1
- package/dist/installIntlayer--7CKNT7l.js +0 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { defineComponent as e, h as t } from "vue";
|
|
2
2
|
import { isEnabled as n } from "@intlayer/editor/isEnabled";
|
|
3
|
-
//#
|
|
4
|
-
|
|
5
|
-
var r = e({
|
|
3
|
+
//#region src/editor/ContentSelector.vue?vue&type=script&lang.ts
|
|
4
|
+
var r = process.env.INTLAYER_EDITOR_ENABLED === "false", i = e({
|
|
6
5
|
name: "ContentSelector",
|
|
7
6
|
props: {
|
|
8
7
|
dictionaryKey: {
|
|
@@ -14,12 +13,12 @@ var r = e({
|
|
|
14
13
|
required: !0
|
|
15
14
|
}
|
|
16
15
|
},
|
|
17
|
-
setup(e, { slots:
|
|
18
|
-
return () => n ? t("intlayer-content-selector-wrapper", {
|
|
16
|
+
setup(e, { slots: i }) {
|
|
17
|
+
return () => r || !n ? i.default?.() : t("intlayer-content-selector-wrapper", {
|
|
19
18
|
"key-path": JSON.stringify(e.keyPath),
|
|
20
19
|
"dictionary-key": e.dictionaryKey
|
|
21
|
-
},
|
|
20
|
+
}, i.default?.());
|
|
22
21
|
}
|
|
23
22
|
});
|
|
24
23
|
//#endregion
|
|
25
|
-
export {
|
|
24
|
+
export { i as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./chunk-C91j1N6u.js`);let e=require(`vue`),t=require(`@intlayer/editor/isEnabled`);var n=process.env.INTLAYER_EDITOR_ENABLED===`false`,r=(0,e.defineComponent)({name:`ContentSelector`,props:{dictionaryKey:{type:String,required:!0},keyPath:{type:Array,required:!0}},setup(r,{slots:i}){return()=>n||!t.isEnabled?i.default?.():(0,e.h)(`intlayer-content-selector-wrapper`,{"key-path":JSON.stringify(r.keyPath),"dictionary-key":r.dictionaryKey},i.default?.())}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-Dwe3JTYs.js`),t=require(`./useDictionary.cjs`),n=require(`./useDictionaryAsync.cjs`),r=require(`./useDictionaryDynamic.cjs`),i=require(`./useIntlayer.cjs`),a=require(`./useLoadDynamic.cjs`),o=require(`./useLocale.cjs`),s=require(`./useRewriteURL.cjs`);exports.INTLAYER_SYMBOL=e.t,exports.atPath=t.atPath,exports.createIntlayerClient=e.n,exports.createIntlayerLeafProxy=t.createIntlayerLeafProxy,exports.installIntlayer=e.r,exports.intlayer=e.i,exports.isComponentLike=t.isComponentLike,exports.isIntlayerNode=t.isIntlayerNode,exports.isObjectLike=t.isObjectLike,exports.toComponent=t.toComponent,exports.useDictionary=t.useDictionary,exports.useDictionaryAsync=n.useDictionaryAsync,exports.useDictionaryDynamic=r.useDictionaryDynamic,exports.useIntlayer=i.useIntlayer,exports.useLoadDynamic=a.useLoadDynamic,exports.useLocale=o.useLocale,exports.useRewriteURL=s.useRewriteURL;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-Dwe3JTYs.js`);exports.INTLAYER_SYMBOL=e.t,exports.createIntlayerClient=e.n,exports.installIntlayer=e.r,exports.intlayer=e.i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-C91j1N6u.js`),t=require(`../getDictionary.cjs`),n=require(`../../installIntlayer
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-C91j1N6u.js`),t=require(`../getDictionary.cjs`),n=require(`../../installIntlayer-Dwe3JTYs.js`);let r=require(`@intlayer/config/built`);r=e.t(r);let i=require(`vue`);var a=(e,t)=>t.reduce((e,t)=>e?.[t],e),o=e=>typeof e==`object`&&!!e,s=e=>typeof e==`function`||o(e)&&(`render`in e||`setup`in e),c=e=>e!=null&&(typeof e==`object`||typeof e==`function`)&&`__update`in e&&`render`in e&&`raw`in e,l=e=>(0,i.markRaw)((0,i.defineComponent)({name:`IntlayerLeaf`,setup(){return()=>{let t=e();return t==null?null:s(t)?(0,i.h)(t):Array.isArray(t)?(0,i.h)(`span`,t):t}}})),u=e=>new Proxy({},{get(t,n){let r=e.value;if(n===`__v_isRef`)return!0;if(n===`value`)return r??``;if(n===`$raw`)return e;if(n===`__v_skip`)return!0;if(n===`c`||n===`asComponent`)return l(()=>e.value);if(r==null)return n===Symbol.toPrimitive||n===`toString`?()=>``:void 0;let i=r[n];return typeof i==`function`?i.bind(r):i},ownKeys(){let t=e.value;return typeof t==`object`&&t?Reflect.ownKeys(t):[]},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}}),d=(e,d)=>{let f=(0,i.getCurrentInstance)()?(0,i.inject)(n.t):void 0,p=(0,i.isRef)(f?.locale)?f.locale:(0,i.ref)(f?.locale??r.default.internationalization.defaultLocale),m=(0,i.computed)(()=>(d===void 0?void 0:(0,i.toValue)(d))??p.value),h=(0,i.shallowRef)({});(0,i.watch)([()=>(0,i.toValue)(e),()=>m.value],([e,n])=>{h.value=t.getDictionary(e,n)},{immediate:!0,flush:`sync`});let g=e=>new Proxy({},{get(t,n,r){if(n===`__v_isRef`)return!0;let d=(0,i.computed)(()=>a(h.value,e));if(n===`value`)return d.value??``;if(n===`then`)return;if(n===`c`||n===`asComponent`)return l(()=>d.value);if(n===`$raw`)return d;if(n===Symbol.toPrimitive)return()=>d.value;let f=e.concat(n),p=a(h.value,f);if(p===void 0||o(p)&&!s(p))return g(f);if(c(p))return u((0,i.computed)(()=>a(h.value,f)));let m=(0,i.computed)(()=>a(h.value,f));return new Proxy(m,{get(e,t,n){return t===`value`?e.value??``:Reflect.get(e,t,n)}})},ownKeys(){let t=a(h.value,e);return o(t)?Reflect.ownKeys(t):[]},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return g([])};exports.atPath=a,exports.createIntlayerLeafProxy=u,exports.isComponentLike=s,exports.isIntlayerNode=c,exports.isObjectLike=o,exports.toComponent=l,exports.useDictionary=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-C91j1N6u.js`),t=require(`../../installIntlayer
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-C91j1N6u.js`),t=require(`../../installIntlayer-Dwe3JTYs.js`),n=require(`./useDictionary.cjs`);let r=require(`@intlayer/config/built`);r=e.t(r);let i=require(`vue`);var a=async(e,a)=>{let o=(0,i.inject)(t.t),s=(0,i.computed)(()=>a??o?.locale?.value??r.default?.internationalization.defaultLocale),c=(0,i.ref)(await e[s.value]?.());return(0,i.watch)(()=>s.value,async t=>{let n=await e[t]?.();n&&(c.value=n)}),n.useDictionary(c,s)};exports.useDictionaryAsync=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-C91j1N6u.js`),t=require(`../getIntlayer.cjs`),n=require(`../../installIntlayer
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-C91j1N6u.js`),t=require(`../getIntlayer.cjs`),n=require(`../../installIntlayer-Dwe3JTYs.js`),r=require(`./useDictionary.cjs`);let i=require(`@intlayer/config/built`);i=e.t(i);let a=require(`vue`);var o=(e,o)=>{let s=(0,a.inject)(n.t),c=(0,a.isRef)(s?.locale)?s.locale:(0,a.ref)(s?.locale??i.default.internationalization.defaultLocale),l=(0,a.computed)(()=>(o===void 0?void 0:(0,a.toValue)(o))??c.value),u=(0,a.shallowRef)({});(0,a.watch)([()=>(0,a.toValue)(e),()=>l.value],([e,n])=>{u.value=t.getIntlayer(e,n)},{immediate:!0,flush:`sync`});let d=new Map,f=e=>{let t=e.join(`.`);if(d.has(t))return d.get(t);let n=(0,a.computed)(()=>r.atPath(u.value,e)),i=new Proxy({},{get(t,i,o){if(typeof i==`symbol`||typeof i==`string`&&(i.startsWith(`__`)||i.startsWith(`$`)))return i===`__v_isRef`?!0:i===`then`?void 0:Reflect.get(t,i,o);if(i===`value`)return n.value??``;if(i===`c`||i===`asComponent`)return r.toComponent(()=>n.value);if(i===`$raw`)return n;if(i===Symbol.toPrimitive)return()=>String(n.value??``);let s=e.concat(i),c=r.atPath(u.value,s);if(c===void 0||r.isObjectLike(c)&&!r.isComponentLike(c))return f(s);if(r.isIntlayerNode(c))return r.createIntlayerLeafProxy((0,a.computed)(()=>r.atPath(u.value,s)));let l=(0,a.computed)(()=>r.atPath(u.value,s));return new Proxy(l,{get(e,t,n){return t===`value`?e.value??``:t===`__v_isRef`?!0:Reflect.get(e,t,n)}})},ownKeys(){let t=r.atPath(u.value,e);return r.isObjectLike(t)?Reflect.ownKeys(t):[]},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return d.set(t,i),i};return f([])};exports.useIntlayer=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-C91j1N6u.js`),t=require(`../../installIntlayer
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-C91j1N6u.js`),t=require(`../../installIntlayer-Dwe3JTYs.js`),n=require(`./useLocaleStorage.cjs`);let r=require(`@intlayer/config/built`);r=e.t(r);let i=require(`vue`);var a=({isCookieEnabled:e,onLocaleChange:a}={})=>{let{defaultLocale:o,locales:s}=r.default?.internationalization??{},c=(0,i.inject)(t.t);return{locale:(0,i.computed)(()=>c?.locale?.value??o),defaultLocale:o,availableLocales:s,setLocale:t=>{if(!s?.map(String).includes(t)){console.error(`Locale ${t} is not available`);return}c&&c.setLocale(t),n.setLocaleInStorage(t,e??c?.isCookieEnabled??!0),a?.(t)}}};exports.useLocale=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../ContentSelector-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../ContentSelector-dPyETnBt.js`);exports.default=e.t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../installIntlayer-Dwe3JTYs.js`);exports.useEditor=e.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-Dwe3JTYs.js`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.t);return(0,t.computed)(()=>{let e=r.locale.value;return(...t)=>(0,n.compact)(t[0],{...t[1],locale:t[1]?.locale??e})})};exports.useCompact=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-Dwe3JTYs.js`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.t);return(0,t.computed)(()=>{let e=r.locale.value;return(...t)=>(0,n.currency)(t[0],{...t[1],locale:t[1]?.locale??e})})};exports.useCurrency=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-Dwe3JTYs.js`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.t);return(0,t.computed)(()=>{let e=r.locale.value;return(...t)=>{let r=typeof t[1]==`string`?{...n.presets[t[1]],locale:e}:{...t[1],locale:t[1]?.locale??e};return(0,n.date)(t[0],r)}})};exports.useDate=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-Dwe3JTYs.js`);let t=require(`vue`),n=require(`@intlayer/core/utils`);var r=r=>{let i=(0,t.inject)(e.t);return(0,t.computed)(()=>(0,n.bindIntl)(r??i.locale.value))};exports.useIntl=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-Dwe3JTYs.js`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.t);return(0,t.computed)(()=>{let e=r.locale.value;return(...t)=>(0,n.list)(t[0],{...t[1],locale:t[1]?.locale??e})})};exports.useList=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-Dwe3JTYs.js`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.t);return(0,t.computed)(()=>{let e=r.locale.value;return(...t)=>(0,n.number)(t[0],{...t[1],locale:t[1]?.locale??e})})};exports.useNumber=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-Dwe3JTYs.js`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.t);return(0,t.computed)(()=>{let e=r.locale.value;return(...t)=>(0,n.percentage)(t[0],{...t[1],locale:t[1]?.locale??e})})};exports.usePercentage=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-Dwe3JTYs.js`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.t);return(0,t.computed)(()=>{let e=r.locale.value;return(...t)=>(0,n.relativeTime)(t[0],t[1],{...t[2],locale:t[2]?.locale??e})})};exports.useRelativeTime=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-C91j1N6u.js`);const e=require(`../../installIntlayer-Dwe3JTYs.js`);let t=require(`vue`),n=require(`@intlayer/core/formatters`);var r=()=>{let r=(0,t.inject)(e.t);return(0,t.computed)(()=>{let e=r.locale.value;return(...t)=>(0,n.units)(t[0],{...t[1],locale:t[1]?.locale??e})})};exports.useUnit=r;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./plugins.cjs`),t=require(`./getDictionary.cjs`),n=require(`./getIntlayer.cjs`),r=require(`../installIntlayer
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./plugins.cjs`),t=require(`./getDictionary.cjs`),n=require(`./getIntlayer.cjs`),r=require(`../installIntlayer-Dwe3JTYs.js`),i=require(`./client/useDictionary.cjs`),a=require(`./client/useDictionaryAsync.cjs`),o=require(`./client/useDictionaryDynamic.cjs`),s=require(`./client/useIntlayer.cjs`),c=require(`./client/useLoadDynamic.cjs`),l=require(`./client/useLocale.cjs`),u=require(`./client/useRewriteURL.cjs`);require(`./client/index.cjs`),exports.INTLAYER_SYMBOL=r.t,exports.atPath=i.atPath,exports.createIntlayerClient=r.n,exports.createIntlayerLeafProxy=i.createIntlayerLeafProxy,exports.getDictionary=t.getDictionary,exports.getIntlayer=n.getIntlayer,exports.getPlugins=e.getPlugins,exports.htmlPlugin=e.htmlPlugin,exports.insertionPlugin=e.insertionPlugin,exports.installIntlayer=r.r,exports.intlayer=r.i,exports.intlayerNodePlugins=e.intlayerNodePlugins,exports.isComponentLike=i.isComponentLike,exports.isIntlayerNode=i.isIntlayerNode,exports.isObjectLike=i.isObjectLike,exports.markdownPlugin=e.markdownPlugin,exports.markdownStringPlugin=e.markdownStringPlugin,exports.toComponent=i.toComponent,exports.useDictionary=i.useDictionary,exports.useDictionaryAsync=a.useDictionaryAsync,exports.useDictionaryDynamic=o.useDictionaryDynamic,exports.useEditor=r.a,exports.useIntlayer=s.useIntlayer,exports.useLoadDynamic=c.useLoadDynamic,exports.useLocale=l.useLocale,exports.useRewriteURL=u.useRewriteURL;
|
package/dist/cjs/plugins.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../chunk-C91j1N6u.js`),t=require(`../ContentSelector-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../chunk-C91j1N6u.js`),t=require(`../ContentSelector-dPyETnBt.js`),n=require(`./html/HTMLRenderer.cjs`),r=require(`./markdown/installIntlayerMarkdown.cjs`),i=require(`./renderIntlayerNode.cjs`);let a=require(`@intlayer/core/interpreter`),o=require(`@intlayer/config/built`);o=e.t(o);let s=require(`@intlayer/core/markdown`),c=require(`@intlayer/types/nodeType`);c=e.t(c);let l=require(`vue`);var u=process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE===`false`,d=process.env.INTLAYER_NODE_TYPE_MARKDOWN===`false`,f=process.env.INTLAYER_NODE_TYPE_HTML===`false`,p=process.env.INTLAYER_NODE_TYPE_INSERTION===`false`,m=u?a.fallbackPlugin:{id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,{children:n,...r})=>{let a=e=>i.renderIntlayerNode({...r,value:e,children:o.default.editor.enabled?()=>(0,l.h)(t.t,{dictionaryKey:r.dictionaryKey,keyPath:r.keyPath},{default:()=>typeof e==`function`?e():e}):e}),s=a(n);if(typeof n!=`function`)return s;let c=(...e)=>a(n(...e));Object.setPrototypeOf(c,Object.getPrototypeOf(s));for(let e of Object.getOwnPropertyNames(s)){let t=Object.getOwnPropertyDescriptor(s,e);t&&Object.defineProperty(c,e,t)}for(let e of Object.getOwnPropertySymbols(s)){let t=Object.getOwnPropertyDescriptor(s,e);t&&Object.defineProperty(c,e,t)}return(0,l.markRaw)(c)}},h=(e,t)=>{let n=new Map,r={};for(let[e,i]of Object.entries(t))typeof i==`string`||typeof i==`number`?r[e]=i:(n.set(e,i),r[e]=`__VNODE_${e}__`);let i=(0,a.splitInsertionTemplate)(e,r);if(n.size>0){let e=[];if(i.isSimple){let t=i.parts,r=0;for(let[i]of n){let a=`__VNODE_${i}__`,o=t.indexOf(a);o!==-1&&(o>r&&e.push(t.substring(r,o)),e.push(n.get(i)),r=o+a.length)}return r<t.length&&e.push(t.substring(r)),(0,l.h)(l.Fragment,null,...e)}else return i.parts.forEach(t=>{if(typeof t==`string`){let r=t;for(let[t]of n){let i=`__VNODE_${t}__`,a=r.indexOf(i);a!==-1&&(a>0&&e.push(r.substring(0,a)),e.push(n.get(t)),r=r.substring(a+i.length))}r.length>0&&e.push(r)}else e.push(t)}),(0,l.h)(l.Fragment,null,...e)}return i.isSimple?i.parts:(0,l.h)(l.Fragment,null,i.parts)},g=p?a.fallbackPlugin:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===c.INSERTION,transform:(e,t,n)=>{let r=[...t.keyPath,{type:c.INSERTION}],i=e[c.INSERTION],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,n,r)=>{let i=r(e,{...n,children:e,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]});return e=>{let a=h(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]})}},_=d?a.fallbackPlugin:{id:`markdown-string-plugin`,canHandle:e=>typeof e==`string`,transform:(e,n,a)=>{let{plugins:o,...c}=n,u=a((0,s.getMarkdownMetadata)(e)??{},{plugins:[{id:`markdown-metadata-plugin`,canHandle:e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`||!e,transform:(t,n)=>i.renderIntlayerNode({...n,value:t,children:e})}],dictionaryKey:c.dictionaryKey,keyPath:[]}),d=a=>i.renderIntlayerNode({...n,value:e,children:()=>(0,l.h)(t.t,{dictionaryKey:c.dictionaryKey,keyPath:c.keyPath},{default:()=>{let{renderMarkdown:t,components:n}=r.useMarkdown();return t(e,void 0,{...n??{},...a??{}})}}),additionalProps:{metadata:u,use:e=>d(e)}});return d()}},v=d?a.fallbackPlugin:{id:`markdown-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===c.MARKDOWN,transform:(e,t,n)=>{let r=[...t.keyPath,{type:c.MARKDOWN}],i=e[c.MARKDOWN];return n(i,{...t,children:i,keyPath:r,plugins:[_,...t.plugins??[]]})}},y=f?a.fallbackPlugin:{id:`html-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===c.HTML,transform:(e,t)=>{let r=e[c.HTML];e.tags;let a=(e={})=>{let o=n.renderHTML(r,{components:e});return i.renderIntlayerNode({...t,value:r,children:o,additionalProps:{use:e=>a(e)}})};return a()}},b=(e,t=!0)=>[(0,a.translationPlugin)(e??o.default.internationalization.defaultLocale,t?o.default.internationalization.defaultLocale:void 0),a.enumerationPlugin,a.conditionPlugin,(0,a.nestedPlugin)(e??o.default.internationalization.defaultLocale),a.filePlugin,a.genderPlugin,m,g,v,y].filter(Boolean);exports.getPlugins=b,exports.htmlPlugin=y,exports.insertionPlugin=g,exports.intlayerNodePlugins=m,exports.markdownPlugin=v,exports.markdownStringPlugin=_;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "../../installIntlayer-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "../../installIntlayer-zWEMgu8l.mjs";
|
|
2
2
|
import { atPath as i, createIntlayerLeafProxy as a, isComponentLike as o, isIntlayerNode as s, isObjectLike as c, toComponent as l, useDictionary as u } from "./useDictionary.mjs";
|
|
3
3
|
import { useDictionaryAsync as d } from "./useDictionaryAsync.mjs";
|
|
4
4
|
import { useDictionaryDynamic as f } from "./useDictionaryDynamic.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e, n as t, r as n, t as r } from "../../installIntlayer-
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "../../installIntlayer-zWEMgu8l.mjs";
|
|
2
2
|
export { r as INTLAYER_SYMBOL, t as createIntlayerClient, n as installIntlayer, e as intlayer };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDictionary as e } from "../getDictionary.mjs";
|
|
2
|
-
import { t } from "../../installIntlayer-
|
|
2
|
+
import { t } from "../../installIntlayer-zWEMgu8l.mjs";
|
|
3
3
|
import n from "@intlayer/config/built";
|
|
4
4
|
import { computed as r, defineComponent as i, getCurrentInstance as a, h as o, inject as s, isRef as c, markRaw as l, ref as u, shallowRef as d, toValue as f, watch as p } from "vue";
|
|
5
5
|
//#region src/client/useDictionary.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-zWEMgu8l.mjs";
|
|
2
2
|
import { useDictionary as t } from "./useDictionary.mjs";
|
|
3
3
|
import n from "@intlayer/config/built";
|
|
4
4
|
import { computed as r, inject as i, ref as a, watch as o } from "vue";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getIntlayer as e } from "../getIntlayer.mjs";
|
|
2
|
-
import { t } from "../../installIntlayer-
|
|
2
|
+
import { t } from "../../installIntlayer-zWEMgu8l.mjs";
|
|
3
3
|
import { atPath as n, createIntlayerLeafProxy as r, isComponentLike as i, isIntlayerNode as a, isObjectLike as o, toComponent as s } from "./useDictionary.mjs";
|
|
4
4
|
import c from "@intlayer/config/built";
|
|
5
5
|
import { computed as l, inject as u, isRef as d, ref as f, shallowRef as p, toValue as m, watch as h } from "vue";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-zWEMgu8l.mjs";
|
|
2
2
|
import { setLocaleInStorage as t } from "./useLocaleStorage.mjs";
|
|
3
3
|
import n from "@intlayer/config/built";
|
|
4
4
|
import { computed as r, inject as i } from "vue";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../ContentSelector-
|
|
1
|
+
import { t as e } from "../../ContentSelector-CJ8wOzKS.mjs";
|
|
2
2
|
export { e as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e } from "../../installIntlayer-
|
|
1
|
+
import { a as e } from "../../installIntlayer-zWEMgu8l.mjs";
|
|
2
2
|
export { e as useEditor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-zWEMgu8l.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { compact as r } from "@intlayer/core/formatters";
|
|
4
4
|
//#region src/format/useCompact.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-zWEMgu8l.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { currency as r } from "@intlayer/core/formatters";
|
|
4
4
|
//#region src/format/useCurrency.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-zWEMgu8l.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { date as r, presets as i } from "@intlayer/core/formatters";
|
|
4
4
|
//#region src/format/useDate.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-zWEMgu8l.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { percentage as r } from "@intlayer/core/formatters";
|
|
4
4
|
//#region src/format/usePercentage.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../installIntlayer-
|
|
1
|
+
import { t as e } from "../../installIntlayer-zWEMgu8l.mjs";
|
|
2
2
|
import { computed as t, inject as n } from "vue";
|
|
3
3
|
import { relativeTime as r } from "@intlayer/core/formatters";
|
|
4
4
|
//#region src/format/useRelativeTime.ts
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getPlugins as e, htmlPlugin as t, insertionPlugin as n, intlayerNodePlugins as r, markdownPlugin as i, markdownStringPlugin as a } from "./plugins.mjs";
|
|
2
2
|
import { getDictionary as o } from "./getDictionary.mjs";
|
|
3
3
|
import { getIntlayer as s } from "./getIntlayer.mjs";
|
|
4
|
-
import { a as c, i as l, n as u, r as d, t as f } from "../installIntlayer-
|
|
4
|
+
import { a as c, i as l, n as u, r as d, t as f } from "../installIntlayer-zWEMgu8l.mjs";
|
|
5
5
|
import { atPath as p, createIntlayerLeafProxy as m, isComponentLike as h, isIntlayerNode as g, isObjectLike as _, toComponent as v, useDictionary as y } from "./client/useDictionary.mjs";
|
|
6
6
|
import { useDictionaryAsync as b } from "./client/useDictionaryAsync.mjs";
|
|
7
7
|
import { useDictionaryDynamic as x } from "./client/useDictionaryDynamic.mjs";
|
package/dist/esm/plugins.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../ContentSelector-
|
|
1
|
+
import { t as e } from "../ContentSelector-CJ8wOzKS.mjs";
|
|
2
2
|
import { renderHTML as t } from "./html/HTMLRenderer.mjs";
|
|
3
3
|
import { useMarkdown as n } from "./markdown/installIntlayerMarkdown.mjs";
|
|
4
4
|
import { renderIntlayerNode as r } from "./renderIntlayerNode.mjs";
|
|
@@ -8,7 +8,7 @@ import { getMarkdownMetadata as p } from "@intlayer/core/markdown";
|
|
|
8
8
|
import * as m from "@intlayer/types/nodeType";
|
|
9
9
|
import { Fragment as h, h as g, markRaw as _ } from "vue";
|
|
10
10
|
//#region src/plugins.ts
|
|
11
|
-
var v = process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE === "false" ? o : {
|
|
11
|
+
var v = process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE === "false", y = process.env.INTLAYER_NODE_TYPE_MARKDOWN === "false", b = process.env.INTLAYER_NODE_TYPE_HTML === "false", x = process.env.INTLAYER_NODE_TYPE_INSERTION === "false", S = v ? o : {
|
|
12
12
|
id: "intlayer-node-plugin",
|
|
13
13
|
canHandle: (e) => typeof e == "bigint" || typeof e == "string" || typeof e == "number",
|
|
14
14
|
transform: (t, { children: n, ...i }) => {
|
|
@@ -33,7 +33,7 @@ var v = process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE === "false" ? o : {
|
|
|
33
33
|
}
|
|
34
34
|
return _(s);
|
|
35
35
|
}
|
|
36
|
-
},
|
|
36
|
+
}, C = (e, t) => {
|
|
37
37
|
let n = /* @__PURE__ */ new Map(), r = {};
|
|
38
38
|
for (let [e, i] of Object.entries(t)) typeof i == "string" || typeof i == "number" ? r[e] = i : (n.set(e, i), r[e] = `__VNODE_${e}__`);
|
|
39
39
|
let i = u(e, r);
|
|
@@ -58,7 +58,7 @@ var v = process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE === "false" ? o : {
|
|
|
58
58
|
}), g(h, null, ...e);
|
|
59
59
|
}
|
|
60
60
|
return i.isSimple ? i.parts : g(h, null, i.parts);
|
|
61
|
-
},
|
|
61
|
+
}, w = x ? o : {
|
|
62
62
|
id: "insertion-plugin",
|
|
63
63
|
canHandle: (e) => typeof e == "object" && e?.nodeType === m.INSERTION,
|
|
64
64
|
transform: (e, t, n) => {
|
|
@@ -72,7 +72,7 @@ var v = process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE === "false" ? o : {
|
|
|
72
72
|
plugins: [...(t.plugins ?? []).filter((e) => e.id !== "intlayer-node-plugin")]
|
|
73
73
|
});
|
|
74
74
|
return (e) => {
|
|
75
|
-
let a =
|
|
75
|
+
let a = C(i, e);
|
|
76
76
|
return r(a, {
|
|
77
77
|
...n,
|
|
78
78
|
plugins: t.plugins,
|
|
@@ -88,7 +88,7 @@ var v = process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE === "false" ? o : {
|
|
|
88
88
|
plugins: [a, ...t.plugins ?? []]
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
},
|
|
91
|
+
}, T = y ? o : {
|
|
92
92
|
id: "markdown-string-plugin",
|
|
93
93
|
canHandle: (e) => typeof e == "string",
|
|
94
94
|
transform: (t, i, a) => {
|
|
@@ -124,7 +124,7 @@ var v = process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE === "false" ? o : {
|
|
|
124
124
|
});
|
|
125
125
|
return l();
|
|
126
126
|
}
|
|
127
|
-
},
|
|
127
|
+
}, E = y ? o : {
|
|
128
128
|
id: "markdown-plugin",
|
|
129
129
|
canHandle: (e) => typeof e == "object" && e?.nodeType === m.MARKDOWN,
|
|
130
130
|
transform: (e, t, n) => {
|
|
@@ -133,10 +133,10 @@ var v = process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE === "false" ? o : {
|
|
|
133
133
|
...t,
|
|
134
134
|
children: i,
|
|
135
135
|
keyPath: r,
|
|
136
|
-
plugins: [
|
|
136
|
+
plugins: [T, ...t.plugins ?? []]
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
|
-
},
|
|
139
|
+
}, D = b ? o : {
|
|
140
140
|
id: "html-plugin",
|
|
141
141
|
canHandle: (e) => typeof e == "object" && e?.nodeType === m.HTML,
|
|
142
142
|
transform: (e, n) => {
|
|
@@ -153,17 +153,17 @@ var v = process.env.INTLAYER_NODE_TYPE_INTLAYER_NODE === "false" ? o : {
|
|
|
153
153
|
};
|
|
154
154
|
return a();
|
|
155
155
|
}
|
|
156
|
-
},
|
|
156
|
+
}, O = (e, t = !0) => [
|
|
157
157
|
d(e ?? f.internationalization.defaultLocale, t ? f.internationalization.defaultLocale : void 0),
|
|
158
158
|
a,
|
|
159
159
|
i,
|
|
160
160
|
l(e ?? f.internationalization.defaultLocale),
|
|
161
161
|
s,
|
|
162
162
|
c,
|
|
163
|
-
v,
|
|
164
|
-
b,
|
|
165
163
|
S,
|
|
166
|
-
|
|
164
|
+
w,
|
|
165
|
+
E,
|
|
166
|
+
D
|
|
167
167
|
].filter(Boolean);
|
|
168
168
|
//#endregion
|
|
169
|
-
export {
|
|
169
|
+
export { O as getPlugins, D as htmlPlugin, w as insertionPlugin, S as intlayerNodePlugins, E as markdownPlugin, T as markdownStringPlugin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-C91j1N6u.js`);let t=require(`@intlayer/config/built`);t=e.t(t);let n=require(`vue`),r=require(`@intlayer/editor/isEnabled`);var i=process.env.INTLAYER_EDITOR_ENABLED===`false`,a=e=>{let t=null,r=!1;return import(`@intlayer/editor`).then(({initEditorClient:i})=>{if(r)return;let a=i();e&&(t=(0,n.watchEffect)(()=>{let t=e.value;t&&a.currentLocale.set(t)}))}),()=>{r=!0,t?.(),import(`@intlayer/editor`).then(({stopEditorClient:e})=>{e()})}},o=e=>{if(i||!r.isEnabled)return;if(e){let t=null;e.mixin({inject:{_intlayerClient:{from:s,default:null}},mounted(){if(this.$parent!==null)return;let e=this._intlayerClient;t=a(e?.locale)},unmounted(){this.$parent===null&&t?.()}});return}let t=(0,n.inject)(s),o=null;(0,n.onMounted)(()=>{o=a(t?.locale)}),(0,n.onUnmounted)(()=>{o?.()})},s=Symbol(`intlayer`),c=null,l=(e,r=!0)=>{if(c)return c;let{defaultLocale:i}=t.default.internationalization??{},a=(0,n.ref)(e??i);return c={locale:(0,n.readonly)(a),setLocale:e=>{a.value=e},isCookieEnabled:r},c},u=(e,t)=>{let{locale:n,isCookieEnabled:r}=t??{},i=l(n,r);return e.provide(s,i),o(e),e},d={install:u};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|
|
@@ -2,7 +2,7 @@ import e from "@intlayer/config/built";
|
|
|
2
2
|
import { inject as t, onMounted as n, onUnmounted as r, readonly as i, ref as a, watchEffect as o } from "vue";
|
|
3
3
|
import { isEnabled as s } from "@intlayer/editor/isEnabled";
|
|
4
4
|
//#region src/editor/useEditor.ts
|
|
5
|
-
var c = (e) => {
|
|
5
|
+
var c = process.env.INTLAYER_EDITOR_ENABLED === "false", l = (e) => {
|
|
6
6
|
let t = null, n = !1;
|
|
7
7
|
return import("@intlayer/editor").then(({ initEditorClient: r }) => {
|
|
8
8
|
if (n) return;
|
|
@@ -16,19 +16,19 @@ var c = (e) => {
|
|
|
16
16
|
e();
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
|
-
},
|
|
20
|
-
if (!s) return;
|
|
19
|
+
}, u = (e) => {
|
|
20
|
+
if (c || !s) return;
|
|
21
21
|
if (e) {
|
|
22
22
|
let t = null;
|
|
23
23
|
e.mixin({
|
|
24
24
|
inject: { _intlayerClient: {
|
|
25
|
-
from:
|
|
25
|
+
from: d,
|
|
26
26
|
default: null
|
|
27
27
|
} },
|
|
28
28
|
mounted() {
|
|
29
29
|
if (this.$parent !== null) return;
|
|
30
30
|
let e = this._intlayerClient;
|
|
31
|
-
t =
|
|
31
|
+
t = l(e?.locale);
|
|
32
32
|
},
|
|
33
33
|
unmounted() {
|
|
34
34
|
this.$parent === null && t?.();
|
|
@@ -36,25 +36,25 @@ var c = (e) => {
|
|
|
36
36
|
});
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
|
-
let i = t(
|
|
39
|
+
let i = t(d), a = null;
|
|
40
40
|
n(() => {
|
|
41
|
-
a =
|
|
41
|
+
a = l(i?.locale);
|
|
42
42
|
}), r(() => {
|
|
43
43
|
a?.();
|
|
44
44
|
});
|
|
45
|
-
},
|
|
46
|
-
if (
|
|
45
|
+
}, d = Symbol("intlayer"), f = null, p = (t, n = !0) => {
|
|
46
|
+
if (f) return f;
|
|
47
47
|
let { defaultLocale: r } = e.internationalization ?? {}, o = a(t ?? r);
|
|
48
|
-
return
|
|
48
|
+
return f = {
|
|
49
49
|
locale: i(o),
|
|
50
50
|
setLocale: (e) => {
|
|
51
51
|
o.value = e;
|
|
52
52
|
},
|
|
53
53
|
isCookieEnabled: n
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
let { locale: n, isCookieEnabled: r } = t ?? {}, i =
|
|
57
|
-
return e.provide(
|
|
58
|
-
},
|
|
54
|
+
}, f;
|
|
55
|
+
}, m = (e, t) => {
|
|
56
|
+
let { locale: n, isCookieEnabled: r } = t ?? {}, i = p(n, r);
|
|
57
|
+
return e.provide(d, i), u(e), e;
|
|
58
|
+
}, h = { install: m };
|
|
59
59
|
//#endregion
|
|
60
|
-
export {
|
|
60
|
+
export { u as a, h as i, p as n, m as r, d as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-intlayer",
|
|
3
|
-
"version": "8.6.
|
|
3
|
+
"version": "8.6.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Vue applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -102,11 +102,11 @@
|
|
|
102
102
|
"typecheck": "vue-tsc --noEmit --project tsconfig.types.json"
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
|
-
"@intlayer/api": "8.6.
|
|
106
|
-
"@intlayer/config": "8.6.
|
|
107
|
-
"@intlayer/core": "8.6.
|
|
108
|
-
"@intlayer/editor": "8.6.
|
|
109
|
-
"@intlayer/types": "8.6.
|
|
105
|
+
"@intlayer/api": "8.6.3",
|
|
106
|
+
"@intlayer/config": "8.6.3",
|
|
107
|
+
"@intlayer/core": "8.6.3",
|
|
108
|
+
"@intlayer/editor": "8.6.3",
|
|
109
|
+
"@intlayer/types": "8.6.3"
|
|
110
110
|
},
|
|
111
111
|
"devDependencies": {
|
|
112
112
|
"@types/node": "25.5.0",
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"vue-tsc": "3.1.5"
|
|
126
126
|
},
|
|
127
127
|
"peerDependencies": {
|
|
128
|
-
"intlayer": "8.6.
|
|
128
|
+
"intlayer": "8.6.3",
|
|
129
129
|
"vue": ">=3.0.0"
|
|
130
130
|
},
|
|
131
131
|
"peerDependenciesMeta": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./chunk-C91j1N6u.js`);let e=require(`vue`),t=require(`@intlayer/editor/isEnabled`);var n=(0,e.defineComponent)({name:`ContentSelector`,props:{dictionaryKey:{type:String,required:!0},keyPath:{type:Array,required:!0}},setup(n,{slots:r}){return()=>t.isEnabled?(0,e.h)(`intlayer-content-selector-wrapper`,{"key-path":JSON.stringify(n.keyPath),"dictionary-key":n.dictionaryKey},r.default?.()):r.default?.()}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./chunk-C91j1N6u.js`);let t=require(`@intlayer/config/built`);t=e.t(t);let n=require(`vue`),r=require(`@intlayer/editor/isEnabled`);var i=e=>{let t=null,r=!1;return import(`@intlayer/editor`).then(({initEditorClient:i})=>{if(r)return;let a=i();e&&(t=(0,n.watchEffect)(()=>{let t=e.value;t&&a.currentLocale.set(t)}))}),()=>{r=!0,t?.(),import(`@intlayer/editor`).then(({stopEditorClient:e})=>{e()})}},a=e=>{if(!r.isEnabled)return;if(e){let t=null;e.mixin({inject:{_intlayerClient:{from:o,default:null}},mounted(){if(this.$parent!==null)return;let e=this._intlayerClient;t=i(e?.locale)},unmounted(){this.$parent===null&&t?.()}});return}let t=(0,n.inject)(o),a=null;(0,n.onMounted)(()=>{a=i(t?.locale)}),(0,n.onUnmounted)(()=>{a?.()})},o=Symbol(`intlayer`),s=null,c=(e,r=!0)=>{if(s)return s;let{defaultLocale:i}=t.default.internationalization??{},a=(0,n.ref)(e??i);return s={locale:(0,n.readonly)(a),setLocale:e=>{a.value=e},isCookieEnabled:r},s},l=(e,t)=>{let{locale:n,isCookieEnabled:r}=t??{},i=c(n,r);return e.provide(o,i),a(e),e},u={install:l};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|