@g1cloud/page-builder-editor 1.0.0-alpha.2 → 1.0.0-alpha.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/PageBuilderEditor.vue.d.ts +4 -0
- package/dist/{PbPropertyEditorImage-DA92v7AE.js → PbPropertyEditorImage-EuqsavTF.js} +1 -1
- package/dist/PbPropertyEditorMultilineText-CfRbKELF.js +65 -0
- package/dist/{PbPropertyEditorProduct-CkydxTwD.js → PbPropertyEditorProduct-COnCyYJl.js} +1 -1
- package/dist/components/sidebar/property/PbPropertyEditorMultilineText.vue.d.ts +5 -4
- package/dist/{index-Dwk2ffWe.js → index-Mob7K7vK.js} +167 -67
- package/dist/model/context.d.ts +18 -6
- package/dist/model/model.d.ts +4 -2
- package/dist/model/page-builder-editor.d.ts +8 -0
- package/dist/model/page-builder-util.d.ts +2 -2
- package/dist/page-builder-editor.js +1 -1
- package/dist/page-builder-editor.umd.cjs +190 -68
- package/package.json +3 -3
- package/dist/PbPropertyEditorMultilineText-BMeNUGm8.js +0 -42
package/dist/model/model.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPart } from '@g1cloud/page-builder-viewer';
|
|
1
|
+
import { IPart, MultiLangText } from '@g1cloud/page-builder-viewer';
|
|
2
2
|
import * as Y from 'yjs';
|
|
3
3
|
export declare const ROOT_TYPE = "Root";
|
|
4
4
|
export declare const PAGE_TYPE = "Page";
|
|
@@ -28,6 +28,8 @@ export declare class Model {
|
|
|
28
28
|
private updateParts;
|
|
29
29
|
private deleteParts;
|
|
30
30
|
private createElement;
|
|
31
|
+
private setElementAttribute;
|
|
32
|
+
private getElementAttribute;
|
|
31
33
|
private getIndexOfElement;
|
|
32
34
|
private emitUpdateModelEvent;
|
|
33
35
|
}
|
|
@@ -47,7 +49,7 @@ export type PartInsertResult = {
|
|
|
47
49
|
};
|
|
48
50
|
export type PartUpdateResult = {
|
|
49
51
|
element: Y.XmlElement;
|
|
50
|
-
properties: Record<string,
|
|
52
|
+
properties: Record<string, MultiLangText>;
|
|
51
53
|
removeOtherProperties?: boolean;
|
|
52
54
|
};
|
|
53
55
|
export type PartDeleteResult = {
|
|
@@ -22,11 +22,15 @@ export interface PageBuilderEditor {
|
|
|
22
22
|
title?: string;
|
|
23
23
|
editMode: PageBuilderEditMode;
|
|
24
24
|
scale: Ref<number>;
|
|
25
|
+
locales: Ref<string[]>;
|
|
26
|
+
language: Ref<string>;
|
|
25
27
|
registerPlugin(plugin: PageBuilderPlugin): void;
|
|
26
28
|
initData(content?: any): void;
|
|
27
29
|
undo(): void;
|
|
28
30
|
redo(): void;
|
|
29
31
|
zoom(scale: number): void;
|
|
32
|
+
setLocales(locales: string[]): void;
|
|
33
|
+
setLanguage(language: string): void;
|
|
30
34
|
}
|
|
31
35
|
export declare class PageBuilderEditorImpl implements PageBuilderEditor {
|
|
32
36
|
instanceId?: string;
|
|
@@ -40,12 +44,16 @@ export declare class PageBuilderEditorImpl implements PageBuilderEditor {
|
|
|
40
44
|
title?: string;
|
|
41
45
|
editMode: PageBuilderEditMode;
|
|
42
46
|
scale: Ref<number>;
|
|
47
|
+
locales: Ref<string[]>;
|
|
48
|
+
language: Ref<string>;
|
|
43
49
|
constructor();
|
|
44
50
|
registerPlugin(plugin: PageBuilderPlugin): void;
|
|
45
51
|
initData(content?: any[]): void;
|
|
46
52
|
undo(): void;
|
|
47
53
|
redo(): void;
|
|
48
54
|
zoom(scale: number): void;
|
|
55
|
+
setLocales(locales: string[]): void;
|
|
56
|
+
setLanguage(language: string): void;
|
|
49
57
|
private getEmptyPageContent;
|
|
50
58
|
private initPlugins;
|
|
51
59
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IPart } from '@g1cloud/page-builder-viewer';
|
|
1
|
+
import { IPart, MultiLangText } from '@g1cloud/page-builder-viewer';
|
|
2
2
|
|
|
3
|
-
export declare const getPropertyValueOfParts: (parts: IPart[], propertyName: string) =>
|
|
3
|
+
export declare const getPropertyValueOfParts: (parts: IPart[], propertyName: string) => MultiLangText | undefined;
|
|
4
4
|
export declare const isCursorInElement: (event: MouseEvent, element: Element) => boolean;
|
|
5
5
|
export declare const extractCommonStylesFromProperties: (properties: Record<string, string>) => Record<string, unknown>;
|