@toototech/webbuilder-plugins 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -0
- package/README.md +3 -0
- package/dist/basic/cssScope.d.ts +3 -0
- package/dist/basic/index.d.ts +81 -0
- package/dist/basic/injectStyle.d.ts +20 -0
- package/dist/basic/plugin.d.ts +19 -0
- package/dist/basic/publisher.d.ts +4 -0
- package/dist/basic/registries/interactive/accordion/index.d.ts +3 -0
- package/dist/basic/registries/interactive/backButton/index.d.ts +3 -0
- package/dist/basic/registries/interactive/button/index.d.ts +10 -0
- package/dist/basic/registries/interactive/countUp/index.d.ts +9 -0
- package/dist/basic/registries/interactive/customCode/index.d.ts +3 -0
- package/dist/basic/registries/interactive/index.d.ts +2 -0
- package/dist/basic/registries/interactive/inquiryForm/index.d.ts +3 -0
- package/dist/basic/registries/interactive/klaviyoSubscribe/index.d.ts +3 -0
- package/dist/basic/registries/interactive/popup/index.d.ts +5 -0
- package/dist/basic/registries/interactive/salesmartlyChatButton/index.d.ts +10 -0
- package/dist/basic/registries/interactive/search/index.d.ts +10 -0
- package/dist/basic/registries/interactive/socialShare/index.d.ts +33 -0
- package/dist/basic/registries/interactive/tabs/index.d.ts +3 -0
- package/dist/basic/registries/layout/container/index.d.ts +19 -0
- package/dist/basic/registries/layout/divider/index.d.ts +7 -0
- package/dist/basic/registries/layout/grid/index.d.ts +11 -0
- package/dist/basic/registries/layout/index.d.ts +2 -0
- package/dist/basic/registries/layout/layoutBase/index.d.ts +10 -0
- package/dist/basic/registries/layout/section/index.d.ts +3 -0
- package/dist/basic/registries/layout/sectionGridBlock/index.d.ts +3 -0
- package/dist/basic/registries/layout/spacer/index.d.ts +7 -0
- package/dist/basic/registries/media/banner/index.d.ts +11 -0
- package/dist/basic/registries/media/carousel/index.d.ts +6 -0
- package/dist/basic/registries/media/flipbook/index.d.ts +5 -0
- package/dist/basic/registries/media/icon/index.d.ts +3 -0
- package/dist/basic/registries/media/image/index.d.ts +3 -0
- package/dist/basic/registries/media/index.d.ts +2 -0
- package/dist/basic/registries/media/industryTabs/index.d.ts +3 -0
- package/dist/basic/registries/media/marquee/index.d.ts +4 -0
- package/dist/basic/registries/media/ourSolutions/helpers.d.ts +289 -0
- package/dist/basic/registries/media/ourSolutions/index.d.ts +4 -0
- package/dist/basic/registries/media/ourSolutions/script.d.ts +1 -0
- package/dist/basic/registries/media/ourSolutions/style.d.ts +1 -0
- package/dist/basic/registries/media/pdfViewer/index.d.ts +3 -0
- package/dist/basic/registries/media/productCategories/index.d.ts +4 -0
- package/dist/basic/registries/media/tabMediaGallery/index.d.ts +3 -0
- package/dist/basic/registries/media/video/index.d.ts +12 -0
- package/dist/basic/registries/navigation/footer/index.d.ts +10 -0
- package/dist/basic/registries/navigation/index.d.ts +2 -0
- package/dist/basic/registries/navigation/languageSwitcher/index.d.ts +6 -0
- package/dist/basic/registries/navigation/logo/index.d.ts +9 -0
- package/dist/basic/registries/navigation/navbar/constants.d.ts +38 -0
- package/dist/basic/registries/navigation/navbar/factories.d.ts +848 -0
- package/dist/basic/registries/navigation/navbar/helpers.d.ts +12 -0
- package/dist/basic/registries/navigation/navbar/index.d.ts +4 -0
- package/dist/basic/registries/navigation/navbar/registerMegaTypes.d.ts +2 -0
- package/dist/basic/registries/navigation/navbar/registerMenuTypes.d.ts +2 -0
- package/dist/basic/registries/navigation/navbar/registerRootTypes.d.ts +2 -0
- package/dist/basic/registries/navigation/navbar/script.d.ts +1 -0
- package/dist/basic/registries/navigation/navbar/style.d.ts +1 -0
- package/dist/basic/registries/navigation/socialLinks/index.d.ts +3 -0
- package/dist/basic/registries/section/allApplications/index.d.ts +3 -0
- package/dist/basic/registries/section/cardCarouselSection/index.d.ts +3 -0
- package/dist/basic/registries/section/caseSpotlight/index.d.ts +3 -0
- package/dist/basic/registries/section/companyScale/index.d.ts +3 -0
- package/dist/basic/registries/section/customizationGrid/index.d.ts +3 -0
- package/dist/basic/registries/section/factoryMap/index.d.ts +3 -0
- package/dist/basic/registries/section/focaHistoryTimeline/index.d.ts +3 -0
- package/dist/basic/registries/section/historyTimeline/index.d.ts +3 -0
- package/dist/basic/registries/section/homeBannerCarousel/index.d.ts +4 -0
- package/dist/basic/registries/section/hotspotShowcase/index.d.ts +30 -0
- package/dist/basic/registries/section/index.d.ts +2 -0
- package/dist/basic/registries/section/map/index.d.ts +4 -0
- package/dist/basic/registries/section/milestoneCardStrip/index.d.ts +3 -0
- package/dist/basic/registries/section/moreCardCarousel/index.d.ts +3 -0
- package/dist/basic/registries/section/ourAdvantages/index.d.ts +4 -0
- package/dist/basic/registries/section/overviewSplit/index.d.ts +3 -0
- package/dist/basic/registries/section/processTimeline/index.d.ts +3 -0
- package/dist/basic/registries/section/productCardStrip/index.d.ts +3 -0
- package/dist/basic/registries/section/resourceSection/index.d.ts +6 -0
- package/dist/basic/registries/section/responsiveHeroCarousel/index.d.ts +4 -0
- package/dist/basic/registries/section/serviceIconGrid/index.d.ts +4 -0
- package/dist/basic/registries/section/servicesCarousel/index.d.ts +4 -0
- package/dist/basic/registries/section/servicesShowcase/index.d.ts +4 -0
- package/dist/basic/registries/section/servicesThb/index.d.ts +4 -0
- package/dist/basic/registries/section/solutionList/index.d.ts +4 -0
- package/dist/basic/registries/section/staticPinMap/index.d.ts +4 -0
- package/dist/basic/registries/section/statsCards/index.d.ts +3 -0
- package/dist/basic/registries/section/swiperRuntime.d.ts +3 -0
- package/dist/basic/registries/shared/sharedTraits.d.ts +37 -0
- package/dist/basic/registries/types.d.ts +5 -0
- package/dist/basic/registries/typography/heading/index.d.ts +8 -0
- package/dist/basic/registries/typography/index.d.ts +2 -0
- package/dist/basic/registries/typography/textEditor/index.d.ts +6 -0
- package/dist/basic/registryManifest.d.ts +9 -0
- package/dist/basic/styleHelpers.d.ts +29 -0
- package/dist/basic/svgIcon.d.ts +11 -0
- package/dist/basic/traitBridge.d.ts +20 -0
- package/dist/basic/traitFactory.d.ts +106 -0
- package/dist/basic.js +1146 -0
- package/dist/cms/cmsFactory.d.ts +164 -0
- package/dist/cms/dynamicRenderPipeline.d.ts +12 -0
- package/dist/cms/index.d.ts +31 -0
- package/dist/cms/plugin.d.ts +12 -0
- package/dist/cms/publisher.d.ts +7 -0
- package/dist/cms/registries/dynamic/cms/constants.d.ts +16 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/bindings.d.ts +78 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/breadcrumbBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/conditionalBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/datetimeBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/htmlBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/imageBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/linkBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/seoBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/textBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/blocks/tocBlock.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/constants.d.ts +19 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/helpers.d.ts +52 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/registerBlock.d.ts +57 -0
- package/dist/cms/registries/dynamic/cms/dynamicField/styles.d.ts +7 -0
- package/dist/cms/registries/dynamic/cms/media/previewMediaTrait.d.ts +7 -0
- package/dist/cms/registries/dynamic/cms/menu/siteMenuAttrs.d.ts +11 -0
- package/dist/cms/registries/dynamic/cms/menuTree/menuTreeAttrs.d.ts +8 -0
- package/dist/cms/registries/dynamic/cms/post/styles.d.ts +6 -0
- package/dist/cms/registries/dynamic/cms/product/detail.styles.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/product/detailV2.styles.d.ts +1 -0
- package/dist/cms/registries/dynamic/cms/product/previewProductTrait.d.ts +6 -0
- package/dist/cms/registries/dynamic/cms/product/styles.d.ts +6 -0
- package/dist/cms/registries/dynamic/dataProvider.d.ts +45 -0
- package/dist/cms/registries/dynamic/loopGrid/paginationStyles.d.ts +5 -0
- package/dist/cms/registries/dynamic/loopGrid/preview.d.ts +16 -0
- package/dist/cms/registries/dynamic/loopGrid/publisher.d.ts +3 -0
- package/dist/cms/registries/dynamic/loopGrid/types.d.ts +97 -0
- package/dist/cms/registries/navigation/navbarThb/index.d.ts +3 -0
- package/dist/cms/registries/navigation/navbarThb/script.d.ts +1 -0
- package/dist/cms/registries/navigation/navbarThb/style.d.ts +1 -0
- package/dist/cms.js +4535 -0
- package/dist/global-settings/components/FontFamilySelect.vue.d.ts +29 -0
- package/dist/global-settings/components/FontManagerPanel.vue.d.ts +37 -0
- package/dist/global-settings/index.d.ts +8 -0
- package/dist/global-settings/plugin.d.ts +3 -0
- package/dist/global-settings/publisher.d.ts +15 -0
- package/dist/global-settings/runtime/canvasInjection.d.ts +13 -0
- package/dist/global-settings/runtime/panelDraftSave.d.ts +17 -0
- package/dist/global-settings/runtime/settingsSource.d.ts +4 -0
- package/dist/global-settings/useFontManager.d.ts +38 -0
- package/dist/global-settings/useGoogleFonts.d.ts +20 -0
- package/dist/global-settings/vue.d.ts +1 -0
- package/dist/global-settings.js +66 -0
- package/dist/i18n/I18nPanel.vue.d.ts +23 -0
- package/dist/i18n/i18n.d.ts +25 -0
- package/dist/i18n/index.d.ts +7 -0
- package/dist/i18n/languageOrder.d.ts +9 -0
- package/dist/i18n/plugin.d.ts +21 -0
- package/dist/i18n/types.d.ts +101 -0
- package/dist/i18n/useWebBuilderI18n.d.ts +164 -0
- package/dist/i18n/vue.d.ts +1 -0
- package/dist/i18n-BYR3l48y.js +959 -0
- package/dist/i18n.js +929 -0
- package/dist/index-CxJlLwvG.js +35378 -0
- package/dist/index-DWfJ4PBm.js +5724 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +12 -0
- package/dist/layout-template/components/LayoutPanel.vue.d.ts +37 -0
- package/dist/layout-template/components/TemplateRulesPanel.vue.d.ts +41 -0
- package/dist/layout-template/config/layoutSharedResources.d.ts +9 -0
- package/dist/layout-template/config/templateSharedResources.d.ts +28 -0
- package/dist/layout-template/index.d.ts +9 -0
- package/dist/layout-template/plugin.d.ts +13 -0
- package/dist/layout-template/runtime/storageAdapter.d.ts +49 -0
- package/dist/layout-template/utils/layoutProjectData.d.ts +15 -0
- package/dist/layout-template/utils/layoutRulePages.d.ts +19 -0
- package/dist/layout-template/utils/layoutSettings.d.ts +45 -0
- package/dist/layout-template/utils/templateRules.d.ts +52 -0
- package/dist/layout-template/vue.d.ts +2 -0
- package/dist/layout-template.js +435 -0
- package/dist/layoutSettings-D4SYUMri.js +252 -0
- package/dist/plugin-BPA8qlaC.js +40 -0
- package/dist/plugin-C0PrxrIe.js +228 -0
- package/dist/plugin-DQshk1sY.js +361 -0
- package/dist/plugin-DebyCjXx.js +191 -0
- package/dist/plugin-Dr6TOtyH.js +73 -0
- package/dist/publisher/index.d.ts +5 -0
- package/dist/publisher/publisherAssets.d.ts +9 -0
- package/dist/publisher/publisherComponents.d.ts +7 -0
- package/dist/publisher/publisherPlugins.d.ts +12 -0
- package/dist/publisher-C6VWXq8u.js +25 -0
- package/dist/publisher.js +1711 -0
- package/dist/solar-BsElUqfQ.js +29843 -0
- package/dist/style.css +1181 -0
- package/dist/templateSharedResources-D1u7eFIs.js +89 -0
- package/dist/types-DNbok59z.js +2359 -0
- package/dist/useFontManager-CdrLq1eG.js +336 -0
- package/dist/vue.d.ts +3 -0
- package/dist/vue.js +2171 -0
- package/package.json +77 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
interface FontSelectPayload {
|
|
2
|
+
value: string;
|
|
3
|
+
source: 'installed' | 'system' | 'google';
|
|
4
|
+
family?: string;
|
|
5
|
+
googleName?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
8
|
+
modelValue: string;
|
|
9
|
+
grapes?: any;
|
|
10
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (value: string) => void;
|
|
12
|
+
select: (payload: FontSelectPayload) => void;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
14
|
+
modelValue: string;
|
|
15
|
+
grapes?: any;
|
|
16
|
+
}>>> & Readonly<{
|
|
17
|
+
onSelect?: ((payload: FontSelectPayload) => any) | undefined;
|
|
18
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
22
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
23
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
24
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
25
|
+
} : {
|
|
26
|
+
type: import('vue').PropType<T[K]>;
|
|
27
|
+
required: true;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { HostUi } from '@toototech/webbuilder/core';
|
|
2
|
+
type FontDelivery = 'remote' | 'local';
|
|
3
|
+
interface FontSelectPayload {
|
|
4
|
+
value: string;
|
|
5
|
+
source: 'installed' | 'system' | 'google';
|
|
6
|
+
family?: string;
|
|
7
|
+
googleName?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
+
grapes?: any;
|
|
11
|
+
hostUi?: Pick<HostUi, "confirm"> | undefined;
|
|
12
|
+
globalFontFamily: string;
|
|
13
|
+
fontDelivery: FontDelivery;
|
|
14
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
"select-global-font": (payload: FontSelectPayload) => void;
|
|
16
|
+
"reset-global-font": () => void;
|
|
17
|
+
"update:font-delivery": (value: FontDelivery) => void;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
19
|
+
grapes?: any;
|
|
20
|
+
hostUi?: Pick<HostUi, "confirm"> | undefined;
|
|
21
|
+
globalFontFamily: string;
|
|
22
|
+
fontDelivery: FontDelivery;
|
|
23
|
+
}>>> & Readonly<{
|
|
24
|
+
"onSelect-global-font"?: ((payload: FontSelectPayload) => any) | undefined;
|
|
25
|
+
"onReset-global-font"?: (() => any) | undefined;
|
|
26
|
+
"onUpdate:font-delivery"?: ((value: FontDelivery) => any) | undefined;
|
|
27
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
30
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
31
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
32
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
33
|
+
} : {
|
|
34
|
+
type: import('vue').PropType<T[K]>;
|
|
35
|
+
required: true;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './plugin.js';
|
|
2
|
+
export { createGlobalSettingsPlugin as globalSettings } from './plugin.js';
|
|
3
|
+
export * from './publisher.js';
|
|
4
|
+
export * from './runtime/canvasInjection.js';
|
|
5
|
+
export * from './runtime/panelDraftSave.js';
|
|
6
|
+
export * from './runtime/settingsSource.js';
|
|
7
|
+
export * from './useFontManager.js';
|
|
8
|
+
export * from './useGoogleFonts.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { GlobalSettingsSnapshot } from '@toototech/webbuilder/core';
|
|
2
|
+
export interface GlobalSettingsPublishedAssets {
|
|
3
|
+
css: string;
|
|
4
|
+
headHtml: string;
|
|
5
|
+
bodyStartHtml: string;
|
|
6
|
+
bodyEndHtml: string;
|
|
7
|
+
metadata: {
|
|
8
|
+
globalSettings: {
|
|
9
|
+
version?: string;
|
|
10
|
+
hash?: string;
|
|
11
|
+
updatedAt?: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare const renderGlobalSettingsPublishedAssets: (snapshot: GlobalSettingsSnapshot) => GlobalSettingsPublishedAssets;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { GlobalSettingsSnapshot } from '@toototech/webbuilder/core';
|
|
2
|
+
export declare const GLOBAL_SETTINGS_STYLE_IDS: {
|
|
3
|
+
readonly colors: "wb-global-colors";
|
|
4
|
+
readonly typography: "wb-global-font-family";
|
|
5
|
+
readonly customCss: "wb-global-custom-css";
|
|
6
|
+
};
|
|
7
|
+
declare const CUSTOM_CODE_POSITIONS: readonly ["head", "body-start", "body-end"];
|
|
8
|
+
export type GlobalSettingsCustomCodePosition = (typeof CUSTOM_CODE_POSITIONS)[number];
|
|
9
|
+
export declare const buildGlobalSettingsCss: (snapshot: GlobalSettingsSnapshot) => string;
|
|
10
|
+
export declare const getGlobalSettingsGoogleFontName: (snapshot: GlobalSettingsSnapshot) => string;
|
|
11
|
+
export declare const getEnabledGlobalCustomCode: (snapshot: GlobalSettingsSnapshot, position: GlobalSettingsCustomCodePosition) => string;
|
|
12
|
+
export declare const injectGlobalSettingsIntoDocument: (doc: Document, snapshot: GlobalSettingsSnapshot) => () => void;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { GlobalSettingsService, GlobalSettingsSnapshot, PageResourceIdentity, SettingsSource } from '@toototech/webbuilder/core';
|
|
2
|
+
export interface GlobalSettingsPanelCacheSnapshot {
|
|
3
|
+
colors: unknown[];
|
|
4
|
+
typography: unknown;
|
|
5
|
+
customCss: string;
|
|
6
|
+
customCode: unknown[];
|
|
7
|
+
}
|
|
8
|
+
export interface SaveGlobalSettingsPanelDraftOptions {
|
|
9
|
+
settings: SettingsSource;
|
|
10
|
+
service: GlobalSettingsService;
|
|
11
|
+
resource: PageResourceIdentity;
|
|
12
|
+
tenantId?: string | number | null;
|
|
13
|
+
sessionKey?: string;
|
|
14
|
+
cacheSnapshot: GlobalSettingsPanelCacheSnapshot;
|
|
15
|
+
}
|
|
16
|
+
export declare const buildGlobalSettingsPanelDraftSnapshot: (currentSnapshot: GlobalSettingsSnapshot | null, cacheSnapshot: GlobalSettingsPanelCacheSnapshot) => GlobalSettingsSnapshot;
|
|
17
|
+
export declare const saveGlobalSettingsPanelDraft: (options: SaveGlobalSettingsPanelDraftOptions) => Promise<GlobalSettingsSnapshot>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GlobalSettingsSnapshot, SettingsSource } from '@toototech/webbuilder/core';
|
|
2
|
+
export type { GlobalSettingsSnapshot, SettingsSource };
|
|
3
|
+
export declare const createMemoryGlobalSettingsSource: () => SettingsSource;
|
|
4
|
+
export declare const createGlobalSettingsSource: () => SettingsSource;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type GoogleFontItem } from './useGoogleFonts.js';
|
|
2
|
+
export interface InstalledFont {
|
|
3
|
+
family: string;
|
|
4
|
+
category: string;
|
|
5
|
+
cssFamily: string;
|
|
6
|
+
googleName: string;
|
|
7
|
+
variants: string[];
|
|
8
|
+
}
|
|
9
|
+
export declare function useFontManager(): {
|
|
10
|
+
installedFonts: import("vue").ComputedRef<{
|
|
11
|
+
family: string;
|
|
12
|
+
category: string;
|
|
13
|
+
cssFamily: string;
|
|
14
|
+
googleName: string;
|
|
15
|
+
variants: string[];
|
|
16
|
+
}[]>;
|
|
17
|
+
googleFonts: {
|
|
18
|
+
allFonts: import("vue").ComputedRef<{
|
|
19
|
+
family: string;
|
|
20
|
+
category: string;
|
|
21
|
+
cssFamily: string;
|
|
22
|
+
googleName: string;
|
|
23
|
+
}[]>;
|
|
24
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
25
|
+
hasApiKey: boolean;
|
|
26
|
+
load: () => Promise<void>;
|
|
27
|
+
search: (query: string) => GoogleFontItem[];
|
|
28
|
+
};
|
|
29
|
+
installFont: (fontItem: GoogleFontItem, variants?: string[] | undefined) => void;
|
|
30
|
+
removeFont: (family: string) => void;
|
|
31
|
+
updateVariants: (family: string, variants: string[]) => void;
|
|
32
|
+
isInstalled: (family: string) => boolean;
|
|
33
|
+
restoreFromSaved: (saved: any[] | null | undefined) => void;
|
|
34
|
+
getFontLinks: () => string[];
|
|
35
|
+
getFontLinksHtml: () => string;
|
|
36
|
+
setupEditor: (editor: any) => void;
|
|
37
|
+
ALL_VARIANTS: string[];
|
|
38
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface GoogleFontItem {
|
|
2
|
+
family: string;
|
|
3
|
+
category: string;
|
|
4
|
+
cssFamily: string;
|
|
5
|
+
googleName: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function injectGoogleFontCss(googleName: string, canvasDoc?: Document | null): void;
|
|
8
|
+
export declare function useGoogleFonts(): {
|
|
9
|
+
allFonts: import("vue").ComputedRef<{
|
|
10
|
+
family: string;
|
|
11
|
+
category: string;
|
|
12
|
+
cssFamily: string;
|
|
13
|
+
googleName: string;
|
|
14
|
+
}[]>;
|
|
15
|
+
loading: import("vue").Ref<boolean, boolean>;
|
|
16
|
+
hasApiKey: boolean;
|
|
17
|
+
load: () => Promise<void>;
|
|
18
|
+
search: (query: string) => GoogleFontItem[];
|
|
19
|
+
};
|
|
20
|
+
export declare function extractGoogleFontLinks(cssOrHtml: string): string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as FontManagerPanel } from './components/FontManagerPanel.vue';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { G, a, b, c, g, d, c as c2, i, r } from "./plugin-DQshk1sY.js";
|
|
2
|
+
import { e, i as i2, u, a as a2 } from "./useFontManager-CdrLq1eG.js";
|
|
3
|
+
const createEmptyBaseSnapshot = () => ({
|
|
4
|
+
colors: [],
|
|
5
|
+
typography: {},
|
|
6
|
+
customCss: "",
|
|
7
|
+
customCode: []
|
|
8
|
+
});
|
|
9
|
+
const buildGlobalSettingsPanelDraftSnapshot = (currentSnapshot, cacheSnapshot) => ({
|
|
10
|
+
...currentSnapshot ?? createEmptyBaseSnapshot(),
|
|
11
|
+
colors: cacheSnapshot.colors,
|
|
12
|
+
typography: cacheSnapshot.typography,
|
|
13
|
+
customCss: cacheSnapshot.customCss,
|
|
14
|
+
customCode: cacheSnapshot.customCode
|
|
15
|
+
});
|
|
16
|
+
const saveGlobalSettingsPanelDraft = async (options) => {
|
|
17
|
+
const nextSnapshot = buildGlobalSettingsPanelDraftSnapshot(
|
|
18
|
+
options.settings.getSnapshot(),
|
|
19
|
+
options.cacheSnapshot
|
|
20
|
+
);
|
|
21
|
+
const context = {
|
|
22
|
+
resource: options.resource,
|
|
23
|
+
tenantId: options.tenantId ?? void 0,
|
|
24
|
+
sessionKey: options.sessionKey
|
|
25
|
+
};
|
|
26
|
+
const savedSnapshot = await options.service.saveDraft(nextSnapshot, context);
|
|
27
|
+
options.settings.hydrate(savedSnapshot);
|
|
28
|
+
return savedSnapshot;
|
|
29
|
+
};
|
|
30
|
+
const createMemoryGlobalSettingsSource = () => {
|
|
31
|
+
let snapshot = null;
|
|
32
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
33
|
+
return {
|
|
34
|
+
getSnapshot: () => snapshot,
|
|
35
|
+
hydrate(nextSnapshot) {
|
|
36
|
+
snapshot = nextSnapshot;
|
|
37
|
+
listeners.forEach((listener) => listener(snapshot));
|
|
38
|
+
},
|
|
39
|
+
subscribe(listener) {
|
|
40
|
+
listeners.add(listener);
|
|
41
|
+
return () => {
|
|
42
|
+
listeners.delete(listener);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
const createGlobalSettingsSource = createMemoryGlobalSettingsSource;
|
|
48
|
+
export {
|
|
49
|
+
G as GLOBAL_SETTINGS_PLUGIN_ID,
|
|
50
|
+
a as GLOBAL_SETTINGS_STYLE_IDS,
|
|
51
|
+
b as buildGlobalSettingsCss,
|
|
52
|
+
buildGlobalSettingsPanelDraftSnapshot,
|
|
53
|
+
c as createGlobalSettingsPlugin,
|
|
54
|
+
createGlobalSettingsSource,
|
|
55
|
+
createMemoryGlobalSettingsSource,
|
|
56
|
+
e as extractGoogleFontLinks,
|
|
57
|
+
g as getEnabledGlobalCustomCode,
|
|
58
|
+
d as getGlobalSettingsGoogleFontName,
|
|
59
|
+
c2 as globalSettings,
|
|
60
|
+
i as injectGlobalSettingsIntoDocument,
|
|
61
|
+
i2 as injectGoogleFontCss,
|
|
62
|
+
r as renderGlobalSettingsPublishedAssets,
|
|
63
|
+
saveGlobalSettingsPanelDraft,
|
|
64
|
+
u as useFontManager,
|
|
65
|
+
a2 as useGoogleFonts
|
|
66
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import type useWebBuilderI18n from './useWebBuilderI18n.js';
|
|
3
|
+
type WebBuilderI18nManager = ReturnType<typeof useWebBuilderI18n>;
|
|
4
|
+
type MaybeRef<T> = T | Ref<T>;
|
|
5
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
6
|
+
manager: WebBuilderI18nManager;
|
|
7
|
+
selectedComponent?: MaybeRef<any>;
|
|
8
|
+
selectedRevision?: MaybeRef<number> | undefined;
|
|
9
|
+
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
+
manager: WebBuilderI18nManager;
|
|
11
|
+
selectedComponent?: MaybeRef<any>;
|
|
12
|
+
selectedRevision?: MaybeRef<number> | undefined;
|
|
13
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
16
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
17
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
18
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
19
|
+
} : {
|
|
20
|
+
type: import('vue').PropType<T[K]>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { WebBuilderI18nEntry, WebBuilderI18nReviewStatus, WebBuilderI18nEntryStatus } from './types.js';
|
|
2
|
+
export declare const WB_I18N_KEY_ATTR = "data-wb-i18n-key";
|
|
3
|
+
export declare const WB_I18N_SKIP_ATTR = "data-wb-i18n-skip";
|
|
4
|
+
export declare const isIdentityTranslationAllowed: (source: unknown) => boolean;
|
|
5
|
+
export declare const isUnchangedNonIdentityTranslation: (source: unknown, translation: unknown) => boolean;
|
|
6
|
+
export declare const getWebBuilderI18nEntryId: (entry: Pick<WebBuilderI18nEntry, 'key' | 'field'>) => string;
|
|
7
|
+
export interface ExtractI18nEntriesOptions {
|
|
8
|
+
includeLayoutPages?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface EnsureModelI18nKeysOptions {
|
|
11
|
+
includeLayoutPages?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const hashI18nSource: (source: string) => string;
|
|
14
|
+
export declare const isModelI18nSkipped: (component: any) => boolean;
|
|
15
|
+
export declare const setModelI18nSkipped: (component: any, skipped: boolean) => boolean;
|
|
16
|
+
export declare const collectI18nKeysFromModel: (component: any, options?: {
|
|
17
|
+
includeAncestors?: boolean;
|
|
18
|
+
}) => Set<string>;
|
|
19
|
+
export declare const ensureModelI18nKeys: (editor: any, options?: EnsureModelI18nKeysOptions) => string[];
|
|
20
|
+
export declare const extractI18nEntriesFromProjectData: (projectData: Record<string, any> | null, options?: ExtractI18nEntriesOptions) => WebBuilderI18nEntry[];
|
|
21
|
+
export declare const stripI18nTranslationsFromProjectData: <T extends Record<string, any> | null>(projectData: T) => T;
|
|
22
|
+
export declare const applyI18nTranslationsToProjectData: (projectData: Record<string, any> | null, entries: WebBuilderI18nEntry[]) => Record<string, any> | null;
|
|
23
|
+
export declare const resolveI18nEntryStatus: (source: Pick<WebBuilderI18nEntry, 'sourceHash'> & Partial<Pick<WebBuilderI18nEntry, 'source'>>, saved?: Pick<WebBuilderI18nEntry, 'sourceHash' | 'translation' | 'status'> | null) => WebBuilderI18nEntryStatus;
|
|
24
|
+
export declare const resolveI18nReviewStatus: (source: Pick<WebBuilderI18nEntry, 'sourceHash'>, saved?: Pick<WebBuilderI18nEntry, 'sourceHash' | 'translation' | 'status' | 'reviewStatus'> | null) => WebBuilderI18nReviewStatus | undefined;
|
|
25
|
+
export declare const mergeI18nEntries: (sourceEntries: WebBuilderI18nEntry[], savedEntries: WebBuilderI18nEntry[]) => WebBuilderI18nEntry[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './plugin.js';
|
|
2
|
+
export { createI18nPlugin as webBuilderI18n } from './plugin.js';
|
|
3
|
+
export * from './types.js';
|
|
4
|
+
export * from './i18n.js';
|
|
5
|
+
export * from './languageOrder.js';
|
|
6
|
+
export { default as useWebBuilderI18n } from './useWebBuilderI18n.js';
|
|
7
|
+
export type { UseWebBuilderI18nOptions, WebBuilderI18nLanguage } from './useWebBuilderI18n.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type OrderedLanguage = {
|
|
2
|
+
id?: number | string | null;
|
|
3
|
+
sortOrder?: number | string | null;
|
|
4
|
+
code?: string | null;
|
|
5
|
+
slug?: string | null;
|
|
6
|
+
name?: string | null;
|
|
7
|
+
};
|
|
8
|
+
export declare const compareLanguagesByOrder: <T extends OrderedLanguage>(left: T, right: T) => number;
|
|
9
|
+
export declare const sortLanguagesByOrder: <T extends OrderedLanguage>(languages?: readonly T[] | null | undefined) => T[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type WebBuilderFeaturePlugin, type WebBuilderPanelContribution, type WebBuilderPluginAction } from '@toototech/webbuilder/core';
|
|
2
|
+
export declare const I18N_PLUGIN_ID = "i18n";
|
|
3
|
+
export declare const I18N_PLUGIN_CAPABILITY = "webbuilder:i18n";
|
|
4
|
+
export interface WebBuilderI18nRuntime {
|
|
5
|
+
panelComponent?: unknown;
|
|
6
|
+
panelProps?: WebBuilderPanelContribution['props'];
|
|
7
|
+
isDirty?: () => boolean;
|
|
8
|
+
ensureReadyOrConfirm?: (action: WebBuilderPluginAction) => Promise<boolean> | boolean;
|
|
9
|
+
refreshSourceEntries?: () => void;
|
|
10
|
+
autoTranslateMissing?: (options: {
|
|
11
|
+
publishReady: boolean;
|
|
12
|
+
reloadCurrentLocale: boolean;
|
|
13
|
+
silent: boolean;
|
|
14
|
+
}) => Promise<unknown> | unknown;
|
|
15
|
+
reloadBundle?: () => Promise<unknown> | unknown;
|
|
16
|
+
canLoadPreview?: () => boolean;
|
|
17
|
+
hasPreview?: () => boolean;
|
|
18
|
+
restorePreview?: () => Promise<void> | void;
|
|
19
|
+
getPreviewProjectData?: () => Record<string, unknown> | null;
|
|
20
|
+
}
|
|
21
|
+
export declare const createI18nPlugin: (runtime?: WebBuilderI18nRuntime) => WebBuilderFeaturePlugin;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { PageResourceIdentity } from '@toototech/webbuilder/core';
|
|
2
|
+
export type WebBuilderI18nField = 'text' | 'html' | 'alt' | 'title' | 'placeholder' | 'aria-label' | 'seo.title' | 'seo.description' | 'seo.keywords' | `attr:${string}` | `prop:${string}`;
|
|
3
|
+
export type WebBuilderI18nEntryStatus = 'translated' | 'missing' | 'stale' | 'pending' | 'source_changed' | 'draft' | 'empty' | 'error';
|
|
4
|
+
export type WebBuilderI18nTranslationOrigin = 'machine' | 'manual';
|
|
5
|
+
export type WebBuilderI18nReviewStatus = 'pending_review' | 'reviewed';
|
|
6
|
+
export interface WebBuilderI18nEntry {
|
|
7
|
+
key: string;
|
|
8
|
+
field: WebBuilderI18nField;
|
|
9
|
+
source: string;
|
|
10
|
+
sourceHash: string;
|
|
11
|
+
translation?: string;
|
|
12
|
+
status?: WebBuilderI18nEntryStatus;
|
|
13
|
+
translationOrigin?: WebBuilderI18nTranslationOrigin;
|
|
14
|
+
reviewStatus?: WebBuilderI18nReviewStatus;
|
|
15
|
+
translatedAt?: Date | string;
|
|
16
|
+
reviewedAt?: Date | string;
|
|
17
|
+
pageId?: string;
|
|
18
|
+
componentType?: string;
|
|
19
|
+
label?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface WebBuilderI18nBundleReq extends PageResourceIdentity {
|
|
22
|
+
locale: string;
|
|
23
|
+
sourceLocale?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface WebBuilderI18nBundleResp extends PageResourceIdentity {
|
|
26
|
+
locale: string;
|
|
27
|
+
sourceLocale?: string;
|
|
28
|
+
entries: WebBuilderI18nEntry[];
|
|
29
|
+
updateTime?: Date | string;
|
|
30
|
+
}
|
|
31
|
+
export interface WebBuilderI18nSaveBundleReq extends WebBuilderI18nBundleReq {
|
|
32
|
+
entries: WebBuilderI18nEntry[];
|
|
33
|
+
partial?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface WebBuilderI18nTranslateReq extends WebBuilderI18nBundleReq {
|
|
36
|
+
entries: WebBuilderI18nEntry[];
|
|
37
|
+
provider?: string;
|
|
38
|
+
engine?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface WebBuilderI18nTranslateResp {
|
|
41
|
+
success?: boolean;
|
|
42
|
+
errorMessage?: string;
|
|
43
|
+
entries?: WebBuilderI18nEntry[];
|
|
44
|
+
}
|
|
45
|
+
export interface WebBuilderI18nAutoTranslateReq extends WebBuilderI18nBundleReq {
|
|
46
|
+
entries: WebBuilderI18nEntry[];
|
|
47
|
+
locales?: string[];
|
|
48
|
+
provider?: string;
|
|
49
|
+
engine?: string;
|
|
50
|
+
publishReady?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface WebBuilderI18nAutoTranslateResp extends PageResourceIdentity {
|
|
53
|
+
success?: boolean;
|
|
54
|
+
errorMessage?: string;
|
|
55
|
+
translatedCount?: number;
|
|
56
|
+
skippedCount?: number;
|
|
57
|
+
failedCount?: number;
|
|
58
|
+
locales?: Array<{
|
|
59
|
+
locale: string;
|
|
60
|
+
languageId?: number;
|
|
61
|
+
total?: number;
|
|
62
|
+
translated?: number;
|
|
63
|
+
skipped?: number;
|
|
64
|
+
failed?: number;
|
|
65
|
+
errorMessage?: string;
|
|
66
|
+
}>;
|
|
67
|
+
}
|
|
68
|
+
export interface WebBuilderI18nLanguageRecord {
|
|
69
|
+
id?: number;
|
|
70
|
+
name?: string;
|
|
71
|
+
code?: string;
|
|
72
|
+
slug?: string;
|
|
73
|
+
sortOrder?: number;
|
|
74
|
+
status?: number;
|
|
75
|
+
defaultLang?: number;
|
|
76
|
+
createTime?: Date | string;
|
|
77
|
+
}
|
|
78
|
+
export interface WebBuilderTranslationProviderConfig {
|
|
79
|
+
id?: number;
|
|
80
|
+
engineType?: string;
|
|
81
|
+
model?: string;
|
|
82
|
+
endpoint?: string;
|
|
83
|
+
apiKey?: string;
|
|
84
|
+
apiType?: string;
|
|
85
|
+
apiEndpoint?: string;
|
|
86
|
+
status?: number;
|
|
87
|
+
config?: Record<string, unknown> | string;
|
|
88
|
+
usageCount?: number;
|
|
89
|
+
characterCount?: number;
|
|
90
|
+
createTime?: string;
|
|
91
|
+
updateTime?: string;
|
|
92
|
+
}
|
|
93
|
+
export interface WebBuilderI18nHostService {
|
|
94
|
+
loadBundle?: (context: WebBuilderI18nBundleReq) => Promise<WebBuilderI18nBundleResp | null> | WebBuilderI18nBundleResp | null;
|
|
95
|
+
saveBundle?: (context: WebBuilderI18nSaveBundleReq) => Promise<WebBuilderI18nBundleResp | null> | WebBuilderI18nBundleResp | null;
|
|
96
|
+
translateEntries?: (context: WebBuilderI18nTranslateReq) => Promise<WebBuilderI18nTranslateResp | null> | WebBuilderI18nTranslateResp | null;
|
|
97
|
+
autoTranslateEntries?: (context: WebBuilderI18nAutoTranslateReq) => Promise<WebBuilderI18nAutoTranslateResp | null> | WebBuilderI18nAutoTranslateResp | null;
|
|
98
|
+
getEnabledLanguages?: () => Promise<WebBuilderI18nLanguageRecord[]> | WebBuilderI18nLanguageRecord[];
|
|
99
|
+
getTranslationConfig?: () => Promise<unknown> | unknown;
|
|
100
|
+
getEnabledProviderConfigs?: () => Promise<WebBuilderTranslationProviderConfig[]> | WebBuilderTranslationProviderConfig[];
|
|
101
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import type { HostServices, HostUi, PageResourceIdentity, WebBuilderPluginAction } from '@toototech/webbuilder/core';
|
|
3
|
+
import type { WebBuilderI18nEntry, WebBuilderI18nEntryStatus, WebBuilderI18nReviewStatus, WebBuilderI18nTranslationOrigin, WebBuilderTranslationProviderConfig } from './types.js';
|
|
4
|
+
type MaybeRef<T> = T | Ref<T>;
|
|
5
|
+
type BlockingProcessAction = WebBuilderPluginAction;
|
|
6
|
+
type BlockingProcessMessage = string | string[];
|
|
7
|
+
type RefreshSourceEntriesOptions = {
|
|
8
|
+
ensureKeys?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type AutoTranslateOptions = {
|
|
11
|
+
publishReady?: boolean;
|
|
12
|
+
reloadCurrentLocale?: boolean;
|
|
13
|
+
silent?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export interface WebBuilderI18nLanguage {
|
|
16
|
+
label: string;
|
|
17
|
+
value: string;
|
|
18
|
+
id?: number;
|
|
19
|
+
code?: string;
|
|
20
|
+
slug?: string;
|
|
21
|
+
sortOrder?: number;
|
|
22
|
+
defaultLang?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface UseWebBuilderI18nOptions {
|
|
25
|
+
grapes: any;
|
|
26
|
+
resource: MaybeRef<PageResourceIdentity>;
|
|
27
|
+
hostServices?: HostServices;
|
|
28
|
+
hostUi?: HostUi;
|
|
29
|
+
sourceLocale?: string;
|
|
30
|
+
defaultLocale?: string;
|
|
31
|
+
languages?: WebBuilderI18nLanguage[];
|
|
32
|
+
blockingProcess?: {
|
|
33
|
+
start: (action: BlockingProcessAction, message?: BlockingProcessMessage) => void;
|
|
34
|
+
stop: () => void;
|
|
35
|
+
setMessage: (message: BlockingProcessMessage) => void;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export default function useWebBuilderI18n(options: UseWebBuilderI18nOptions): {
|
|
39
|
+
locale: Ref<string, string>;
|
|
40
|
+
sourceLocale: Ref<string, string>;
|
|
41
|
+
provider: Ref<string, string>;
|
|
42
|
+
languages: Ref<{
|
|
43
|
+
label: string;
|
|
44
|
+
value: string;
|
|
45
|
+
id?: number | undefined;
|
|
46
|
+
code?: string | undefined;
|
|
47
|
+
slug?: string | undefined;
|
|
48
|
+
sortOrder?: number | undefined;
|
|
49
|
+
defaultLang?: number | undefined;
|
|
50
|
+
}[], WebBuilderI18nLanguage[] | {
|
|
51
|
+
label: string;
|
|
52
|
+
value: string;
|
|
53
|
+
id?: number | undefined;
|
|
54
|
+
code?: string | undefined;
|
|
55
|
+
slug?: string | undefined;
|
|
56
|
+
sortOrder?: number | undefined;
|
|
57
|
+
defaultLang?: number | undefined;
|
|
58
|
+
}[]>;
|
|
59
|
+
entries: import("vue").ComputedRef<WebBuilderI18nEntry[]>;
|
|
60
|
+
sourceEntries: Ref<{
|
|
61
|
+
key: string;
|
|
62
|
+
field: import("./types.js").WebBuilderI18nField;
|
|
63
|
+
source: string;
|
|
64
|
+
sourceHash: string;
|
|
65
|
+
translation?: string | undefined;
|
|
66
|
+
status?: WebBuilderI18nEntryStatus | undefined;
|
|
67
|
+
translationOrigin?: WebBuilderI18nTranslationOrigin | undefined;
|
|
68
|
+
reviewStatus?: WebBuilderI18nReviewStatus | undefined;
|
|
69
|
+
translatedAt?: string | Date | undefined;
|
|
70
|
+
reviewedAt?: string | Date | undefined;
|
|
71
|
+
pageId?: string | undefined;
|
|
72
|
+
componentType?: string | undefined;
|
|
73
|
+
label?: string | undefined;
|
|
74
|
+
}[], WebBuilderI18nEntry[] | {
|
|
75
|
+
key: string;
|
|
76
|
+
field: import("./types.js").WebBuilderI18nField;
|
|
77
|
+
source: string;
|
|
78
|
+
sourceHash: string;
|
|
79
|
+
translation?: string | undefined;
|
|
80
|
+
status?: WebBuilderI18nEntryStatus | undefined;
|
|
81
|
+
translationOrigin?: WebBuilderI18nTranslationOrigin | undefined;
|
|
82
|
+
reviewStatus?: WebBuilderI18nReviewStatus | undefined;
|
|
83
|
+
translatedAt?: string | Date | undefined;
|
|
84
|
+
reviewedAt?: string | Date | undefined;
|
|
85
|
+
pageId?: string | undefined;
|
|
86
|
+
componentType?: string | undefined;
|
|
87
|
+
label?: string | undefined;
|
|
88
|
+
}[]>;
|
|
89
|
+
sourceRevision: Ref<number, number>;
|
|
90
|
+
savedEntries: Ref<{
|
|
91
|
+
key: string;
|
|
92
|
+
field: import("./types.js").WebBuilderI18nField;
|
|
93
|
+
source: string;
|
|
94
|
+
sourceHash: string;
|
|
95
|
+
translation?: string | undefined;
|
|
96
|
+
status?: WebBuilderI18nEntryStatus | undefined;
|
|
97
|
+
translationOrigin?: WebBuilderI18nTranslationOrigin | undefined;
|
|
98
|
+
reviewStatus?: WebBuilderI18nReviewStatus | undefined;
|
|
99
|
+
translatedAt?: string | Date | undefined;
|
|
100
|
+
reviewedAt?: string | Date | undefined;
|
|
101
|
+
pageId?: string | undefined;
|
|
102
|
+
componentType?: string | undefined;
|
|
103
|
+
label?: string | undefined;
|
|
104
|
+
}[], WebBuilderI18nEntry[] | {
|
|
105
|
+
key: string;
|
|
106
|
+
field: import("./types.js").WebBuilderI18nField;
|
|
107
|
+
source: string;
|
|
108
|
+
sourceHash: string;
|
|
109
|
+
translation?: string | undefined;
|
|
110
|
+
status?: WebBuilderI18nEntryStatus | undefined;
|
|
111
|
+
translationOrigin?: WebBuilderI18nTranslationOrigin | undefined;
|
|
112
|
+
reviewStatus?: WebBuilderI18nReviewStatus | undefined;
|
|
113
|
+
translatedAt?: string | Date | undefined;
|
|
114
|
+
reviewedAt?: string | Date | undefined;
|
|
115
|
+
pageId?: string | undefined;
|
|
116
|
+
componentType?: string | undefined;
|
|
117
|
+
label?: string | undefined;
|
|
118
|
+
}[]>;
|
|
119
|
+
loading: Ref<boolean, boolean>;
|
|
120
|
+
saving: Ref<boolean, boolean>;
|
|
121
|
+
translating: Ref<boolean, boolean>;
|
|
122
|
+
autoTranslating: Ref<boolean, boolean>;
|
|
123
|
+
dirty: import("vue").ComputedRef<boolean>;
|
|
124
|
+
dirtyEntryIds: import("vue").ComputedRef<string[]>;
|
|
125
|
+
actionableEntries: import("vue").ComputedRef<WebBuilderI18nEntry[]>;
|
|
126
|
+
missingCount: import("vue").ComputedRef<number>;
|
|
127
|
+
staleCount: import("vue").ComputedRef<number>;
|
|
128
|
+
translatedCount: import("vue").ComputedRef<number>;
|
|
129
|
+
pendingReviewCount: import("vue").ComputedRef<number>;
|
|
130
|
+
reviewedCount: import("vue").ComputedRef<number>;
|
|
131
|
+
targetLanguages: import("vue").ComputedRef<{
|
|
132
|
+
label: string;
|
|
133
|
+
value: string;
|
|
134
|
+
id?: number | undefined;
|
|
135
|
+
code?: string | undefined;
|
|
136
|
+
slug?: string | undefined;
|
|
137
|
+
sortOrder?: number | undefined;
|
|
138
|
+
defaultLang?: number | undefined;
|
|
139
|
+
}[]>;
|
|
140
|
+
lastError: Ref<string, string>;
|
|
141
|
+
lastSavedAt: Ref<string | Date | null, string | Date | null>;
|
|
142
|
+
hostUi: HostUi;
|
|
143
|
+
setLocale: (nextLocale: string) => void;
|
|
144
|
+
setProvider: (nextProvider: string) => void;
|
|
145
|
+
refreshSourceEntries: (refreshOptions?: RefreshSourceEntriesOptions) => void;
|
|
146
|
+
loadBundle: () => Promise<void>;
|
|
147
|
+
setTranslation: (entry: WebBuilderI18nEntry, translation: string, options?: {
|
|
148
|
+
origin?: WebBuilderI18nTranslationOrigin;
|
|
149
|
+
reviewStatus?: WebBuilderI18nReviewStatus;
|
|
150
|
+
status?: WebBuilderI18nEntryStatus;
|
|
151
|
+
}) => void;
|
|
152
|
+
confirmTranslation: (entry: WebBuilderI18nEntry) => void;
|
|
153
|
+
saveTranslations: () => Promise<boolean>;
|
|
154
|
+
flushDirtyTranslations: () => Promise<boolean>;
|
|
155
|
+
ensureReadyOrConfirm: (action: BlockingProcessAction) => Promise<boolean>;
|
|
156
|
+
machineTranslate: (mode?: 'missing' | 'stale' | 'all') => Promise<void>;
|
|
157
|
+
machineTranslateEntries: (targetEntries: WebBuilderI18nEntry[]) => Promise<void>;
|
|
158
|
+
autoTranslateMissing: (autoOptions?: AutoTranslateOptions) => Promise<boolean>;
|
|
159
|
+
getPreviewProjectData: () => Record<string, any> | null;
|
|
160
|
+
selectEntryComponent: (entry: Pick<WebBuilderI18nEntry, 'key'> | null | undefined) => boolean;
|
|
161
|
+
loadLanguages: () => Promise<void>;
|
|
162
|
+
loadProviderConfigs: () => Promise<WebBuilderTranslationProviderConfig[]>;
|
|
163
|
+
};
|
|
164
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as I18nPanel } from './I18nPanel.vue';
|