@talrace/ngx-noder 0.0.39 → 0.0.41
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/fesm2022/talrace-ngx-noder.mjs +571 -78
- package/fesm2022/talrace-ngx-noder.mjs.map +1 -1
- package/lib/apart-components/editor-ruler/editor-ruler.component.d.ts +5 -4
- package/lib/apart-components/page-setup/page-setup.component.d.ts +42 -0
- package/lib/apart-components/page-setup/shared/constants/page-sizes.const.d.ts +2 -0
- package/lib/apart-components/page-setup/shared/enums/document-areas.enum.d.ts +5 -0
- package/lib/apart-components/page-setup/shared/models/page-size.model.d.ts +14 -0
- package/lib/editor/execution/editor.d.ts +4 -0
- package/lib/editor/interaction/editor.service.d.ts +11 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { EditorService } from '../../editor/interaction/editor.service';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
type DragTarget = 'left' | 'first' | 'right';
|
|
4
5
|
interface Tick {
|
|
@@ -10,10 +11,11 @@ interface Tick {
|
|
|
10
11
|
}
|
|
11
12
|
export declare class EditorRulerComponent {
|
|
12
13
|
rulerContainer: ElementRef<HTMLDivElement>;
|
|
14
|
+
readonly editorService: EditorService;
|
|
13
15
|
readonly pxPerCm = 37.8;
|
|
14
16
|
readonly snapCm = 0.25;
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
+
readonly defaultPaddingCm = 2.5;
|
|
18
|
+
readonly pageWidth$: import("rxjs").Observable<number>;
|
|
17
19
|
containerWidthPx: number;
|
|
18
20
|
ticks: Tick[];
|
|
19
21
|
leftPx: import("@angular/core").WritableSignal<number>;
|
|
@@ -21,10 +23,9 @@ export declare class EditorRulerComponent {
|
|
|
21
23
|
rightPx: import("@angular/core").WritableSignal<number>;
|
|
22
24
|
guideX: import("@angular/core").WritableSignal<number>;
|
|
23
25
|
showGuide: import("@angular/core").WritableSignal<boolean>;
|
|
24
|
-
private maxRulePosition;
|
|
25
26
|
private dragging;
|
|
26
27
|
private dragOffsetX;
|
|
27
|
-
|
|
28
|
+
afterViewInit(): void;
|
|
28
29
|
onResize(): void;
|
|
29
30
|
private recalcGeometry;
|
|
30
31
|
private cmToPx;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { NgForm } from '@angular/forms';
|
|
3
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
4
|
+
import { DocumentAreas } from './shared/enums/document-areas.enum';
|
|
5
|
+
import { EditorService } from '../../editor/interaction/editor.service';
|
|
6
|
+
import { PageOrientations } from './shared/enums/page-orientations.enum';
|
|
7
|
+
import { PageSizeModel } from './shared/models/page-size.model';
|
|
8
|
+
import { PageSizeUnits } from './shared/enums/page-size-units.enum';
|
|
9
|
+
import { ToolbarCoreService } from '../editor-toolbar/shared/services/toolbar-core.service';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
export declare class PageSetupComponent implements OnInit {
|
|
12
|
+
private readonly editorService;
|
|
13
|
+
private readonly toolbarCoreService;
|
|
14
|
+
private readonly translateService;
|
|
15
|
+
pageSizeForm: NgForm;
|
|
16
|
+
selectedDocumentArea: DocumentAreas;
|
|
17
|
+
pageSizeName: string;
|
|
18
|
+
pageSize: PageSizeModel;
|
|
19
|
+
currentUnit: string;
|
|
20
|
+
hasSelection$: import("rxjs").Observable<boolean>;
|
|
21
|
+
readonly pageOrientations: typeof PageOrientations;
|
|
22
|
+
readonly pageSizes: PageSizeModel[];
|
|
23
|
+
readonly documentAreas: typeof DocumentAreas;
|
|
24
|
+
readonly sizeUnits: typeof PageSizeUnits;
|
|
25
|
+
private readonly rateInch;
|
|
26
|
+
private readonly rateMillimeter;
|
|
27
|
+
constructor(editorService: EditorService, toolbarCoreService: ToolbarCoreService, translateService: TranslateService);
|
|
28
|
+
ngOnInit(): void;
|
|
29
|
+
onPageSizeChange(): void;
|
|
30
|
+
onPageOrientationChanged(): void;
|
|
31
|
+
onUnitChanged(event: any): void;
|
|
32
|
+
toggleCustomSize(event: any): void;
|
|
33
|
+
onIncrementWidth(): void;
|
|
34
|
+
onDecrementWidth(): void;
|
|
35
|
+
onIncrementHeight(): void;
|
|
36
|
+
onDecrementHeight(): void;
|
|
37
|
+
onClose(): void;
|
|
38
|
+
onApply(): void;
|
|
39
|
+
private getPageSize;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PageSetupComponent, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PageSetupComponent, "app-nod-page-setup", never, {}, {}, never, never, true, never>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PageOrientations } from '../enums/page-orientations.enum';
|
|
2
|
+
import { PageSizeUnits } from '../enums/page-size-units.enum';
|
|
3
|
+
export declare class PageSizeModel {
|
|
4
|
+
name: string;
|
|
5
|
+
size: string;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
orientation: PageOrientations;
|
|
9
|
+
isCustom: boolean;
|
|
10
|
+
unit: PageSizeUnits;
|
|
11
|
+
customWidth: number;
|
|
12
|
+
customHeight: number;
|
|
13
|
+
constructor(fields?: Partial<PageSizeModel>);
|
|
14
|
+
}
|
|
@@ -195,11 +195,15 @@ export declare class Editor {
|
|
|
195
195
|
onMousePressedMove(event: MouseEvent): void;
|
|
196
196
|
provideTextStyle(component: BaseNoderComponent): void;
|
|
197
197
|
getEdgeTypeByPosition(mousePosition: number): EdgeType | null;
|
|
198
|
+
applyLeftMarginPageFormat(value: number): void;
|
|
199
|
+
applyRightMarginPageFormat(value: number): void;
|
|
198
200
|
applyPageFormat(model: PageFormatModel): void;
|
|
199
201
|
insertPageFormat(model: PageFormatModel): void;
|
|
200
202
|
applyDocumentPageFormat(model: PageFormatModel): void;
|
|
201
203
|
receiveTextStyleSubscription(): Subscription;
|
|
202
204
|
viewOnlyModeSubscription(): Subscription;
|
|
205
|
+
applyLeftMarginPageFormatSubscription(): Subscription;
|
|
206
|
+
applyRightMarginPageFormatSubscription(): Subscription;
|
|
203
207
|
applyPageFormatSubscription(): Subscription;
|
|
204
208
|
insertPageFormatSubscription(): Subscription;
|
|
205
209
|
applyDocumentPageFormatSubscription(): Subscription;
|
|
@@ -183,7 +183,17 @@ export declare class EditorService {
|
|
|
183
183
|
get applyPageFormat$(): Observable<PageFormatModel>;
|
|
184
184
|
private readonly _applyPageFormat$;
|
|
185
185
|
get pageFormat(): PageFormatModel;
|
|
186
|
-
|
|
186
|
+
get pageFormat$(): Observable<PageFormatModel>;
|
|
187
|
+
private readonly _pageFormat$;
|
|
188
|
+
get leftMarginPageFormat$(): Observable<number>;
|
|
189
|
+
private readonly _leftMarginPageFormat$;
|
|
190
|
+
get rightMarginPageFormat$(): Observable<number>;
|
|
191
|
+
private readonly _rightMarginPageFormat$;
|
|
192
|
+
get tabParagraph$(): Observable<number>;
|
|
193
|
+
private readonly _tabParagraph$;
|
|
194
|
+
applyTabParagraph(value: number): void;
|
|
195
|
+
applyRightMarginPageFormat(value: number): void;
|
|
196
|
+
applyLeftMarginPageFormat(value: number): void;
|
|
187
197
|
applyDocumentPageFormat(value: PageFormatModel): void;
|
|
188
198
|
applyPageFormat(value: PageFormatModel): void;
|
|
189
199
|
insertPageFormat(value: PageFormatModel): void;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export * from './lib/apart-components/editor-toolbar/shared/enums/alignment.enum
|
|
|
32
32
|
export * from './lib/apart-components/editor-toolbar/shared/enums/editor-toolbar-mode.enum';
|
|
33
33
|
export * from './lib/apart-components/editor-toolbar/shared/services/editor-toolbar.service';
|
|
34
34
|
export * from './lib/apart-components/text-format-mobile/text-format-mobile.component';
|
|
35
|
+
export * from './lib/apart-components/page-setup/page-setup.component';
|
|
35
36
|
export * from './lib/editor/interaction/mode.enum';
|
|
36
37
|
export * from './lib/editor/revision.helper';
|
|
37
38
|
export * from './lib/apart-components/add-link-dialog/add-link-dialog.component';
|