@g1cloud/page-builder-editor 1.0.0-alpha.15 → 1.0.0-alpha.17

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.
@@ -53,6 +53,22 @@ export declare class AddPartCommand implements Command {
53
53
  constructor(modal: BSModal);
54
54
  execute(pageBuilder: PageBuilderEditor, args?: any): void;
55
55
  }
56
+ export declare class AddSectionCommand implements Command {
57
+ private modal;
58
+ static readonly COMMAND_ID = "AddSection";
59
+ readonly commandId = "AddSection";
60
+ readonly caption = "Add Section";
61
+ constructor(modal: BSModal);
62
+ execute(pageBuilder: PageBuilderEditor, args?: any): void;
63
+ }
64
+ export declare class AddBlockCommand implements Command {
65
+ private modal;
66
+ static readonly COMMAND_ID = "AddBlock";
67
+ readonly commandId = "AddBlock";
68
+ readonly caption = "Add Block";
69
+ constructor(modal: BSModal);
70
+ execute(pageBuilder: PageBuilderEditor, args?: any): void;
71
+ }
56
72
  export declare class AddSectionAboveCommand implements Command {
57
73
  private modal;
58
74
  static readonly COMMAND_ID = "AddSectionAbove";
@@ -181,7 +197,7 @@ export declare class SelectAllPartsCommand implements Command {
181
197
  readonly commandId = "SelectAllParts";
182
198
  execute(pageBuilder: PageBuilderEditor): void;
183
199
  }
184
- export declare const createDefaultCommands: (modal: BSModal) => (OpenAddPartModalCommand | OpenAddWidgetModalCommand | AddPartCommand | AddSectionAboveCommand | AddSectionBelowCommand | AddBlockLeftCommand | AddBlockRightCommand | AddBlockAboveCommand | AddBlockBelowCommand | AddWidgetLeftCommand | AddWidgetRightCommand | AddWidgetAboveCommand | AddWidgetBelowCommand | AddWidgetInsideCommand | ChangePropertyCommand | DeletePartCommand | CopyPartCommand | CutPartCommand | PastePartCommand | SelectAllPartsCommand)[];
200
+ export declare const createDefaultCommands: (modal: BSModal) => (OpenAddPartModalCommand | OpenAddWidgetModalCommand | AddPartCommand | AddSectionCommand | AddBlockCommand | AddSectionAboveCommand | AddSectionBelowCommand | AddBlockLeftCommand | AddBlockRightCommand | AddBlockAboveCommand | AddBlockBelowCommand | AddWidgetLeftCommand | AddWidgetRightCommand | AddWidgetAboveCommand | AddWidgetBelowCommand | AddWidgetInsideCommand | ChangePropertyCommand | DeletePartCommand | CopyPartCommand | CutPartCommand | PastePartCommand | SelectAllPartsCommand)[];
185
201
  export declare const menuItemForCommand: (pageBuilder: PageBuilderEditor, commandId: string, caption?: string) => MenuItem;
186
202
  export declare const createDefaultContextMenus: () => ContextMenu[];
187
203
  export declare const createDefaultKeyHandlers: () => KeyHandler[];
@@ -1,3 +1,4 @@
1
+ import { PartDefinition } from './part-definintion.ts';
1
2
  import { ContextMenuRegistry, ContextMenuRegistryImpl, KeyHandlers, PageBuilderContext, PageBuilderContextImpl } from './context.ts';
2
3
  import { ToolButtonRegistry } from './toolbar.ts';
3
4
  import { PageBuilderPlugin } from './plugin.ts';
@@ -36,6 +37,8 @@ export interface PageBuilderEditor extends PageBuilder {
36
37
  setLocales(locales?: string[]): void;
37
38
  makeSingleScreen(screenToKeep: number): void;
38
39
  makeMultipleScreen(): void;
40
+ getCustomWidgets(): PartDefinition[];
41
+ getProvider(name: string): (args?: any, callback?: (result?: any) => void) => unknown;
39
42
  }
40
43
  export declare class PageBuilderEditorImpl implements PageBuilderEditor {
41
44
  instanceId?: string;
@@ -51,12 +54,17 @@ export declare class PageBuilderEditorImpl implements PageBuilderEditor {
51
54
  scale: Ref<number>;
52
55
  locale: Ref<string>;
53
56
  locales: Ref<string[]>;
57
+ customWidgets: PartDefinition[];
58
+ providers: Record<string, unknown>;
54
59
  constructor();
55
60
  getLocale(): string;
56
61
  setLocale(locale?: string): void;
57
62
  getLocales(): string[];
58
63
  setLocales(locales?: string[]): void;
59
64
  getCustomWidgetComponent(part: IPart): Component | undefined;
65
+ getProvider(name: string): (args?: any, callback?: (result?: any) => void) => unknown;
66
+ watchCustomWidgetData(part: IPart): unknown;
67
+ provideCustomWidgetData(part: IPart): Promise<unknown>;
60
68
  registerPlugin(plugin: PageBuilderPlugin): void;
61
69
  registerCustomPlugin(plugin: any): void;
62
70
  initData(content?: any[]): void;
@@ -65,6 +73,7 @@ export declare class PageBuilderEditorImpl implements PageBuilderEditor {
65
73
  zoom(scale: number): void;
66
74
  makeSingleScreen(screenToKeep: number): void;
67
75
  makeMultipleScreen(): void;
76
+ getCustomWidgets(): PartDefinition[];
68
77
  private getEmptyPageContent;
69
78
  private initPlugins;
70
79
  }
@@ -14,6 +14,8 @@ export type PartDefinition = {
14
14
  allowsChild: (partOrName?: IPart | string | undefined) => boolean;
15
15
  creator: PartCreator;
16
16
  component?: Component;
17
+ dataWatcher?: (properties?: Record<string, unknown>) => unknown;
18
+ dataProvider?: (properties?: Record<string, unknown>) => Promise<unknown>;
17
19
  };
18
20
  export type PartDefinitionGroup = {
19
21
  groupName: string;
@@ -15,7 +15,6 @@ export declare class PartManager {
15
15
  registerPartDefinitions(partDefinitions: Record<string, PartDefinition>): void;
16
16
  getPartDefinition(partName: string): PartDefinition | undefined;
17
17
  getPropertyDefinition(partName: string, propertyName: string): PartProperty | undefined;
18
- getLocalDesignPartPropertyDefinitions(partName: string): PartProperty[] | undefined;
19
18
  createPartComponent(part?: IPart): Component | undefined;
20
19
  createPartComponents(parts?: IPart[]): PartComponent[];
21
20
  registerPartPropertyGroupEditors(editors: Record<string, PartPropertyGroupEditor>): void;
@@ -1,4 +1,4 @@
1
- import { B, b, M, c, d, e, _, a, f, g, h, i, j, k, l, R, m, S, n, W, o, p, q, r, s, t, v, w } from "./index-BIoyBfxM.js";
1
+ import { B, b, M, c, d, e, _, a, f, g, h, i, j, k, l, m, R, n, S, o, W, p, q, r, s, t, v, x, y } from "./index-rPBXWjSz.js";
2
2
  export {
3
3
  B as BLOCK_TYPE,
4
4
  b as Block,
@@ -13,19 +13,20 @@ export {
13
13
  h as Part,
14
14
  i as PbCustomWidget,
15
15
  j as PbHtmlWidget,
16
- k as PbImageWidget,
17
- l as PbTextWidget,
16
+ k as PbIframeWidget,
17
+ l as PbImageWidget,
18
+ m as PbTextWidget,
18
19
  R as ROOT_TYPE,
19
- m as RootPart,
20
+ n as RootPart,
20
21
  S as SECTION_TYPE,
21
- n as Section,
22
+ o as Section,
22
23
  W as WIDGET_TYPE,
23
- o as Widget,
24
- p as createPageBuilderViewer,
25
- q as createPartComponent,
26
- r as createPartComponents,
27
- s as providePageBuilder,
28
- t as providePageBuilderViewer,
29
- v as usePageBuilder,
30
- w as usePageBuilderViewer
24
+ p as Widget,
25
+ q as createPageBuilderViewer,
26
+ r as createPartComponent,
27
+ s as createPartComponents,
28
+ t as providePageBuilder,
29
+ v as providePageBuilderViewer,
30
+ x as usePageBuilder,
31
+ y as usePageBuilderViewer
31
32
  };