angular-intlayer 8.3.2 → 8.3.4
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/cjs/editor/ContentSelectorWrapper.component.cjs +14 -9
- package/dist/cjs/editor/ContentSelectorWrapper.component.cjs.map +1 -1
- package/dist/cjs/editor/EditedContentRenderer.component.cjs +1 -1
- package/dist/cjs/editor/EditedContentRenderer.component.cjs.map +1 -1
- package/dist/cjs/editor/communicator.cjs +1 -1
- package/dist/cjs/editor/communicator.cjs.map +1 -1
- package/dist/cjs/editor/configuration.cjs +1 -1
- package/dist/cjs/editor/configuration.cjs.map +1 -1
- package/dist/cjs/editor/dictionariesRecord.cjs +1 -1
- package/dist/cjs/editor/dictionariesRecord.cjs.map +1 -1
- package/dist/cjs/editor/editedContent.cjs +1 -1
- package/dist/cjs/editor/editedContent.cjs.map +1 -1
- package/dist/cjs/editor/editorEnabled.cjs +1 -1
- package/dist/cjs/editor/editorEnabled.cjs.map +1 -1
- package/dist/cjs/editor/editorLocale.cjs +1 -1
- package/dist/cjs/editor/editorLocale.cjs.map +1 -1
- package/dist/cjs/editor/focusDictionary.cjs +1 -1
- package/dist/cjs/editor/focusDictionary.cjs.map +1 -1
- package/dist/cjs/editor/index.cjs +1 -1
- package/dist/cjs/editor/installIntlayerEditor.cjs +1 -1
- package/dist/cjs/editor/installIntlayerEditor.cjs.map +1 -1
- package/dist/cjs/editor/useCrossFrameMessageListener.cjs +1 -1
- package/dist/cjs/editor/useCrossFrameMessageListener.cjs.map +1 -1
- package/dist/cjs/editor/useCrossFrameState.cjs +1 -1
- package/dist/cjs/editor/useCrossFrameState.cjs.map +1 -1
- package/dist/cjs/editor/useCrossURLPathState.cjs +1 -1
- package/dist/cjs/editor/useCrossURLPathState.cjs.map +1 -1
- package/dist/cjs/editor/useEditor.cjs +1 -1
- package/dist/cjs/editor/useEditor.cjs.map +1 -1
- package/dist/cjs/editor/useIframeClickInterceptor.cjs +1 -1
- package/dist/cjs/editor/useIframeClickInterceptor.cjs.map +1 -1
- package/dist/esm/editor/ContentSelectorWrapper.component.mjs +14 -9
- package/dist/esm/editor/ContentSelectorWrapper.component.mjs.map +1 -1
- package/dist/esm/editor/EditedContentRenderer.component.mjs +1 -1
- package/dist/esm/editor/EditedContentRenderer.component.mjs.map +1 -1
- package/dist/esm/editor/communicator.mjs +1 -1
- package/dist/esm/editor/communicator.mjs.map +1 -1
- package/dist/esm/editor/configuration.mjs +1 -1
- package/dist/esm/editor/configuration.mjs.map +1 -1
- package/dist/esm/editor/dictionariesRecord.mjs +1 -1
- package/dist/esm/editor/dictionariesRecord.mjs.map +1 -1
- package/dist/esm/editor/editedContent.mjs +1 -1
- package/dist/esm/editor/editedContent.mjs.map +1 -1
- package/dist/esm/editor/editorEnabled.mjs +1 -1
- package/dist/esm/editor/editorEnabled.mjs.map +1 -1
- package/dist/esm/editor/editorLocale.mjs +1 -1
- package/dist/esm/editor/editorLocale.mjs.map +1 -1
- package/dist/esm/editor/focusDictionary.mjs +1 -1
- package/dist/esm/editor/focusDictionary.mjs.map +1 -1
- package/dist/esm/editor/index.mjs +1 -1
- package/dist/esm/editor/installIntlayerEditor.mjs +1 -1
- package/dist/esm/editor/installIntlayerEditor.mjs.map +1 -1
- package/dist/esm/editor/useCrossFrameMessageListener.mjs +1 -1
- package/dist/esm/editor/useCrossFrameMessageListener.mjs.map +1 -1
- package/dist/esm/editor/useCrossFrameState.mjs +1 -1
- package/dist/esm/editor/useCrossFrameState.mjs.map +1 -1
- package/dist/esm/editor/useCrossURLPathState.mjs +1 -1
- package/dist/esm/editor/useCrossURLPathState.mjs.map +1 -1
- package/dist/esm/editor/useEditor.mjs +1 -1
- package/dist/esm/editor/useEditor.mjs.map +1 -1
- package/dist/esm/editor/useIframeClickInterceptor.mjs +1 -1
- package/dist/esm/editor/useIframeClickInterceptor.mjs.map +1 -1
- package/dist/types/client/useDictionaryDynamic.d.ts +2 -2
- package/dist/types/client/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/client/useLocale.d.ts +3 -3
- package/dist/types/client/useLocaleStorage.d.ts +5 -5
- package/dist/types/client/useLocaleStorage.d.ts.map +1 -1
- package/dist/types/editor/ContentSelectorWrapper.component.d.ts +9 -12
- package/dist/types/editor/ContentSelectorWrapper.component.d.ts.map +1 -1
- package/dist/types/editor/communicator.d.ts +3 -27
- package/dist/types/editor/communicator.d.ts.map +1 -1
- package/dist/types/editor/configuration.d.ts +4 -1
- package/dist/types/editor/configuration.d.ts.map +1 -1
- package/dist/types/editor/dictionariesRecord.d.ts +6 -12
- package/dist/types/editor/dictionariesRecord.d.ts.map +1 -1
- package/dist/types/editor/editedContent.d.ts +27 -16
- package/dist/types/editor/editedContent.d.ts.map +1 -1
- package/dist/types/editor/editorEnabled.d.ts +4 -15
- package/dist/types/editor/editorEnabled.d.ts.map +1 -1
- package/dist/types/editor/editorLocale.d.ts.map +1 -1
- package/dist/types/editor/focusDictionary.d.ts +6 -20
- package/dist/types/editor/focusDictionary.d.ts.map +1 -1
- package/dist/types/editor/index.d.ts +13 -2
- package/dist/types/editor/installIntlayerEditor.d.ts +4 -17
- package/dist/types/editor/installIntlayerEditor.d.ts.map +1 -1
- package/dist/types/editor/useCrossFrameMessageListener.d.ts +0 -8
- package/dist/types/editor/useCrossFrameMessageListener.d.ts.map +1 -1
- package/dist/types/editor/useCrossFrameState.d.ts +2 -16
- package/dist/types/editor/useCrossFrameState.d.ts.map +1 -1
- package/dist/types/editor/useCrossURLPathState.d.ts +2 -17
- package/dist/types/editor/useCrossURLPathState.d.ts.map +1 -1
- package/dist/types/editor/useEditor.d.ts.map +1 -1
- package/dist/types/editor/useIframeClickInterceptor.d.ts +0 -8
- package/dist/types/editor/useIframeClickInterceptor.d.ts.map +1 -1
- package/dist/types/intlayer/dist/types/index.d.ts +3 -0
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditedContentRenderer.component.mjs","names":[],"sources":["../../../src/editor/EditedContentRenderer.component.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, computed, Input, signal } from '@angular/core';\nimport { getContent } from '@intlayer/core/interpreter';\nimport type {
|
|
1
|
+
{"version":3,"file":"EditedContentRenderer.component.mjs","names":[],"sources":["../../../src/editor/EditedContentRenderer.component.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, computed, Input, signal } from '@angular/core';\nimport { getBasePlugins, getContent } from '@intlayer/core/interpreter';\nimport type { Locale } from '@intlayer/types/allLocales';\nimport type { ContentNode } from '@intlayer/types/dictionary';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport { useEditedContentRenderer } from './useEditedContentRenderer';\n\nexport interface EditedContentRendererProps {\n dictionaryKey: string;\n keyPath: KeyPath[];\n locale?: Locale;\n}\n\n@Component({\n selector: 'app-edited-content-renderer',\n standalone: true,\n imports: [CommonModule],\n template: ` <span [innerHTML]=\"renderedContent()\"></span> `,\n})\nexport class EditedContentRendererComponent {\n @Input() dictionaryKey!: string;\n @Input() keyPath!: KeyPath[];\n @Input() locale?: Locale;\n\n private fallback = signal('');\n\n private rawContent = computed(() => {\n return useEditedContentRenderer(\n this.dictionaryKey,\n this.keyPath,\n this.fallback\n );\n });\n\n /**\n * Object → getContent → string, same as the React version.\n */\n renderedContent = computed(() => {\n const rawContentValue = this.rawContent();\n\n if (typeof rawContentValue === 'object' && rawContentValue !== null) {\n const transformed = getContent(\n rawContentValue as ContentNode,\n {\n dictionaryKey: this.dictionaryKey,\n keyPath: this.keyPath,\n locale: this.locale,\n },\n getBasePlugins(this.locale)\n );\n\n if (typeof transformed !== 'string') {\n console.error(\n `Incorrect edited content format. Content type: ${typeof transformed}. Expected string. Value ${JSON.stringify(\n transformed\n )}`\n );\n return this.fallback();\n }\n return transformed;\n }\n\n return rawContentValue() as string;\n });\n}\n"],"mappings":"4dAoBO,IAAA,EAAA,KAAqC,CAC1C,cACA,QACA,OAEA,SAAmB,EAAO,GAAG,CAE7B,WAAqB,MACZ,EACL,KAAK,cACL,KAAK,QACL,KAAK,SACN,CACD,CAKF,gBAAkB,MAAe,CAC/B,IAAM,EAAkB,KAAK,YAAY,CAEzC,GAAI,OAAO,GAAoB,UAAY,EAA0B,CACnE,IAAM,EAAc,EAClB,EACA,CACE,cAAe,KAAK,cACpB,QAAS,KAAK,QACd,OAAQ,KAAK,OACd,CACD,EAAe,KAAK,OAAO,CAC5B,CAUD,OARI,OAAO,GAAgB,SAQpB,GAPL,QAAQ,MACN,kDAAkD,OAAO,EAAY,2BAA2B,KAAK,UACnG,EACD,GACF,CACM,KAAK,UAAU,EAK1B,OAAO,GAAiB,EACxB,KA3CD,GAAO,CAAA,EAAA,cAAA,OAAA,CAAA,CAAA,EAAA,UAAA,gBAAA,IAAA,GAAA,IACP,GAAO,CAAA,EAAA,cAAA,MAAA,CAAA,CAAA,EAAA,UAAA,UAAA,IAAA,GAAA,IACP,GAAO,CAAA,EAAA,cAAA,OAAA,CAAA,CAAA,EAAA,UAAA,SAAA,IAAA,GAAA,MATT,EAAU,CACT,SAAU,8BACV,WAAY,GACZ,QAAS,CAAC,EAAa,CACvB,SAAU,kDACX,CAAC,CAAA,CAAA,EAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e
|
|
1
|
+
import{getEditorStateManager as e}from"./installIntlayerEditor.mjs";const t=()=>{let t=e();return t?{postMessage:e=>t.messenger.send(e.type,e.data),senderId:t.messenger.senderId}:null};export{t as useCommunicator};
|
|
2
2
|
//# sourceMappingURL=communicator.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communicator.mjs","names":[],"sources":["../../../src/editor/communicator.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"communicator.mjs","names":[],"sources":["../../../src/editor/communicator.ts"],"sourcesContent":["import { getEditorStateManager } from './installIntlayerEditor';\n\nexport const useCommunicator = () => {\n const manager = getEditorStateManager();\n if (!manager) return null;\n return {\n postMessage: (data: any) => manager.messenger.send(data.type, data.data),\n senderId: manager.messenger.senderId,\n };\n};\n"],"mappings":"oEAEA,MAAa,MAAwB,CACnC,IAAM,EAAU,GAAuB,CAEvC,OADK,EACE,CACL,YAAc,GAAc,EAAQ,UAAU,KAAK,EAAK,KAAM,EAAK,KAAK,CACxE,SAAU,EAAQ,UAAU,SAC7B,CAJoB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{getEditorStateManager as e}from"./installIntlayerEditor.mjs";import{DestroyRef as t,inject as n,signal as r}from"@angular/core";const i=()=>{let i=e(),a=r(i?.configuration.value);if(i){let e=e=>a.set(e.detail);i.configuration.addEventListener(`change`,e);try{n(t,{optional:!0})?.onDestroy(()=>i.configuration.removeEventListener(`change`,e))}catch{}}return a.asReadonly()};export{i as useConfiguration};
|
|
2
2
|
//# sourceMappingURL=configuration.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.mjs","names":[],"sources":["../../../src/editor/configuration.ts"],"sourcesContent":["import { DestroyRef, inject } from '@angular/core';\nimport
|
|
1
|
+
{"version":3,"file":"configuration.mjs","names":[],"sources":["../../../src/editor/configuration.ts"],"sourcesContent":["import { DestroyRef, inject, signal } from '@angular/core';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport { getEditorStateManager } from './installIntlayerEditor';\n\nexport const useConfiguration = () => {\n const manager = getEditorStateManager();\n const config = signal<IntlayerConfig | undefined>(\n manager?.configuration.value\n );\n\n if (manager) {\n const handler = (e: Event) =>\n config.set((e as CustomEvent<IntlayerConfig>).detail);\n manager.configuration.addEventListener('change', handler);\n\n try {\n const destroyRef = inject(DestroyRef, { optional: true });\n destroyRef?.onDestroy(() =>\n manager.configuration.removeEventListener('change', handler)\n );\n } catch {}\n }\n\n return config.asReadonly();\n};\n"],"mappings":"uIAIA,MAAa,MAAyB,CACpC,IAAM,EAAU,GAAuB,CACjC,EAAS,EACb,GAAS,cAAc,MACxB,CAED,GAAI,EAAS,CACX,IAAM,EAAW,GACf,EAAO,IAAK,EAAkC,OAAO,CACvD,EAAQ,cAAc,iBAAiB,SAAU,EAAQ,CAEzD,GAAI,CACiB,EAAO,EAAY,CAAE,SAAU,GAAM,CAAC,EAC7C,cACV,EAAQ,cAAc,oBAAoB,SAAU,EAAQ,CAC7D,MACK,GAGV,OAAO,EAAO,YAAY"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{getEditorStateManager as e}from"./installIntlayerEditor.mjs";import{DestroyRef as t,inject as n,signal as r}from"@angular/core";const i=()=>{let i=e(),a=r(i?.localeDictionaries.value??{});if(i){let e=e=>a.set(e.detail??{});i.localeDictionaries.addEventListener(`change`,e);try{n(t,{optional:!0})?.onDestroy(()=>i.localeDictionaries.removeEventListener(`change`,e))}catch{}}return{localeDictionaries:a.asReadonly(),setLocaleDictionaries:e=>i?.localeDictionaries.set(e),setLocaleDictionary:e=>i?.setLocaleDictionary(e)}};export{i as useDictionariesRecord};
|
|
2
2
|
//# sourceMappingURL=dictionariesRecord.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dictionariesRecord.mjs","names":[],"sources":["../../../src/editor/dictionariesRecord.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"dictionariesRecord.mjs","names":[],"sources":["../../../src/editor/dictionariesRecord.ts"],"sourcesContent":["import { DestroyRef, inject, signal } from '@angular/core';\nimport type { DictionaryContent } from '@intlayer/editor';\nimport type { Dictionary } from '@intlayer/types/dictionary';\nimport { getEditorStateManager } from './installIntlayerEditor';\n\nexport type { DictionaryContent };\n\nexport const useDictionariesRecord = () => {\n const manager = getEditorStateManager();\n const localeDictionaries = signal<DictionaryContent>(\n manager?.localeDictionaries.value ?? {}\n );\n\n if (manager) {\n const handler = (e: Event) =>\n localeDictionaries.set(\n (e as CustomEvent<DictionaryContent>).detail ?? {}\n );\n manager.localeDictionaries.addEventListener('change', handler);\n\n try {\n const destroyRef = inject(DestroyRef, { optional: true });\n destroyRef?.onDestroy(() =>\n manager.localeDictionaries.removeEventListener('change', handler)\n );\n } catch {}\n }\n\n return {\n localeDictionaries: localeDictionaries.asReadonly(),\n setLocaleDictionaries: (value: DictionaryContent) =>\n manager?.localeDictionaries.set(value),\n setLocaleDictionary: (dictionary: Dictionary) =>\n manager?.setLocaleDictionary(dictionary),\n };\n};\n"],"mappings":"uIAOA,MAAa,MAA8B,CACzC,IAAM,EAAU,GAAuB,CACjC,EAAqB,EACzB,GAAS,mBAAmB,OAAS,EAAE,CACxC,CAED,GAAI,EAAS,CACX,IAAM,EAAW,GACf,EAAmB,IAChB,EAAqC,QAAU,EAAE,CACnD,CACH,EAAQ,mBAAmB,iBAAiB,SAAU,EAAQ,CAE9D,GAAI,CACiB,EAAO,EAAY,CAAE,SAAU,GAAM,CAAC,EAC7C,cACV,EAAQ,mBAAmB,oBAAoB,SAAU,EAAQ,CAClE,MACK,GAGV,MAAO,CACL,mBAAoB,EAAmB,YAAY,CACnD,sBAAwB,GACtB,GAAS,mBAAmB,IAAI,EAAM,CACxC,oBAAsB,GACpB,GAAS,oBAAoB,EAAW,CAC3C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{getEditorStateManager as e}from"./installIntlayerEditor.mjs";import{DestroyRef as t,inject as n,signal as r}from"@angular/core";const i=()=>{let i=e(),a=r(i?.editedContent.value);if(i){let e=e=>a.set(e.detail);i.editedContent.addEventListener(`change`,e);try{n(t,{optional:!0})?.onDestroy(()=>i.editedContent.removeEventListener(`change`,e))}catch{}}return{editedContent:a.asReadonly(),setEditedContentState:e=>i?.editedContent.set(e),setEditedDictionary:e=>i?.setEditedDictionary(e),setEditedContent:(e,t)=>i?.setEditedContent(e,t),addEditedContent:(e,t,n,r)=>i?.addContent(e,t,n,r),renameEditedContent:(e,t,n)=>i?.renameContent(e,t,n),removeEditedContent:(e,t)=>i?.removeContent(e,t),restoreEditedContent:e=>i?.restoreContent(e),clearEditedDictionaryContent:e=>i?.clearContent(e),clearEditedContent:()=>i?.clearAllContent(),getEditedContentValue:(e,t)=>i?.getContentValue(e,t)}},a=()=>{let{editedContent:e,...t}=i();return t};export{i as useEditedContent,a as useEditedContentActions};
|
|
2
2
|
//# sourceMappingURL=editedContent.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editedContent.mjs","names":[],"sources":["../../../src/editor/editedContent.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"editedContent.mjs","names":[],"sources":["../../../src/editor/editedContent.ts"],"sourcesContent":["import { DestroyRef, inject, signal } from '@angular/core';\nimport type { DictionaryContent } from '@intlayer/editor';\nimport type {\n ContentNode,\n Dictionary,\n LocalDictionaryId,\n} from '@intlayer/types/dictionary';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport { getEditorStateManager } from './installIntlayerEditor';\n\nexport const useEditedContent = () => {\n const manager = getEditorStateManager();\n const editedContent = signal<DictionaryContent | undefined>(\n manager?.editedContent.value\n );\n\n if (manager) {\n const handler = (e: Event) =>\n editedContent.set((e as CustomEvent<DictionaryContent>).detail);\n manager.editedContent.addEventListener('change', handler);\n\n try {\n const destroyRef = inject(DestroyRef, { optional: true });\n destroyRef?.onDestroy(() =>\n manager.editedContent.removeEventListener('change', handler)\n );\n } catch {}\n }\n\n return {\n editedContent: editedContent.asReadonly(),\n setEditedContentState: (value: DictionaryContent) =>\n manager?.editedContent.set(value),\n setEditedDictionary: (dict: Dictionary) =>\n manager?.setEditedDictionary(dict),\n setEditedContent: (\n localId: LocalDictionaryId,\n value: Dictionary['content']\n ) => manager?.setEditedContent(localId, value),\n addEditedContent: (\n localId: LocalDictionaryId,\n value: ContentNode,\n keyPath?: KeyPath[],\n overwrite?: boolean\n ) => manager?.addContent(localId, value, keyPath, overwrite),\n renameEditedContent: (\n localId: LocalDictionaryId,\n newKey: KeyPath['key'],\n keyPath?: KeyPath[]\n ) => manager?.renameContent(localId, newKey, keyPath),\n removeEditedContent: (localId: LocalDictionaryId, keyPath: KeyPath[]) =>\n manager?.removeContent(localId, keyPath),\n restoreEditedContent: (localId: LocalDictionaryId) =>\n manager?.restoreContent(localId),\n clearEditedDictionaryContent: (localId: LocalDictionaryId) =>\n manager?.clearContent(localId),\n clearEditedContent: () => manager?.clearAllContent(),\n getEditedContentValue: (\n localIdOrKey: LocalDictionaryId | string,\n keyPath: KeyPath[]\n ): ContentNode | undefined =>\n manager?.getContentValue(localIdOrKey, keyPath),\n };\n};\n\nexport const useEditedContentActions = () => {\n const actions = useEditedContent();\n const { editedContent, ...rest } = actions;\n return rest;\n};\n"],"mappings":"uIAUA,MAAa,MAAyB,CACpC,IAAM,EAAU,GAAuB,CACjC,EAAgB,EACpB,GAAS,cAAc,MACxB,CAED,GAAI,EAAS,CACX,IAAM,EAAW,GACf,EAAc,IAAK,EAAqC,OAAO,CACjE,EAAQ,cAAc,iBAAiB,SAAU,EAAQ,CAEzD,GAAI,CACiB,EAAO,EAAY,CAAE,SAAU,GAAM,CAAC,EAC7C,cACV,EAAQ,cAAc,oBAAoB,SAAU,EAAQ,CAC7D,MACK,GAGV,MAAO,CACL,cAAe,EAAc,YAAY,CACzC,sBAAwB,GACtB,GAAS,cAAc,IAAI,EAAM,CACnC,oBAAsB,GACpB,GAAS,oBAAoB,EAAK,CACpC,kBACE,EACA,IACG,GAAS,iBAAiB,EAAS,EAAM,CAC9C,kBACE,EACA,EACA,EACA,IACG,GAAS,WAAW,EAAS,EAAO,EAAS,EAAU,CAC5D,qBACE,EACA,EACA,IACG,GAAS,cAAc,EAAS,EAAQ,EAAQ,CACrD,qBAAsB,EAA4B,IAChD,GAAS,cAAc,EAAS,EAAQ,CAC1C,qBAAuB,GACrB,GAAS,eAAe,EAAQ,CAClC,6BAA+B,GAC7B,GAAS,aAAa,EAAQ,CAChC,uBAA0B,GAAS,iBAAiB,CACpD,uBACE,EACA,IAEA,GAAS,gBAAgB,EAAc,EAAQ,CAClD,EAGU,MAAgC,CAE3C,GAAM,CAAE,gBAAe,GAAG,GADV,GAAkB,CAElC,OAAO"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{getEditorStateManager as e}from"./installIntlayerEditor.mjs";import{DestroyRef as t,inject as n,signal as r}from"@angular/core";const i=()=>{let i=e(),a=r(i?.editorEnabled.value??!1);if(i){let e=e=>a.set(e.detail);i.editorEnabled.addEventListener(`change`,e);try{n(t,{optional:!0})?.onDestroy(()=>i.editorEnabled.removeEventListener(`change`,e))}catch{}}return{enabled:a.asReadonly()}};export{i as useEditorEnabled};
|
|
2
2
|
//# sourceMappingURL=editorEnabled.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editorEnabled.mjs","names":[],"sources":["../../../src/editor/editorEnabled.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"editorEnabled.mjs","names":[],"sources":["../../../src/editor/editorEnabled.ts"],"sourcesContent":["import { DestroyRef, inject, signal } from '@angular/core';\nimport { getEditorStateManager } from './installIntlayerEditor';\n\nexport const useEditorEnabled = () => {\n const manager = getEditorStateManager();\n const enabled = signal<boolean>(manager?.editorEnabled.value ?? false);\n\n if (manager) {\n const handler = (e: Event) =>\n enabled.set((e as CustomEvent<boolean>).detail);\n manager.editorEnabled.addEventListener('change', handler);\n\n try {\n const destroyRef = inject(DestroyRef, { optional: true });\n destroyRef?.onDestroy(() =>\n manager.editorEnabled.removeEventListener('change', handler)\n );\n } catch {}\n }\n\n return { enabled: enabled.asReadonly() };\n};\n"],"mappings":"uIAGA,MAAa,MAAyB,CACpC,IAAM,EAAU,GAAuB,CACjC,EAAU,EAAgB,GAAS,cAAc,OAAS,GAAM,CAEtE,GAAI,EAAS,CACX,IAAM,EAAW,GACf,EAAQ,IAAK,EAA2B,OAAO,CACjD,EAAQ,cAAc,iBAAiB,SAAU,EAAQ,CAEzD,GAAI,CACiB,EAAO,EAAY,CAAE,SAAU,GAAM,CAAC,EAC7C,cACV,EAAQ,cAAc,oBAAoB,SAAU,EAAQ,CAC7D,MACK,GAGV,MAAO,CAAE,QAAS,EAAQ,YAAY,CAAE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{getEditorStateManager as e}from"./installIntlayerEditor.mjs";import{INTLAYER_TOKEN as t}from"../client/installIntlayer.mjs";import{effect as n,inject as r}from"@angular/core";const i=()=>{let i=e(),a=r(t,{optional:!0});return a&&i&&n(()=>{let e=a.locale();i.currentLocale.set(e)}),a};export{i as useEditorLocale};
|
|
2
2
|
//# sourceMappingURL=editorLocale.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editorLocale.mjs","names":[],"sources":["../../../src/editor/editorLocale.ts"],"sourcesContent":["import { effect, inject } from '@angular/core';\nimport
|
|
1
|
+
{"version":3,"file":"editorLocale.mjs","names":[],"sources":["../../../src/editor/editorLocale.ts"],"sourcesContent":["import { effect, inject } from '@angular/core';\nimport type { Locale } from '@intlayer/types/allLocales';\nimport { INTLAYER_TOKEN, type IntlayerProvider } from '../client';\nimport { getEditorStateManager } from './installIntlayerEditor';\n\nexport const useEditorLocale = () => {\n const manager = getEditorStateManager();\n const client = inject<IntlayerProvider>(INTLAYER_TOKEN, {\n optional: true,\n } as any);\n\n if (client && manager) {\n effect(() => {\n const locale = client.locale();\n manager.currentLocale.set(locale as Locale);\n });\n }\n\n return client;\n};\n"],"mappings":"sLAKA,MAAa,MAAwB,CACnC,IAAM,EAAU,GAAuB,CACjC,EAAS,EAAyB,EAAgB,CACtD,SAAU,GACX,CAAQ,CAST,OAPI,GAAU,GACZ,MAAa,CACX,IAAM,EAAS,EAAO,QAAQ,CAC9B,EAAQ,cAAc,IAAI,EAAiB,EAC3C,CAGG"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{getEditorStateManager as e}from"./installIntlayerEditor.mjs";import{DestroyRef as t,inject as n,signal as r}from"@angular/core";const i=()=>{let i=e(),a=r(i?.focusedContent.value??null);if(i){let e=e=>a.set(e.detail);i.focusedContent.addEventListener(`change`,e);try{n(t,{optional:!0})?.onDestroy(()=>i.focusedContent.removeEventListener(`change`,e))}catch{}}return{focusedContent:a.asReadonly(),setFocusedContent:e=>i?.focusedContent.set(e),setFocusedContentKeyPath:e=>i?.setFocusedContentKeyPath(e)}};export{i as useFocusDictionary};
|
|
2
2
|
//# sourceMappingURL=focusDictionary.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focusDictionary.mjs","names":[],"sources":["../../../src/editor/focusDictionary.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"focusDictionary.mjs","names":[],"sources":["../../../src/editor/focusDictionary.ts"],"sourcesContent":["import { DestroyRef, inject, signal } from '@angular/core';\nimport type { FileContent } from '@intlayer/editor';\nimport type { KeyPath } from '@intlayer/types/keyPath';\nimport { getEditorStateManager } from './installIntlayerEditor';\n\nexport type { FileContent };\n\nexport const useFocusDictionary = () => {\n const manager = getEditorStateManager();\n const focusedContent = signal<FileContent | null>(\n manager?.focusedContent.value ?? null\n );\n\n if (manager) {\n const handler = (e: Event) =>\n focusedContent.set((e as CustomEvent<FileContent | null>).detail);\n manager.focusedContent.addEventListener('change', handler);\n\n try {\n const destroyRef = inject(DestroyRef, { optional: true });\n destroyRef?.onDestroy(() =>\n manager.focusedContent.removeEventListener('change', handler)\n );\n } catch {}\n }\n\n return {\n focusedContent: focusedContent.asReadonly(),\n setFocusedContent: (value: FileContent | null) =>\n manager?.focusedContent.set(value),\n setFocusedContentKeyPath: (keyPath: KeyPath[]) =>\n manager?.setFocusedContentKeyPath(keyPath),\n };\n};\n"],"mappings":"uIAOA,MAAa,MAA2B,CACtC,IAAM,EAAU,GAAuB,CACjC,EAAiB,EACrB,GAAS,eAAe,OAAS,KAClC,CAED,GAAI,EAAS,CACX,IAAM,EAAW,GACf,EAAe,IAAK,EAAsC,OAAO,CACnE,EAAQ,eAAe,iBAAiB,SAAU,EAAQ,CAE1D,GAAI,CACiB,EAAO,EAAY,CAAE,SAAU,GAAM,CAAC,EAC7C,cACV,EAAQ,eAAe,oBAAoB,SAAU,EAAQ,CAC9D,MACK,GAGV,MAAO,CACL,eAAgB,EAAe,YAAY,CAC3C,kBAAoB,GAClB,GAAS,eAAe,IAAI,EAAM,CACpC,yBAA2B,GACzB,GAAS,yBAAyB,EAAQ,CAC7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{getEditorStateManager as e,installIntlayerEditor as t}from"./installIntlayerEditor.mjs";import{useEditorEnabled as n}from"./editorEnabled.mjs";import{useFocusDictionary as r}from"./focusDictionary.mjs";import{ContentSelectorWrapperComponent as i}from"./ContentSelectorWrapper.component.mjs";import{useCommunicator as a}from"./communicator.mjs";import{useConfiguration as o}from"./configuration.mjs";import{useDictionariesRecord as s}from"./dictionariesRecord.mjs";import{EditedContentRendererComponent as c}from"./EditedContentRenderer.component.mjs";import{EditorSelectorRendererComponent as l}from"./EditorSelectorRenderer.component.mjs";import{useEditedContent as u,useEditedContentActions as d}from"./editedContent.mjs";import{useEditorLocale as f}from"./editorLocale.mjs";import{useCrossFrameMessageListener as p}from"./useCrossFrameMessageListener.mjs";import{useCrossFrameState as m}from"./useCrossFrameState.mjs";import{useIframeClickInterceptor as h,useIframeClickMerger as g}from"./useIframeClickInterceptor.mjs";import{useEditor as _}from"./useEditor.mjs";export{i as ContentSelectorWrapperComponent,c as EditedContentRendererComponent,l as EditorSelectorRendererComponent,e as getEditorStateManager,t as installIntlayerEditor,a as useCommunicator,o as useConfiguration,p as useCrossFrameMessageListener,m as useCrossFrameState,s as useDictionariesRecord,u as useEditedContent,d as useEditedContentActions,_ as useEditor,n as useEditorEnabled,f as useEditorLocale,r as useFocusDictionary,h as useIframeClickInterceptor,g as useIframeClickMerger};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"@intlayer/config/built";import{EditorStateManager as t,defineIntlayerElements as n}from"@intlayer/editor";const{editor:r}=e??{},i=()=>({allowedOrigins:[r?.applicationURL,r?.editorURL,r?.cmsURL].filter(Boolean),postMessageFn:(e,t)=>{typeof window>`u`||window.self!==window.top&&(window.parent?.postMessage(e,t),window.postMessage(e,t))}});let a=null;const o=r=>{if(a)return;let o=new t({mode:`client`,messenger:i(),configuration:e});a=o,n(),o.start()},s=()=>a;export{s as getEditorStateManager,o as installIntlayerEditor};
|
|
2
2
|
//# sourceMappingURL=installIntlayerEditor.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installIntlayerEditor.mjs","names":[],"sources":["../../../src/editor/installIntlayerEditor.ts"],"sourcesContent":["import type { Injector } from '@angular/core';\nimport configuration from '@intlayer/config/built';\nimport {
|
|
1
|
+
{"version":3,"file":"installIntlayerEditor.mjs","names":[],"sources":["../../../src/editor/installIntlayerEditor.ts"],"sourcesContent":["import type { Injector } from '@angular/core';\nimport configuration from '@intlayer/config/built';\nimport {\n defineIntlayerElements,\n EditorStateManager,\n type MessengerConfig,\n} from '@intlayer/editor';\n\nconst { editor } = configuration ?? {};\n\nconst buildDefaultMessengerConfig = (): MessengerConfig => ({\n allowedOrigins: [\n editor?.applicationURL,\n editor?.editorURL,\n editor?.cmsURL,\n ].filter(Boolean) as string[],\n postMessageFn: (payload, origin) => {\n if (typeof window === 'undefined') return;\n const isInIframe = window.self !== window.top;\n if (!isInIframe) return;\n window.parent?.postMessage(payload, origin);\n window.postMessage(payload, origin);\n },\n});\n\nlet globalManager: EditorStateManager | null = null;\n\nexport const installIntlayerEditor = (_injector: Injector): void => {\n if (globalManager) return;\n\n const manager = new EditorStateManager({\n mode: 'client',\n messenger: buildDefaultMessengerConfig(),\n configuration,\n });\n\n globalManager = manager;\n defineIntlayerElements();\n manager.start();\n};\n\nexport const getEditorStateManager = (): EditorStateManager | null =>\n globalManager;\n"],"mappings":"wHAQA,KAAM,CAAE,UAAW,GAAiB,EAAE,CAEhC,OAAsD,CAC1D,eAAgB,CACd,GAAQ,eACR,GAAQ,UACR,GAAQ,OACT,CAAC,OAAO,QAAQ,CACjB,eAAgB,EAAS,IAAW,CAC9B,OAAO,OAAW,KACH,OAAO,OAAS,OAAO,MAE1C,OAAO,QAAQ,YAAY,EAAS,EAAO,CAC3C,OAAO,YAAY,EAAS,EAAO,GAEtC,EAED,IAAI,EAA2C,KAE/C,MAAa,EAAyB,GAA8B,CAClE,GAAI,EAAe,OAEnB,IAAM,EAAU,IAAI,EAAmB,CACrC,KAAM,SACN,UAAW,GAA6B,CACxC,gBACD,CAAC,CAEF,EAAgB,EAChB,GAAwB,CACxB,EAAQ,OAAO,EAGJ,MACX"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{getEditorStateManager as e}from"./installIntlayerEditor.mjs";import{DestroyRef as t,inject as n}from"@angular/core";const r=(r,i)=>{let a=e();if(i&&a){let e=a.messenger.subscribe(r,i);try{n(t,{optional:!0})?.onDestroy(e)}catch{}}return e=>a?.messenger.send(r,e)};export{r as useCrossFrameMessageListener};
|
|
2
2
|
//# sourceMappingURL=useCrossFrameMessageListener.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCrossFrameMessageListener.mjs","names":[],"sources":["../../../src/editor/useCrossFrameMessageListener.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"useCrossFrameMessageListener.mjs","names":[],"sources":["../../../src/editor/useCrossFrameMessageListener.ts"],"sourcesContent":["import { DestroyRef, inject } from '@angular/core';\nimport type { MessageKey } from '@intlayer/editor';\nimport { getEditorStateManager } from './installIntlayerEditor';\n\nexport const useCrossFrameMessageListener = <S>(\n key: `${MessageKey}` | `${MessageKey}/post` | `${MessageKey}/get`,\n onEventTriggered?: (data: S) => void\n) => {\n const manager = getEditorStateManager();\n\n if (onEventTriggered && manager) {\n const unsub = manager.messenger.subscribe(\n key,\n onEventTriggered as (data: unknown) => void\n );\n\n try {\n const destroyRef = inject(DestroyRef, { optional: true });\n destroyRef?.onDestroy(unsub);\n } catch {}\n }\n\n return (data?: S) => manager?.messenger.send(key, data);\n};\n"],"mappings":"2HAIA,MAAa,GACX,EACA,IACG,CACH,IAAM,EAAU,GAAuB,CAEvC,GAAI,GAAoB,EAAS,CAC/B,IAAM,EAAQ,EAAQ,UAAU,UAC9B,EACA,EACD,CAED,GAAI,CACiB,EAAO,EAAY,CAAE,SAAU,GAAM,CAAC,EAC7C,UAAU,EAAM,MACtB,GAGV,MAAQ,IAAa,GAAS,UAAU,KAAK,EAAK,EAAK"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{getEditorStateManager as e}from"./installIntlayerEditor.mjs";import{DestroyRef as t,inject as n,signal as r}from"@angular/core";import{CrossFrameStateManager as i}from"@intlayer/editor";const a=(a,o,s={emit:!0,receive:!0})=>{let c=e(),{emit:l=!0,receive:u=!0}=s,d=r(o);if(c){let e=new i(a,c.messenger,{emit:l,receive:u,initialValue:o});e.start();let r=e=>{d.set(e.detail)};e.addEventListener(`change`,r);try{n(t,{optional:!0})?.onDestroy(()=>{e.removeEventListener(`change`,r),e.stop()})}catch{}return[d.asReadonly(),t=>e.set(t),()=>e.postCurrentValue()]}return[d.asReadonly(),e=>d.set(e),()=>{}]};export{a as useCrossFrameState};
|
|
2
2
|
//# sourceMappingURL=useCrossFrameState.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCrossFrameState.mjs","names":[],"sources":["../../../src/editor/useCrossFrameState.ts"],"sourcesContent":["import { type Signal, signal } from '@angular/core';\nimport type
|
|
1
|
+
{"version":3,"file":"useCrossFrameState.mjs","names":[],"sources":["../../../src/editor/useCrossFrameState.ts"],"sourcesContent":["import { DestroyRef, inject, type Signal, signal } from '@angular/core';\nimport { CrossFrameStateManager, type MessageKey } from '@intlayer/editor';\nimport { getEditorStateManager } from './installIntlayerEditor';\n\nexport type CrossFrameStateOptions = {\n emit?: boolean;\n receive?: boolean;\n};\n\nexport const useCrossFrameState = <S>(\n key: `${MessageKey}`,\n initialState?: S,\n options: CrossFrameStateOptions = { emit: true, receive: true }\n): [Signal<S | undefined>, (value: S) => void, () => void] => {\n const manager = getEditorStateManager();\n const { emit = true, receive = true } = options;\n const stateSignal = signal<S | undefined>(initialState);\n\n if (manager) {\n const stateManager = new CrossFrameStateManager<S>(key, manager.messenger, {\n emit,\n receive,\n initialValue: initialState,\n });\n stateManager.start();\n\n const handler = (e: Event) => {\n stateSignal.set((e as CustomEvent<S>).detail);\n };\n stateManager.addEventListener('change', handler);\n\n try {\n const destroyRef = inject(DestroyRef, { optional: true });\n destroyRef?.onDestroy(() => {\n stateManager.removeEventListener('change', handler);\n stateManager.stop();\n });\n } catch {}\n\n const setState = (value: S) => stateManager.set(value);\n const postState = () => stateManager.postCurrentValue();\n\n return [stateSignal.asReadonly(), setState, postState];\n }\n\n return [\n stateSignal.asReadonly(),\n (value: S) => stateSignal.set(value),\n () => {},\n ];\n};\n"],"mappings":"iMASA,MAAa,GACX,EACA,EACA,EAAkC,CAAE,KAAM,GAAM,QAAS,GAAM,GACH,CAC5D,IAAM,EAAU,GAAuB,CACjC,CAAE,OAAO,GAAM,UAAU,IAAS,EAClC,EAAc,EAAsB,EAAa,CAEvD,GAAI,EAAS,CACX,IAAM,EAAe,IAAI,EAA0B,EAAK,EAAQ,UAAW,CACzE,OACA,UACA,aAAc,EACf,CAAC,CACF,EAAa,OAAO,CAEpB,IAAM,EAAW,GAAa,CAC5B,EAAY,IAAK,EAAqB,OAAO,EAE/C,EAAa,iBAAiB,SAAU,EAAQ,CAEhD,GAAI,CACiB,EAAO,EAAY,CAAE,SAAU,GAAM,CAAC,EAC7C,cAAgB,CAC1B,EAAa,oBAAoB,SAAU,EAAQ,CACnD,EAAa,MAAM,EACnB,MACI,EAKR,MAAO,CAAC,EAAY,YAAY,CAHd,GAAa,EAAa,IAAI,EAAM,KAC9B,EAAa,kBAAkB,CAED,CAGxD,MAAO,CACL,EAAY,YAAY,CACvB,GAAa,EAAY,IAAI,EAAM,KAC9B,GACP"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
const e=()=>{},t=()=>{};export{e as useCrossURLPathSetter,t as useCrossURLPathState};
|
|
2
2
|
//# sourceMappingURL=useCrossURLPathState.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCrossURLPathState.mjs","names":[],"sources":["../../../src/editor/useCrossURLPathState.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"useCrossURLPathState.mjs","names":[],"sources":["../../../src/editor/useCrossURLPathState.ts"],"sourcesContent":["// UrlStateManager is started by EditorStateManager.start() in client mode.\n// Nothing extra needed here.\nexport const useCrossURLPathSetter = () => {\n // No-op: managed by EditorStateManager\n};\n\nexport const useCrossURLPathState = () => {\n // No-op: managed by EditorStateManager\n};\n"],"mappings":"AAEA,MAAa,MAA8B,GAI9B,MAA6B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useEditorEnabled as e}from"./editorEnabled.mjs";import{useFocusDictionary as t}from"./focusDictionary.mjs";import{useDictionariesRecord as n}from"./dictionariesRecord.mjs";import{useEditorLocale as r}from"./editorLocale.mjs";import{useIframeClickMerger as i}from"./useIframeClickInterceptor.mjs";const a=()=>{e(),t(),i(),r(),n()};export{a as useEditor};
|
|
2
2
|
//# sourceMappingURL=useEditor.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEditor.mjs","names":[],"sources":["../../../src/editor/useEditor.ts"],"sourcesContent":["import { useConfiguration } from './configuration';\nimport {
|
|
1
|
+
{"version":3,"file":"useEditor.mjs","names":[],"sources":["../../../src/editor/useEditor.ts"],"sourcesContent":["import { useConfiguration } from './configuration';\nimport { useDictionariesRecord } from './dictionariesRecord';\nimport { useEditorEnabled } from './editorEnabled';\nimport { useEditorLocale } from './editorLocale';\nimport { useFocusDictionary } from './focusDictionary';\nimport { useIframeClickMerger } from './useIframeClickInterceptor';\n\nexport const useEditor = () => {\n useEditorEnabled();\n useFocusDictionary();\n useIframeClickMerger();\n useEditorLocale();\n useDictionariesRecord();\n};\n"],"mappings":"+SAOA,MAAa,MAAkB,CAC7B,GAAkB,CAClB,GAAoB,CACpB,GAAsB,CACtB,GAAiB,CACjB,GAAuB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useCrossFrameMessageListener as e}from"./useCrossFrameMessageListener.mjs";import{MessageKey as t,mergeIframeClick as n}from"@intlayer/editor";const r=()=>{e(t.INTLAYER_IFRAME_CLICKED)},i=()=>{e(t.INTLAYER_IFRAME_CLICKED,n)};export{r as useIframeClickInterceptor,i as useIframeClickMerger};
|
|
2
2
|
//# sourceMappingURL=useIframeClickInterceptor.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIframeClickInterceptor.mjs","names":[],"sources":["../../../src/editor/useIframeClickInterceptor.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"useIframeClickInterceptor.mjs","names":[],"sources":["../../../src/editor/useIframeClickInterceptor.ts"],"sourcesContent":["import { MessageKey, mergeIframeClick } from '@intlayer/editor';\nimport { useCrossFrameMessageListener } from './useCrossFrameMessageListener';\n\nexport const useIframeClickInterceptor = () => {\n useCrossFrameMessageListener<undefined>(MessageKey.INTLAYER_IFRAME_CLICKED);\n};\n\nexport const useIframeClickMerger = () => {\n useCrossFrameMessageListener<MessageEvent>(\n MessageKey.INTLAYER_IFRAME_CLICKED,\n mergeIframeClick\n );\n};\n"],"mappings":"sJAGA,MAAa,MAAkC,CAC7C,EAAwC,EAAW,wBAAwB,EAGhE,MAA6B,CACxC,EACE,EAAW,wBACX,EACD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
|
+
import { Locale } from "../intlayer/dist/types/index.js";
|
|
2
3
|
import * as _angular_core0 from "@angular/core";
|
|
3
4
|
import { DictionaryKeys, LocalesValues, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
|
|
4
5
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
5
6
|
import * as _intlayer_core_interpreter0 from "@intlayer/core/interpreter";
|
|
6
|
-
import * as _intlayer_types_allLocales0 from "@intlayer/types/allLocales";
|
|
7
7
|
|
|
8
8
|
//#region src/client/useDictionaryDynamic.d.ts
|
|
9
9
|
/**
|
|
@@ -11,7 +11,7 @@ import * as _intlayer_types_allLocales0 from "@intlayer/types/allLocales";
|
|
|
11
11
|
*
|
|
12
12
|
* If the locale is not provided, it will use the locale from the client context
|
|
13
13
|
*/
|
|
14
|
-
declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => _angular_core0.Signal<_intlayer_core_interpreter0.DeepTransformContent<T["content"], IInterpreterPluginState$1,
|
|
14
|
+
declare const useDictionaryDynamic: <T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: K, locale?: LocalesValues) => _angular_core0.Signal<_intlayer_core_interpreter0.DeepTransformContent<T["content"], IInterpreterPluginState$1, Locale>>;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { useDictionaryDynamic };
|
|
17
17
|
//# sourceMappingURL=useDictionaryDynamic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/client/useDictionaryDynamic.ts"],"mappings":";;;;;;;;;;;;;cAea,oBAAA,aACD,UAAA,YACA,cAAA,EAEV,iBAAA,EAAmB,mBAAA,OAA0B,OAAA,CAAQ,CAAA,IACrD,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,aAAA,KAAa,cAAA,CAAA,MAAA,CAAA,2BAAA,CAAA,oBAAA,CAAA,CAAA,aAAA,yBAAA,EAAA,
|
|
1
|
+
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../src/client/useDictionaryDynamic.ts"],"mappings":";;;;;;;;;;;;;cAea,oBAAA,aACD,UAAA,YACA,cAAA,EAEV,iBAAA,EAAmB,mBAAA,OAA0B,OAAA,CAAQ,CAAA,IACrD,GAAA,EAAK,CAAA,EACL,MAAA,GAAS,aAAA,KAAa,cAAA,CAAA,MAAA,CAAA,2BAAA,CAAA,oBAAA,CAAA,CAAA,aAAA,yBAAA,EAAA,MAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Locale } from "../intlayer/dist/types/index.js";
|
|
1
2
|
import * as _angular_core0 from "@angular/core";
|
|
2
3
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
3
|
-
import * as _intlayer_types_allLocales0 from "@intlayer/types/allLocales";
|
|
4
4
|
|
|
5
5
|
//#region src/client/useLocale.d.ts
|
|
6
6
|
type useLocaleProps = {
|
|
@@ -39,8 +39,8 @@ declare const useLocale: ({
|
|
|
39
39
|
onLocaleChange
|
|
40
40
|
}?: useLocaleProps) => {
|
|
41
41
|
locale: _angular_core0.Signal<"af" | "af-ZA" | "sq" | "sq-AL" | "am" | "am-ET" | "ar" | "ar-DZ" | "ar-BH" | "ar-TD" | "ar-KM" | "ar-DJ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MR" | "ar-MA" | "ar-OM" | "ar-PS" | "ar-QA" | "ar-SA" | "ar-SO" | "ar-SD" | "ar-SY" | "ar-TN" | "ar-AE" | "ar-YE" | "hy" | "hy-AM" | "az" | "az-AZ" | "eu" | "eu-ES" | "be" | "be-BY" | "bn" | "bn-BD" | "bn-IN" | "bn-MM" | "bs" | "bs-BA" | "bg" | "bg-BG" | "my" | "my-MM" | "ca" | "ca-ES" | "zh" | "zh-HK" | "zh-MO" | "zh-Hans" | "zh-CN" | "zh-SG" | "zh-TW" | "zh-Hant" | "hr" | "hr-BA" | "hr-HR" | "cs" | "cs-CZ" | "da" | "da-DK" | "dv" | "dv-MV" | "nl" | "nl-BE" | "nl-NL" | "en" | "en-AU" | "en-BZ" | "en-BW" | "en-CA" | "en-CB" | "en-GH" | "en-HK" | "en-IN" | "en-IE" | "en-JM" | "en-KE" | "en-MY" | "en-NZ" | "en-NG" | "en-PK" | "en-PH" | "en-SG" | "en-ZA" | "en-TZ" | "en-TT" | "en-UG" | "en-GB" | "en-US" | "en-ZW" | "eo" | "et" | "et-EE" | "fo" | "fo-FO" | "fa" | "fa-IR" | "fi" | "fi-FI" | "fr" | "fr-BE" | "fr-CA" | "fr-FR" | "fr-LU" | "fr-MC" | "fr-CH" | "mk" | "mk-MK" | "gl" | "gl-ES" | "ka" | "ka-GE" | "de" | "de-AT" | "de-DE" | "de-LI" | "de-LU" | "de-CH" | "el" | "el-GR" | "gu" | "gu-IN" | "he" | "he-IL" | "hi" | "hi-IN" | "hu" | "hu-HU" | "is" | "is-IS" | "id" | "id-ID" | "ga" | "ga-IE" | "it" | "it-IT" | "it-CH" | "ja" | "ja-JP" | "kn" | "kn-IN" | "kk" | "kk-KZ" | "km" | "km-KH" | "kok" | "kok-IN" | "ko" | "ko-KR" | "ku" | "ku-TR" | "ky" | "ky-KG" | "lo" | "lo-LA" | "lv" | "lv-LV" | "lt" | "lt-LT" | "dsb" | "dsb-DE" | "mg-MG" | "ms" | "ml" | "ml-IN" | "ms-BN" | "ms-MY" | "mt" | "mt-MT" | "mi" | "mi-NZ" | "mr" | "mr-IN" | "mn" | "mn-MN" | "ne" | "ne-NP" | "ns" | "ns-ZA" | "no" | "nb" | "nb-NO" | "nn" | "nn-NO" | "ps" | "ps-AR" | "pl" | "pl-PL" | "pt" | "pt-BR" | "pt-CV" | "pt-GW" | "pt-MO" | "pt-MZ" | "pt-PT" | "pt-ST" | "pt-TL" | "pa" | "pa-IN" | "qu" | "qu-BO" | "qu-EC" | "qu-PE" | "ro" | "ro-MD" | "ro-RO" | "rm" | "rm-CH" | "ru" | "ru-MD" | "ru-RU" | "se" | "se-FI" | "se-NO" | "se-SE" | "sa" | "sa-IN" | "gd" | "gd-GB" | "sr-Cyrl" | "sr-BA" | "sr-RS" | "sr" | "sr-SP" | "si" | "si-LK" | "sk" | "sk-SK" | "sl" | "sl-SI" | "es" | "es-AR" | "es-BO" | "es-CL" | "es-CO" | "es-CR" | "es-CU" | "es-DO" | "es-EC" | "es-SV" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PY" | "es-PE" | "es-PR" | "es-ES" | "es-US" | "es-UY" | "es-VE" | "sw" | "sw-KE" | "sv" | "sv-FI" | "sv-SE" | "syr" | "syr-SY" | "tl" | "tl-PH" | "ta" | "ta-IN" | "tt" | "tt-RU" | "te" | "te-IN" | "th" | "th-TH" | "ts" | "tn" | "tn-ZA" | "tr" | "tr-TR" | "uk" | "uk-UA" | "hsb" | "hsb-DE" | "ur" | "ur-PK" | "uz" | "uz-UZ" | "ve" | "ve-ZA" | "vi" | "vi-VN" | "cy" | "cy-GB" | "xh" | "xh-ZA" | "yi" | "yi-001" | "yo" | "yo-NG" | "zu" | "zu-ZA" | (string & {})>;
|
|
42
|
-
defaultLocale:
|
|
43
|
-
availableLocales:
|
|
42
|
+
defaultLocale: Locale;
|
|
43
|
+
availableLocales: Locale[];
|
|
44
44
|
setLocale: (newLocale: LocalesValues) => void;
|
|
45
45
|
};
|
|
46
46
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Locale } from "../intlayer/dist/types/index.js";
|
|
1
2
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
|
-
import * as _intlayer_types_allLocales0 from "@intlayer/types/allLocales";
|
|
3
3
|
|
|
4
4
|
//#region src/client/useLocaleStorage.d.ts
|
|
5
5
|
/**
|
|
@@ -8,13 +8,13 @@ import * as _intlayer_types_allLocales0 from "@intlayer/types/allLocales";
|
|
|
8
8
|
/**
|
|
9
9
|
* Get the locale cookie
|
|
10
10
|
*/
|
|
11
|
-
declare const localeInStorage:
|
|
11
|
+
declare const localeInStorage: Locale;
|
|
12
12
|
/**
|
|
13
13
|
* @deprecated Use localeInStorage instead
|
|
14
14
|
*
|
|
15
15
|
* Get the locale cookie
|
|
16
16
|
*/
|
|
17
|
-
declare const localeCookie:
|
|
17
|
+
declare const localeCookie: Locale;
|
|
18
18
|
/**
|
|
19
19
|
* Set the locale cookie
|
|
20
20
|
*/
|
|
@@ -29,7 +29,7 @@ declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled: boolean)
|
|
|
29
29
|
* Hook that provides the locale storage and a function to set it
|
|
30
30
|
*/
|
|
31
31
|
declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
32
|
-
getLocale: () =>
|
|
32
|
+
getLocale: () => Locale;
|
|
33
33
|
setLocale: (locale: LocalesValues) => void;
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
@@ -40,7 +40,7 @@ declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
|
40
40
|
* Hook that provides the locale cookie and a function to set it
|
|
41
41
|
*/
|
|
42
42
|
declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
|
|
43
|
-
localeCookie:
|
|
43
|
+
localeCookie: Locale;
|
|
44
44
|
setLocaleCookie: (locale: LocalesValues) => void;
|
|
45
45
|
};
|
|
46
46
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":";;;;;;;AAcA;;;AAAA,cAAa,eAAA,EAA4D,
|
|
1
|
+
{"version":3,"file":"useLocaleStorage.d.ts","names":[],"sources":["../../../src/client/useLocaleStorage.ts"],"mappings":";;;;;;;AAcA;;;AAAA,cAAa,eAAA,EAA4D,MAAA;;AAMzE;;;;cAAa,YAAA,EAA8B,MAAA;AAK3C;;;AAAA,cAAa,kBAAA,GACX,MAAA,EAAQ,aAAA,EACR,eAAA;;;;;;cAYW,eAAA,GAAe,MAAA,EAblB,aAAA,EAAa,eAAA;;;;cAkBV,gBAAA,GAAoB,eAAA;mBAI7B,MAAA;sBAAA,aAAA;AAAA;;AAJJ;;;;;;cAaa,eAAA,GAAmB,eAAA;gBAO/B,MAAA;4BAAA,aAAA;AAAA"}
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
import * as _angular_core0 from "@angular/core";
|
|
2
|
-
import {
|
|
2
|
+
import { OnInit } from "@angular/core";
|
|
3
3
|
|
|
4
4
|
//#region src/editor/ContentSelectorWrapper.component.d.ts
|
|
5
|
-
|
|
6
|
-
* Combine your NodeProps (which include dictionaryKey & keyPath)
|
|
7
|
-
* with any other div-like attributes.
|
|
8
|
-
*/
|
|
9
|
-
interface ContentSelectorWrapperProps extends NodeProps {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
}
|
|
12
|
-
declare class ContentSelectorWrapperComponent {
|
|
5
|
+
declare class ContentSelectorWrapperComponent implements OnInit {
|
|
13
6
|
dictionaryKey: string;
|
|
14
7
|
keyPath: any[];
|
|
15
8
|
private focusDictionary;
|
|
16
9
|
private editorEnabled;
|
|
17
|
-
|
|
10
|
+
private manager;
|
|
11
|
+
ngOnInit(): void;
|
|
12
|
+
get filteredKeyPath(): any[];
|
|
18
13
|
isSelected: _angular_core0.Signal<boolean>;
|
|
19
14
|
enabled: _angular_core0.Signal<boolean>;
|
|
20
|
-
|
|
15
|
+
handlePress(): void;
|
|
16
|
+
handleHover(): void;
|
|
17
|
+
handleUnhover(): void;
|
|
21
18
|
}
|
|
22
19
|
//#endregion
|
|
23
|
-
export { ContentSelectorWrapperComponent
|
|
20
|
+
export { ContentSelectorWrapperComponent };
|
|
24
21
|
//# sourceMappingURL=ContentSelectorWrapper.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentSelectorWrapper.component.d.ts","names":[],"sources":["../../../src/editor/ContentSelectorWrapper.component.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentSelectorWrapper.component.d.ts","names":[],"sources":["../../../src/editor/ContentSelectorWrapper.component.ts"],"mappings":";;;;cA+Ba,+BAAA,YAA2C,MAAA;EAC7C,aAAA;EACA,OAAA;EAAA,QAED,eAAA;EAAA,QACA,aAAA;EAAA,QACA,OAAA;EAER,QAAA,CAAA;EAAA,IAII,eAAA,CAAA;EAIJ,UAAA,EAhB2C,cAAA,CAgBjC,MAAA;EASV,OAAA,EATU,cAAA,CASH,MAAA;EAEP,WAAA,CAAA;EAOA,WAAA,CAAA;EAOA,aAAA,CAAA;AAAA"}
|
|
@@ -1,32 +1,8 @@
|
|
|
1
|
-
import { Injector } from "@angular/core";
|
|
2
|
-
|
|
3
1
|
//#region src/editor/communicator.d.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
type Communicator = {
|
|
8
|
-
postMessage: typeof window.postMessage;
|
|
9
|
-
allowedOrigins?: string[];
|
|
2
|
+
declare const useCommunicator: () => {
|
|
3
|
+
postMessage: (data: any) => void;
|
|
10
4
|
senderId: string;
|
|
11
5
|
};
|
|
12
|
-
/**
|
|
13
|
-
* Configuration options for the communicator
|
|
14
|
-
*/
|
|
15
|
-
type CommunicatorOptions = Omit<Communicator, 'senderId'>;
|
|
16
|
-
/**
|
|
17
|
-
* Creates a communicator client
|
|
18
|
-
* @param options - Options for configuring the communicator
|
|
19
|
-
*/
|
|
20
|
-
declare const createCommunicator: (options?: CommunicatorOptions) => Communicator;
|
|
21
|
-
/**
|
|
22
|
-
* Helper to install the Intlayer communicator into the injector
|
|
23
|
-
*/
|
|
24
|
-
declare const installCommunicator: (_injector: Injector, options?: CommunicatorOptions) => void;
|
|
25
|
-
/**
|
|
26
|
-
* Hook to access the communicator
|
|
27
|
-
* @returns The communicator instance
|
|
28
|
-
*/
|
|
29
|
-
declare const useCommunicator: () => Communicator;
|
|
30
6
|
//#endregion
|
|
31
|
-
export {
|
|
7
|
+
export { useCommunicator };
|
|
32
8
|
//# sourceMappingURL=communicator.d.ts.map
|