@pobuca/email-builder 1.2.1 → 1.3.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/bundles/pobuca-email-builder.umd.js +275 -43
- package/bundles/pobuca-email-builder.umd.js.map +1 -1
- package/bundles/pobuca-email-builder.umd.min.js +1 -1
- package/bundles/pobuca-email-builder.umd.min.js.map +1 -1
- package/esm2015/lib/pb-email-builder.component.js +46 -3
- package/esm2015/lib/services/internals/pb-email-object-store/pb-email-object-store.service.js +45 -4
- package/esm2015/lib/services/internals/pb-history/pb-history.service.js +154 -0
- package/esm2015/pobuca-email-builder.js +41 -40
- package/fesm2015/pobuca-email-builder.js +235 -5
- package/fesm2015/pobuca-email-builder.js.map +1 -1
- package/lib/pb-email-builder.component.d.ts +10 -0
- package/lib/services/internals/pb-email-object-store/pb-email-object-store.service.d.ts +15 -1
- package/lib/services/internals/pb-history/pb-history.service.d.ts +51 -0
- package/package.json +1 -1
- package/pobuca-email-builder.d.ts +40 -39
- package/pobuca-email-builder.metadata.json +1 -1
|
@@ -37,6 +37,8 @@ export declare class PbEmailBuilderComponent implements OnChanges, OnDestroy, On
|
|
|
37
37
|
currentHTMLTemplate$: import("rxjs").Observable<string>;
|
|
38
38
|
activeMatProgress$: import("rxjs").Observable<boolean>;
|
|
39
39
|
customModuleList$: import("rxjs").Observable<import("./interfaces/interfaces").IUserModule[]>;
|
|
40
|
+
canUndo$: import("rxjs").Observable<boolean>;
|
|
41
|
+
canRedo$: import("rxjs").Observable<boolean>;
|
|
40
42
|
private readonly _onDestroy$;
|
|
41
43
|
private includedFonts;
|
|
42
44
|
constructor(ngb: PbEmailBuilderService, userRestApiService: PbUserRestApiService, userInterfaceService: PbUserInterfaceService, emailObjectStore: PbEmailObjectStoreService, renderer2: Renderer2, slugifyPipe: SlugifyPipe, middlewares: PbUserMiddlewaresService, changeDetectorRef: ChangeDetectorRef, structures: IStructure[], blocks: TBlocks[], googleFonts: TBlocks[], doc: Document);
|
|
@@ -53,6 +55,14 @@ export declare class PbEmailBuilderComponent implements OnChanges, OnDestroy, On
|
|
|
53
55
|
saveEmail(): import("rxjs").Subscription;
|
|
54
56
|
disableBlocksList$(block: TBlocks): import("rxjs").Observable<boolean>;
|
|
55
57
|
disableStructureList$(structure: IStructure): import("rxjs").Observable<boolean>;
|
|
58
|
+
/**
|
|
59
|
+
* Undo the last action
|
|
60
|
+
*/
|
|
61
|
+
undo(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Redo the last undone action
|
|
64
|
+
*/
|
|
65
|
+
redo(): void;
|
|
56
66
|
trackByFn(block: TBlocks | IStructure): "button" | "video" | "image" | "text" | "divider" | "spacer" | "social" | "cols_1" | "cols_2" | "cols_3" | "cols_4" | "cols_12" | "cols_21";
|
|
57
67
|
changeTabIndex(index: number): void;
|
|
58
68
|
download(source: TExportType): import("rxjs").Subscription;
|
|
@@ -5,6 +5,7 @@ import { TBlocks } from '../../../classes/Elements';
|
|
|
5
5
|
import { PBEmail } from '../../../classes/DefaultEmail';
|
|
6
6
|
import { PbUserRestApiService } from '../../user-rest-api-service/user-rest-api.service';
|
|
7
7
|
import { PbStorageService } from '../../pb-storage/pb-storage.service';
|
|
8
|
+
import { IpHistoryService } from '../pb-history/pb-history.service';
|
|
8
9
|
/**
|
|
9
10
|
* @internal
|
|
10
11
|
*/
|
|
@@ -12,6 +13,7 @@ export declare class PbEmailObjectStoreService {
|
|
|
12
13
|
private userRestApi;
|
|
13
14
|
private pbStorage;
|
|
14
15
|
private userMiddleware;
|
|
16
|
+
private history;
|
|
15
17
|
private googleFonts;
|
|
16
18
|
readonly config: IForRootConf;
|
|
17
19
|
Email: PBEmail;
|
|
@@ -34,7 +36,9 @@ export declare class PbEmailObjectStoreService {
|
|
|
34
36
|
readonly templateAsObservable$: import("rxjs").Observable<string>;
|
|
35
37
|
private _onTemplateCreated$;
|
|
36
38
|
readonly onTemplateCreated$: import("rxjs").Observable<[PBEmail, string, string]>;
|
|
37
|
-
|
|
39
|
+
canUndo$: import("rxjs").Observable<boolean>;
|
|
40
|
+
canRedo$: import("rxjs").Observable<boolean>;
|
|
41
|
+
constructor(userRestApi: PbUserRestApiService, pbStorage: PbStorageService, userMiddleware: PbUserMiddlewaresService, history: IpHistoryService, googleFonts: string[], config: IForRootConf);
|
|
38
42
|
private get defaultTemplateThumbPath();
|
|
39
43
|
createHTMLTemplate$(): import("rxjs").Observable<IMjmlServerResponse>;
|
|
40
44
|
markForCheck(): void;
|
|
@@ -48,4 +52,14 @@ export declare class PbEmailObjectStoreService {
|
|
|
48
52
|
duplicateBlock(key: number, column: TBlocks[], block: TBlocks): TBlocks;
|
|
49
53
|
removeBlock(key: number, column: TBlocks[]): void;
|
|
50
54
|
reset(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Undo the last change
|
|
57
|
+
* @returns true if undo was successful, false if undo is not available
|
|
58
|
+
*/
|
|
59
|
+
undo(): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Redo the last undone change
|
|
62
|
+
* @returns true if redo was successful, false if redo is not available
|
|
63
|
+
*/
|
|
64
|
+
redo(): boolean;
|
|
51
65
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { PBEmail } from '../../../classes/DefaultEmail';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare class IpHistoryService {
|
|
7
|
+
private storage;
|
|
8
|
+
private historyStack;
|
|
9
|
+
private currentIndex;
|
|
10
|
+
private maxHistorySize;
|
|
11
|
+
private _canUndo$;
|
|
12
|
+
private _canRedo$;
|
|
13
|
+
canUndo$: Observable<boolean>;
|
|
14
|
+
canRedo$: Observable<boolean>;
|
|
15
|
+
constructor(storage: Storage);
|
|
16
|
+
/**
|
|
17
|
+
* Add a new state to the history stack
|
|
18
|
+
*/
|
|
19
|
+
addState(state: PBEmail): void;
|
|
20
|
+
/**
|
|
21
|
+
* Get the previous state (undo)
|
|
22
|
+
*/
|
|
23
|
+
undo(): PBEmail | null;
|
|
24
|
+
/**
|
|
25
|
+
* Get the next state (redo)
|
|
26
|
+
*/
|
|
27
|
+
redo(): PBEmail | null;
|
|
28
|
+
/**
|
|
29
|
+
* Check if undo is available (synchronous)
|
|
30
|
+
*/
|
|
31
|
+
canUndoNow(): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Check if redo is available (synchronous)
|
|
34
|
+
*/
|
|
35
|
+
canRedoNow(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Clear history
|
|
38
|
+
*/
|
|
39
|
+
clear(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Get the history size
|
|
42
|
+
*/
|
|
43
|
+
getHistorySize(): number;
|
|
44
|
+
/**
|
|
45
|
+
* Get current position in history stack
|
|
46
|
+
*/
|
|
47
|
+
getCurrentIndex(): number;
|
|
48
|
+
private updateUndoRedoStatus;
|
|
49
|
+
private saveToStorage;
|
|
50
|
+
private loadFromStorage;
|
|
51
|
+
}
|
package/package.json
CHANGED
|
@@ -2,43 +2,44 @@
|
|
|
2
2
|
* Generated bundle index. Do not edit.
|
|
3
3
|
*/
|
|
4
4
|
export * from './public_api';
|
|
5
|
-
export { BlockSettingsComponent as
|
|
6
|
-
export { BlockComponent as
|
|
7
|
-
export { BuilderContainerComponent as
|
|
8
|
-
export { ConfirmDialogComponent as
|
|
9
|
-
export { GeneralSettingsComponent as
|
|
10
|
-
export { ImportDialogComponent as
|
|
11
|
-
export { StructureSettingsComponent as
|
|
12
|
-
export { StructureComponent as
|
|
13
|
-
export { TemplateListDialogComponent as
|
|
14
|
-
export { DynamicComponentDirective as
|
|
15
|
-
export { AbstractBlock as
|
|
16
|
-
export { ButtonComponent as
|
|
17
|
-
export { DividerComponent as
|
|
18
|
-
export { ImageComponent as
|
|
19
|
-
export { SocialComponent as
|
|
20
|
-
export { SpacerComponent as
|
|
21
|
-
export { TextElementComponent as
|
|
22
|
-
export { VideoComponent as
|
|
23
|
-
export { AlignComponent as
|
|
24
|
-
export { BackRepatComponent as
|
|
25
|
-
export { BorderComponent as
|
|
26
|
-
export { ColorComponent as
|
|
27
|
-
export { DirectionComponent as
|
|
28
|
-
export { FontStylesComponent as
|
|
29
|
-
export { GapsComponent as
|
|
30
|
-
export { LineHeightComponent as
|
|
31
|
-
export { LinkComponent as
|
|
32
|
-
export { MarginComponent as
|
|
33
|
-
export { PaddingComponent as
|
|
34
|
-
export { ImageUploadComponent as
|
|
35
|
-
export { WidthHeightComponent as
|
|
36
|
-
export { IpInterceptorInterceptor as
|
|
5
|
+
export { BlockSettingsComponent as ɵbg } from './lib/components/block-settings/block-settings.component';
|
|
6
|
+
export { BlockComponent as ɵg } from './lib/components/block/block.component';
|
|
7
|
+
export { BuilderContainerComponent as ɵr } from './lib/components/builder-container/builder-container.component';
|
|
8
|
+
export { ConfirmDialogComponent as ɵbe } from './lib/components/dialog.component';
|
|
9
|
+
export { GeneralSettingsComponent as ɵbi } from './lib/components/general-settings/general-settings.component';
|
|
10
|
+
export { ImportDialogComponent as ɵbm } from './lib/components/import-dialog/import-dialog.component';
|
|
11
|
+
export { StructureSettingsComponent as ɵbh } from './lib/components/structure-settings/structure-settings.component';
|
|
12
|
+
export { StructureComponent as ɵf } from './lib/components/structure/structure.component';
|
|
13
|
+
export { TemplateListDialogComponent as ɵbl } from './lib/components/template-list-dialog/template-list-dialog.component';
|
|
14
|
+
export { DynamicComponentDirective as ɵh } from './lib/directives/dynamic-component.directive';
|
|
15
|
+
export { AbstractBlock as ɵj } from './lib/elements/abstract-block';
|
|
16
|
+
export { ButtonComponent as ɵn } from './lib/elements/button/button.component';
|
|
17
|
+
export { DividerComponent as ɵo } from './lib/elements/divider/divider.component';
|
|
18
|
+
export { ImageComponent as ɵk } from './lib/elements/image/image.component';
|
|
19
|
+
export { SocialComponent as ɵq } from './lib/elements/social/social.component';
|
|
20
|
+
export { SpacerComponent as ɵp } from './lib/elements/spacer/spacer.component';
|
|
21
|
+
export { TextElementComponent as ɵi } from './lib/elements/text-element/text-element.component';
|
|
22
|
+
export { VideoComponent as ɵl } from './lib/elements/video/video.component';
|
|
23
|
+
export { AlignComponent as ɵbb } from './lib/groups/align';
|
|
24
|
+
export { BackRepatComponent as ɵbd } from './lib/groups/back-repeat';
|
|
25
|
+
export { BorderComponent as ɵy } from './lib/groups/border';
|
|
26
|
+
export { ColorComponent as ɵz } from './lib/groups/color';
|
|
27
|
+
export { DirectionComponent as ɵbc } from './lib/groups/direction';
|
|
28
|
+
export { FontStylesComponent as ɵs } from './lib/groups/font-styles';
|
|
29
|
+
export { GapsComponent as ɵv } from './lib/groups/gaps';
|
|
30
|
+
export { LineHeightComponent as ɵw } from './lib/groups/line-height';
|
|
31
|
+
export { LinkComponent as ɵba } from './lib/groups/link';
|
|
32
|
+
export { MarginComponent as ɵu } from './lib/groups/margin';
|
|
33
|
+
export { PaddingComponent as ɵt } from './lib/groups/padding';
|
|
34
|
+
export { ImageUploadComponent as ɵbf } from './lib/groups/upload-image';
|
|
35
|
+
export { WidthHeightComponent as ɵx } from './lib/groups/width-height';
|
|
36
|
+
export { IpInterceptorInterceptor as ɵbn } from './lib/interceptors/pb-interceptor.interceptor';
|
|
37
37
|
export { PbEmailObjectStoreService as ɵa } from './lib/services/internals/pb-email-object-store/pb-email-object-store.service';
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export {
|
|
41
|
-
export {
|
|
42
|
-
export {
|
|
43
|
-
export {
|
|
44
|
-
export {
|
|
38
|
+
export { IpHistoryService as ɵb } from './lib/services/internals/pb-history/pb-history.service';
|
|
39
|
+
export { PbUserInterfaceService as ɵc } from './lib/services/internals/user-interfaces/user-interface.service';
|
|
40
|
+
export { FreeUsersPbStorage as ɵe } from './lib/services/pb-storage';
|
|
41
|
+
export { UploadBottomSheetDialogComponent as ɵbj } from './lib/services/user-image-uploader-service/upload-bottom-sheet-dialog/upload-bottom-sheet-dialog.component';
|
|
42
|
+
export { UploadImageGalleryComponent as ɵbk } from './lib/services/user-image-uploader-service/upload-image-gallery/upload-image-gallery.component';
|
|
43
|
+
export { FreeUsersRestApi as ɵd } from './lib/services/user-rest-api-service';
|
|
44
|
+
export { VideoThumbnailService as ɵm } from './lib/services/video-thumbnail.service';
|
|
45
|
+
export { LIBRARY_IS_PRO as ɵbo } from './lib/tokens/private-tokens';
|