@myrmidon/gve-core 1.0.0 → 3.0.2
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/README.md +32 -2
- package/fesm2022/myrmidon-gve-core.mjs +1277 -927
- package/fesm2022/myrmidon-gve-core.mjs.map +1 -1
- package/lib/components/animation-timeline/animation-timeline.component.d.ts +7 -10
- package/lib/components/animation-timeline-set/animation-timeline-set.component.d.ts +9 -12
- package/lib/components/animation-tween/animation-tween.component.d.ts +6 -8
- package/lib/components/base-text-char/base-text-char.component.d.ts +3 -6
- package/lib/components/base-text-editor/base-text-editor.component.d.ts +6 -8
- package/lib/components/base-text-view/base-text-view.component.d.ts +15 -12
- package/lib/components/batch-operation-editor/batch-operation-editor.component.d.ts +5 -7
- package/lib/components/chain-operation-editor/chain-operation-editor.component.d.ts +14 -15
- package/lib/components/chain-result-view/chain-result-view.component.d.ts +8 -11
- package/lib/components/chain-view/chain-view.component.d.ts +42 -0
- package/lib/components/feature-editor/feature-editor.component.d.ts +8 -12
- package/lib/components/feature-set-editor/feature-set-editor.component.d.ts +11 -13
- package/lib/components/feature-set-view/feature-set-view.component.d.ts +5 -7
- package/lib/components/ln-heights-editor/ln-heights-editor.component.d.ts +5 -8
- package/lib/components/operation-source-editor/operation-source-editor.component.d.ts +8 -11
- package/lib/components/snapshot-editor/snapshot-editor.component.d.ts +46 -35
- package/lib/components/snapshot-text-editor/snapshot-text-editor.component.d.ts +37 -0
- package/lib/components/steps-map/steps-map.component.d.ts +9 -9
- package/lib/services/gve-api.service.d.ts +48 -4
- package/lib/services/gve-graphviz.service.d.ts +20 -0
- package/lib/services/settings.service.d.ts +40 -5
- package/package.json +5 -5
- package/public-api.d.ts +3 -1
- package/lib/components/simple-tree/simple-tree.component.d.ts +0 -35
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { FormBuilder, FormControl } from '@angular/forms';
|
|
3
3
|
import { LabeledId, Feature, OperationFeature } from '@myrmidon/gve-snapshot-view';
|
|
4
4
|
import { FeatureMap } from '../feature-editor/feature-editor.component';
|
|
@@ -19,7 +19,7 @@ import * as i0 from "@angular/core";
|
|
|
19
19
|
* - ▶️ `filterThreshold` (`number`): the threshold at which the features filter
|
|
20
20
|
* should become visible. If set to 0, the filter is always visible; if set to -1,
|
|
21
21
|
* it is always invisible; otherwise, it gets visible when the number of features
|
|
22
|
-
* is greater than the threshold. Default is 5.
|
|
22
|
+
* is equal to or greater than the threshold. Default is 5.
|
|
23
23
|
* - ▶️ `features` (`Feature[]`): the features to edit.
|
|
24
24
|
* - ▶️ `isVar`: true if the feature is a variant operation feature, which
|
|
25
25
|
* has additional properties like negation, global, and short-lived.
|
|
@@ -27,40 +27,38 @@ import * as i0 from "@angular/core";
|
|
|
27
27
|
*/
|
|
28
28
|
export declare class FeatureSetEditorComponent implements OnInit, OnDestroy {
|
|
29
29
|
private _sub?;
|
|
30
|
-
private _features;
|
|
31
30
|
private _editedFeatureIndex;
|
|
32
31
|
POLICIES: string[];
|
|
33
32
|
/**
|
|
34
33
|
* True if the features are variable features.
|
|
35
34
|
*/
|
|
36
|
-
isVar: boolean
|
|
35
|
+
readonly isVar: import("@angular/core").InputSignal<boolean>;
|
|
37
36
|
/**
|
|
38
37
|
* The list of feature names to display in the name selection.
|
|
39
38
|
* This is used when you have a closed list of features.
|
|
40
39
|
*/
|
|
41
|
-
featNames: LabeledId[] | undefined
|
|
40
|
+
readonly featNames: import("@angular/core").InputSignal<LabeledId[] | undefined>;
|
|
42
41
|
/**
|
|
43
42
|
* The feature values map. When specified and the user selects a feature
|
|
44
43
|
* name present in the map keys, the corresponding values will be used
|
|
45
44
|
* to populate the value selection.
|
|
46
45
|
*/
|
|
47
|
-
featValues: FeatureMap | undefined
|
|
46
|
+
readonly featValues: import("@angular/core").InputSignal<FeatureMap | undefined>;
|
|
48
47
|
/**
|
|
49
48
|
* The threshold at which the features filter should become visible.
|
|
50
49
|
* If set to 0, the filter is always visible; if set to -1, it is always
|
|
51
50
|
* invisible; otherwise, it gets visible when the number of features
|
|
52
|
-
* is greater than the threshold. Default is 5.
|
|
51
|
+
* is greater than or equal to the threshold. Default is 5.
|
|
53
52
|
*/
|
|
54
|
-
filterThreshold: number
|
|
53
|
+
readonly filterThreshold: import("@angular/core").InputSignal<number>;
|
|
55
54
|
/**
|
|
56
55
|
* The features to edit.
|
|
57
56
|
*/
|
|
58
|
-
|
|
59
|
-
set features(value: Feature[] | OperationFeature[]);
|
|
57
|
+
readonly features: import("@angular/core").ModelSignal<Feature[] | OperationFeature[]>;
|
|
60
58
|
/**
|
|
61
59
|
* Emitted when the features change.
|
|
62
60
|
*/
|
|
63
|
-
featuresChange:
|
|
61
|
+
readonly featuresChange: import("@angular/core").OutputEmitterRef<Feature[] | OperationFeature[]>;
|
|
64
62
|
editedFeature?: Feature | OperationFeature;
|
|
65
63
|
filter: FormControl<string | null>;
|
|
66
64
|
filteredFeatures: Feature[] | OperationFeature[];
|
|
@@ -71,8 +69,8 @@ export declare class FeatureSetEditorComponent implements OnInit, OnDestroy {
|
|
|
71
69
|
addFeature(): void;
|
|
72
70
|
editFeature(feature: Feature | OperationFeature): void;
|
|
73
71
|
deleteFeature(feature: Feature | OperationFeature): void;
|
|
74
|
-
onFeatureChange(feature
|
|
72
|
+
onFeatureChange(feature?: Feature | OperationFeature): void;
|
|
75
73
|
onFeatureCancel(): void;
|
|
76
74
|
static ɵfac: i0.ɵɵFactoryDeclaration<FeatureSetEditorComponent, never>;
|
|
77
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FeatureSetEditorComponent, "gve-feature-set-editor", never, { "isVar": { "alias": "isVar"; "required": false; }; "featNames": { "alias": "featNames"; "required": false; }; "featValues": { "alias": "featValues"; "required": false; }; "filterThreshold": { "alias": "filterThreshold"; "required": false; }; "features": { "alias": "features"; "required": false; }; }, { "featuresChange": "featuresChange"; }, never, never, true, never>;
|
|
75
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FeatureSetEditorComponent, "gve-feature-set-editor", never, { "isVar": { "alias": "isVar"; "required": false; "isSignal": true; }; "featNames": { "alias": "featNames"; "required": false; "isSignal": true; }; "featValues": { "alias": "featValues"; "required": false; "isSignal": true; }; "filterThreshold": { "alias": "filterThreshold"; "required": false; "isSignal": true; }; "features": { "alias": "features"; "required": false; "isSignal": true; }; }, { "features": "featuresChange"; "featuresChange": "featuresChange"; }, never, never, true, never>;
|
|
78
76
|
}
|
|
@@ -21,30 +21,28 @@ import * as i0 from "@angular/core";
|
|
|
21
21
|
*/
|
|
22
22
|
export declare class FeatureSetViewComponent {
|
|
23
23
|
private _sub?;
|
|
24
|
-
private _features;
|
|
25
24
|
/**
|
|
26
25
|
* The features.
|
|
27
26
|
*/
|
|
28
|
-
|
|
29
|
-
set features(value: Feature[] | OperationFeature[]);
|
|
27
|
+
readonly features: import("@angular/core").InputSignal<Feature[] | OperationFeature[]>;
|
|
30
28
|
/**
|
|
31
29
|
* The list of feature names to display in the name selection.
|
|
32
30
|
* This is used when you have a closed list of features.
|
|
33
31
|
*/
|
|
34
|
-
featNames: LabeledId[] | undefined
|
|
32
|
+
readonly featNames: import("@angular/core").InputSignal<LabeledId[] | undefined>;
|
|
35
33
|
/**
|
|
36
34
|
* The feature values map. When specified and the user selects a feature
|
|
37
35
|
* name present in the map keys, the corresponding values will be used
|
|
38
36
|
* to populate the value selection.
|
|
39
37
|
*/
|
|
40
|
-
featValues: FeatureMap | undefined
|
|
38
|
+
readonly featValues: import("@angular/core").InputSignal<FeatureMap | undefined>;
|
|
41
39
|
/**
|
|
42
40
|
* The threshold at which the features filter should become visible.
|
|
43
41
|
* If set to 0, the filter is always visible; if set to -1, it is always
|
|
44
42
|
* invisible; otherwise, it gets visible when the number of features
|
|
45
43
|
* is greater than the threshold. Default is 5.
|
|
46
44
|
*/
|
|
47
|
-
filterThreshold: number
|
|
45
|
+
readonly filterThreshold: import("@angular/core").InputSignal<number>;
|
|
48
46
|
filter: FormControl<string | null>;
|
|
49
47
|
filteredFeatures: Feature[] | OperationFeature[];
|
|
50
48
|
constructor(formBuilder: FormBuilder);
|
|
@@ -52,5 +50,5 @@ export declare class FeatureSetViewComponent {
|
|
|
52
50
|
ngOnInit(): void;
|
|
53
51
|
ngOnDestroy(): void;
|
|
54
52
|
static ɵfac: i0.ɵɵFactoryDeclaration<FeatureSetViewComponent, never>;
|
|
55
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FeatureSetViewComponent, "gve-feature-set-view", never, { "features": { "alias": "features"; "required": false; }; "featNames": { "alias": "featNames"; "required": false; }; "featValues": { "alias": "featValues"; "required": false; }; "filterThreshold": { "alias": "filterThreshold"; "required": false; }; }, {}, never, never, true, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FeatureSetViewComponent, "gve-feature-set-view", never, { "features": { "alias": "features"; "required": false; "isSignal": true; }; "featNames": { "alias": "featNames"; "required": false; "isSignal": true; }; "featValues": { "alias": "featValues"; "required": false; "isSignal": true; }; "filterThreshold": { "alias": "filterThreshold"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
56
54
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { FormBuilder, FormControl } from '@angular/forms';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
@@ -15,24 +15,21 @@ import * as i0 from "@angular/core";
|
|
|
15
15
|
export declare class LnHeightsEditorComponent implements OnInit, OnDestroy {
|
|
16
16
|
private _subs?;
|
|
17
17
|
private _heights?;
|
|
18
|
-
private _lineCount;
|
|
19
18
|
lineNumber: FormControl<number>;
|
|
20
19
|
height: FormControl<number>;
|
|
21
20
|
/**
|
|
22
21
|
* The total number of lines in the text.
|
|
23
22
|
*/
|
|
24
|
-
|
|
25
|
-
set lineCount(value: number);
|
|
23
|
+
readonly lineCount: import("@angular/core").InputSignal<number>;
|
|
26
24
|
/**
|
|
27
25
|
* The heights map of the lines. Each key is a line number and the value is
|
|
28
26
|
* the height of the line.
|
|
29
27
|
*/
|
|
30
|
-
|
|
31
|
-
set heights(value: Record<number, number> | undefined | null);
|
|
28
|
+
readonly heights: import("@angular/core").InputSignal<Record<number, number> | undefined>;
|
|
32
29
|
/**
|
|
33
30
|
* The event emitted when the heights change.
|
|
34
31
|
*/
|
|
35
|
-
readonly heightsChange:
|
|
32
|
+
readonly heightsChange: import("@angular/core").OutputEmitterRef<Record<number, number> | undefined>;
|
|
36
33
|
lineNumbers: number[];
|
|
37
34
|
constructor(formBuilder: FormBuilder);
|
|
38
35
|
private pruneHeights;
|
|
@@ -40,5 +37,5 @@ export declare class LnHeightsEditorComponent implements OnInit, OnDestroy {
|
|
|
40
37
|
ngOnDestroy(): void;
|
|
41
38
|
reset(): void;
|
|
42
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<LnHeightsEditorComponent, never>;
|
|
43
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LnHeightsEditorComponent, "gve-ln-heights-editor", never, { "lineCount": { "alias": "lineCount"; "required": false; }; "heights": { "alias": "heights"; "required": false; }; }, { "heightsChange": "heightsChange"; }, never, never, true, never>;
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LnHeightsEditorComponent, "gve-ln-heights-editor", never, { "lineCount": { "alias": "lineCount"; "required": false; "isSignal": true; }; "heights": { "alias": "heights"; "required": false; "isSignal": true; }; }, { "heightsChange": "heightsChange"; }, never, never, true, never>;
|
|
44
41
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
1
|
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
3
2
|
import { LabeledId, OperationSource } from '@myrmidon/gve-snapshot-view';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
@@ -19,28 +18,26 @@ import * as i0 from "@angular/core";
|
|
|
19
18
|
* edit is canceled.
|
|
20
19
|
*/
|
|
21
20
|
export declare class OperationSourceEditorComponent {
|
|
22
|
-
private _source;
|
|
23
21
|
/**
|
|
24
22
|
* The source to edit.
|
|
25
23
|
*/
|
|
26
|
-
|
|
27
|
-
set source(value: OperationSource | undefined | null);
|
|
24
|
+
readonly source: import("@angular/core").ModelSignal<OperationSource | undefined>;
|
|
28
25
|
/**
|
|
29
|
-
* The list of source IDs when it's closed.
|
|
26
|
+
* The list of source IDs when it's a closed set.
|
|
30
27
|
*/
|
|
31
|
-
ids
|
|
28
|
+
readonly ids: import("@angular/core").InputSignal<LabeledId[] | undefined>;
|
|
32
29
|
/**
|
|
33
|
-
* The list of source types when it's closed.
|
|
30
|
+
* The list of source types when it's a closed set.
|
|
34
31
|
*/
|
|
35
|
-
types
|
|
32
|
+
readonly types: import("@angular/core").InputSignal<LabeledId[] | undefined>;
|
|
36
33
|
/**
|
|
37
34
|
* The event emitted when the source changes.
|
|
38
35
|
*/
|
|
39
|
-
readonly sourceChange:
|
|
36
|
+
readonly sourceChange: import("@angular/core").OutputEmitterRef<OperationSource | undefined>;
|
|
40
37
|
/**
|
|
41
38
|
* The event emitted when the edit is canceled.
|
|
42
39
|
*/
|
|
43
|
-
sourceCancel:
|
|
40
|
+
sourceCancel: import("@angular/core").OutputEmitterRef<void>;
|
|
44
41
|
id: FormControl<string>;
|
|
45
42
|
type: FormControl<string>;
|
|
46
43
|
rank: FormControl<number>;
|
|
@@ -51,5 +48,5 @@ export declare class OperationSourceEditorComponent {
|
|
|
51
48
|
cancel(): void;
|
|
52
49
|
save(): void;
|
|
53
50
|
static ɵfac: i0.ɵɵFactoryDeclaration<OperationSourceEditorComponent, never>;
|
|
54
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<OperationSourceEditorComponent, "gve-operation-source-editor", never, { "source": { "alias": "source"; "required": false; }; "ids": { "alias": "ids"; "required": false; }; "types": { "alias": "types"; "required": false; }; }, { "sourceChange": "sourceChange"; "sourceCancel": "sourceCancel"; }, never, never, true, never>;
|
|
51
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OperationSourceEditorComponent, "gve-operation-source-editor", never, { "source": { "alias": "source"; "required": false; "isSignal": true; }; "ids": { "alias": "ids"; "required": false; "isSignal": true; }; "types": { "alias": "types"; "required": false; "isSignal": true; }; }, { "source": "sourceChange"; "sourceChange": "sourceChange"; "sourceCancel": "sourceCancel"; }, never, never, true, never>;
|
|
55
52
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ElementRef
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
2
|
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
4
4
|
import { MatDialog } from '@angular/material/dialog';
|
|
5
|
-
import { DialogService } from '@myrmidon/
|
|
5
|
+
import { DialogService } from '@myrmidon/ngx-mat-tools';
|
|
6
6
|
import { CharChainOperation, CharNode, GveAnimationTimeline, GveVisualEvent, Snapshot, SnapshotViewComponent, SnapshotViewData, SnapshotViewRenderEvent } from '@myrmidon/gve-snapshot-view';
|
|
7
7
|
import { VarBaseTextRange } from '../base-text-view/base-text-view.component';
|
|
8
|
-
import { ChainOperationContextStep, CharChainResult, GveApiService } from '../../services/gve-api.service';
|
|
8
|
+
import { ChainOperationContextStep, CharChain, CharChainResult, GveApiService } from '../../services/gve-api.service';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
/**
|
|
11
11
|
* 🔑 `gve-snapshot-editor`
|
|
@@ -25,7 +25,6 @@ export declare class SnapshotEditorComponent {
|
|
|
25
25
|
private _dialogService;
|
|
26
26
|
private _snackbar;
|
|
27
27
|
private readonly _nanoid;
|
|
28
|
-
private _snapshot?;
|
|
29
28
|
private _renderer?;
|
|
30
29
|
private _previewing?;
|
|
31
30
|
private _transparentIds?;
|
|
@@ -34,32 +33,31 @@ export declare class SnapshotEditorComponent {
|
|
|
34
33
|
/**
|
|
35
34
|
* The snapshot to edit.
|
|
36
35
|
*/
|
|
37
|
-
|
|
38
|
-
set snapshot(value: Snapshot | undefined | null);
|
|
36
|
+
readonly snapshot: import("@angular/core").ModelSignal<Snapshot | undefined>;
|
|
39
37
|
/**
|
|
40
38
|
* The batch operations text to set for the editor.
|
|
41
39
|
*/
|
|
42
|
-
batchOps
|
|
40
|
+
readonly batchOps: import("@angular/core").InputSignal<string | undefined>;
|
|
43
41
|
/**
|
|
44
42
|
* True to disable saving.
|
|
45
43
|
*/
|
|
46
|
-
noSave
|
|
44
|
+
readonly noSave: import("@angular/core").InputSignal<boolean | undefined>;
|
|
47
45
|
/**
|
|
48
46
|
* True to enable debug mode for view rendition.
|
|
49
47
|
*/
|
|
50
|
-
debug
|
|
48
|
+
readonly debug: import("@angular/core").InputSignal<boolean | undefined>;
|
|
51
49
|
/**
|
|
52
50
|
* Emitted when the user saves the edited snapshot.
|
|
53
51
|
*/
|
|
54
|
-
readonly snapshotChange:
|
|
52
|
+
readonly snapshotChange: import("@angular/core").OutputEmitterRef<Snapshot>;
|
|
55
53
|
/**
|
|
56
54
|
* Emitted when the user cancels the snapshot editing.
|
|
57
55
|
*/
|
|
58
|
-
readonly snapshotCancel:
|
|
56
|
+
readonly snapshotCancel: import("@angular/core").OutputEmitterRef<void>;
|
|
59
57
|
width: FormControl<number>;
|
|
60
58
|
height: FormControl<number>;
|
|
61
59
|
style: FormControl<string | null>;
|
|
62
|
-
baseText: FormControl<CharNode[]
|
|
60
|
+
baseText: FormControl<CharNode[]>;
|
|
63
61
|
offsetX: FormControl<number>;
|
|
64
62
|
offsetY: FormControl<number>;
|
|
65
63
|
lineHeightOffset: FormControl<number>;
|
|
@@ -103,6 +101,8 @@ export declare class SnapshotEditorComponent {
|
|
|
103
101
|
result?: CharChainResult;
|
|
104
102
|
resultOperationId?: string;
|
|
105
103
|
initialStepIndex: number;
|
|
104
|
+
readonly showChain: FormControl<boolean>;
|
|
105
|
+
chain?: CharChain;
|
|
106
106
|
constructor(formBuilder: FormBuilder, _api: GveApiService, _dialog: MatDialog, _dialogService: DialogService, _snackbar: MatSnackBar);
|
|
107
107
|
/**
|
|
108
108
|
* Set the view data for the snapshot view.
|
|
@@ -113,6 +113,7 @@ export declare class SnapshotEditorComponent {
|
|
|
113
113
|
*/
|
|
114
114
|
private setViewData;
|
|
115
115
|
private updateForm;
|
|
116
|
+
inputBaseText(): void;
|
|
116
117
|
/**
|
|
117
118
|
* Update the line count based on the received text.
|
|
118
119
|
* @param text The text to use for counting lines.
|
|
@@ -122,12 +123,7 @@ export declare class SnapshotEditorComponent {
|
|
|
122
123
|
* Handle the event fired by the base text editor to pick a text range.
|
|
123
124
|
* @param range The picked range.
|
|
124
125
|
*/
|
|
125
|
-
onRangePick(range
|
|
126
|
-
/**
|
|
127
|
-
* Handle the event fired by the base text editor to change the base text.
|
|
128
|
-
* @param text The text to set.
|
|
129
|
-
*/
|
|
130
|
-
onTextChange(text: CharNode[]): void;
|
|
126
|
+
onRangePick(range?: VarBaseTextRange): void;
|
|
131
127
|
/**
|
|
132
128
|
* Update the lists of operation output tags and element IDs by collecting
|
|
133
129
|
* all the operation tags and the IDs of the elements in their diplomatic.g
|
|
@@ -158,7 +154,7 @@ export declare class SnapshotEditorComponent {
|
|
|
158
154
|
* was a new operation.
|
|
159
155
|
* @param op The changed operation.
|
|
160
156
|
*/
|
|
161
|
-
onOperationChange(op
|
|
157
|
+
onOperationChange(op?: CharChainOperation | null): void;
|
|
162
158
|
/**
|
|
163
159
|
* Delete the operation at the specified index.
|
|
164
160
|
* @param index The index of the operation to delete.
|
|
@@ -169,6 +165,9 @@ export declare class SnapshotEditorComponent {
|
|
|
169
165
|
* snapshot operations.
|
|
170
166
|
*/
|
|
171
167
|
parseOperations(): void;
|
|
168
|
+
/**
|
|
169
|
+
* Remove all the operations, close the edited operation and update the view data.
|
|
170
|
+
*/
|
|
172
171
|
private removeAllOperations;
|
|
173
172
|
/**
|
|
174
173
|
* Remove all the operations.
|
|
@@ -183,6 +182,24 @@ export declare class SnapshotEditorComponent {
|
|
|
183
182
|
*/
|
|
184
183
|
private parseSvgIds;
|
|
185
184
|
private getTransparentIds;
|
|
185
|
+
/**
|
|
186
|
+
* Supply operation nodes to the snapshot text nodes. An execution result is
|
|
187
|
+
* a compact object, so that to build a snapshot accumulating all the nodes
|
|
188
|
+
* and their features up to the last executed operation, we need to start
|
|
189
|
+
* with the base text nodes, and then examine each execution step in the
|
|
190
|
+
* result. Each step contains only those nodes used by the version of the
|
|
191
|
+
* text corresponding to its stage. Among them, some are new nodes, and some
|
|
192
|
+
* are base text nodes. Also, the step contains the full set of features
|
|
193
|
+
* current at its time, both for the text as a whole and for each node.
|
|
194
|
+
* This method accumulates the nodes and their features up to the specified
|
|
195
|
+
* step, updating the features of the nodes already present in the snapshot
|
|
196
|
+
* text nodes, and adding the new nodes.
|
|
197
|
+
*
|
|
198
|
+
* @param snapshot The snapshot to supply the nodes to.
|
|
199
|
+
* @param result The operations execution result.
|
|
200
|
+
* @param tag The output tag of the operation to supply the nodes from.
|
|
201
|
+
*/
|
|
202
|
+
private supplyOpNodes;
|
|
186
203
|
/**
|
|
187
204
|
* Run the operations up to the specified index (included).
|
|
188
205
|
* This is called when:
|
|
@@ -198,14 +215,16 @@ export declare class SnapshotEditorComponent {
|
|
|
198
215
|
* @param lastOperation The operation to use in place of the existing
|
|
199
216
|
* operation in the snapshot at index. This is used when previewing
|
|
200
217
|
* the edited operation from within the operation editor.
|
|
218
|
+
* @returns A promise that resolves to the execution result.
|
|
201
219
|
*/
|
|
202
|
-
runTo(index: number, lastOperation?: CharChainOperation):
|
|
220
|
+
runTo(index: number, lastOperation?: CharChainOperation): void;
|
|
203
221
|
/**
|
|
204
222
|
* Run the operations up to the last operation if any, updating the
|
|
205
223
|
* execution result. The execution result is always the result from
|
|
206
224
|
* all the operations, as users must be able to browse across its steps.
|
|
207
225
|
*/
|
|
208
|
-
runToLast():
|
|
226
|
+
runToLast(): void;
|
|
227
|
+
getChainAt(index: number, lastOperation?: CharChainOperation): void;
|
|
209
228
|
/**
|
|
210
229
|
* Update the snapshot view by running the operations up to the
|
|
211
230
|
* currently edited operation if any.
|
|
@@ -213,24 +232,13 @@ export declare class SnapshotEditorComponent {
|
|
|
213
232
|
* @param operation The operation being previewed.
|
|
214
233
|
*/
|
|
215
234
|
onOperationPreview(operation: CharChainOperation): void;
|
|
216
|
-
/**
|
|
217
|
-
* Build the snapshot at the specified execution step. This implies adding
|
|
218
|
-
* the nodes introduced by the operations up to the specified step, and
|
|
219
|
-
* updating the features of the nodes introduced by the specified step.
|
|
220
|
-
* Also, the operations after the specified step are removed from the
|
|
221
|
-
* snapshot.
|
|
222
|
-
*
|
|
223
|
-
* @param step The step to build the snapshot at.
|
|
224
|
-
* @returns The snapshot at the specified step.
|
|
225
|
-
*/
|
|
226
|
-
private buildSnapshotAtStep;
|
|
227
235
|
private playTimeline;
|
|
228
236
|
/**
|
|
229
237
|
* Handle the event fired by the chain result view to pick a step.
|
|
230
238
|
*
|
|
231
239
|
* @param step The step to pick.
|
|
232
240
|
*/
|
|
233
|
-
onStepPick(step: ChainOperationContextStep):
|
|
241
|
+
onStepPick(step: ChainOperationContextStep): void;
|
|
234
242
|
/**
|
|
235
243
|
* Handle the event fired by a visual in the snapshot view.
|
|
236
244
|
*
|
|
@@ -248,7 +256,7 @@ export declare class SnapshotEditorComponent {
|
|
|
248
256
|
*
|
|
249
257
|
* @param timelines The timelines.
|
|
250
258
|
*/
|
|
251
|
-
onTimelinesChange(timelines
|
|
259
|
+
onTimelinesChange(timelines?: GveAnimationTimeline[] | null): void;
|
|
252
260
|
/**
|
|
253
261
|
* Emit the cancel event for this snapshot edit.
|
|
254
262
|
*/
|
|
@@ -260,6 +268,9 @@ export declare class SnapshotEditorComponent {
|
|
|
260
268
|
* @param event The rendition event.
|
|
261
269
|
*/
|
|
262
270
|
onSnapshotRender(event: CustomEvent<SnapshotViewRenderEvent>): void;
|
|
271
|
+
onImageLoad(imageElement: HTMLImageElement): void;
|
|
272
|
+
onImageOpacityChange(value: number): void;
|
|
273
|
+
resetImgMetadata(): void;
|
|
263
274
|
/**
|
|
264
275
|
* Toggle rulers in the snapshot view.
|
|
265
276
|
*/
|
|
@@ -276,5 +287,5 @@ export declare class SnapshotEditorComponent {
|
|
|
276
287
|
*/
|
|
277
288
|
save(): void;
|
|
278
289
|
static ɵfac: i0.ɵɵFactoryDeclaration<SnapshotEditorComponent, never>;
|
|
279
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SnapshotEditorComponent, "gve-snapshot-editor", never, { "snapshot": { "alias": "snapshot"; "required": false; }; "batchOps": { "alias": "batchOps"; "required": false; }; "noSave": { "alias": "noSave"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; }, { "snapshotChange": "snapshotChange"; "snapshotCancel": "snapshotCancel"; }, never, never, true, never>;
|
|
290
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SnapshotEditorComponent, "gve-snapshot-editor", never, { "snapshot": { "alias": "snapshot"; "required": false; "isSignal": true; }; "batchOps": { "alias": "batchOps"; "required": false; "isSignal": true; }; "noSave": { "alias": "noSave"; "required": false; "isSignal": true; }; "debug": { "alias": "debug"; "required": false; "isSignal": true; }; }, { "snapshot": "snapshotChange"; "snapshotChange": "snapshotChange"; "snapshotCancel": "snapshotCancel"; }, never, never, true, never>;
|
|
280
291
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
3
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
4
|
+
import { CharNode } from '@myrmidon/gve-snapshot-view';
|
|
5
|
+
import { PayloadMatDialogConfig } from '../../models';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* 🔑 `gve-snapshot-text-editor`
|
|
9
|
+
*
|
|
10
|
+
* A component to edit a snapshot text. This component can be used both in a dialog
|
|
11
|
+
* and as a standalone component.
|
|
12
|
+
*
|
|
13
|
+
* - ▶️ `text` (`CharNode[]`): the text to edit.
|
|
14
|
+
* - 🔥 `textChange` (`CharNode[]`): event emitted when text changes.
|
|
15
|
+
*/
|
|
16
|
+
export declare class SnapshotTextEditorComponent implements OnInit {
|
|
17
|
+
dialogRef?: MatDialogRef<SnapshotTextEditorComponent> | undefined;
|
|
18
|
+
data?: PayloadMatDialogConfig<{
|
|
19
|
+
text?: CharNode[];
|
|
20
|
+
}> | undefined;
|
|
21
|
+
userText: FormControl<string>;
|
|
22
|
+
form: FormGroup;
|
|
23
|
+
readonly text: import("@angular/core").ModelSignal<CharNode[]>;
|
|
24
|
+
/**
|
|
25
|
+
* Emitted when text changes.
|
|
26
|
+
*/
|
|
27
|
+
readonly textChange: import("@angular/core").OutputEmitterRef<CharNode[]>;
|
|
28
|
+
constructor(formBuilder: FormBuilder, dialogRef?: MatDialogRef<SnapshotTextEditorComponent> | undefined, data?: PayloadMatDialogConfig<{
|
|
29
|
+
text?: CharNode[];
|
|
30
|
+
}> | undefined);
|
|
31
|
+
private updateUserText;
|
|
32
|
+
ngOnInit(): void;
|
|
33
|
+
close(): void;
|
|
34
|
+
save(): void;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SnapshotTextEditorComponent, [null, { optional: true; }, { optional: true; }]>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SnapshotTextEditorComponent, "gve-snapshot-text-editor", never, { "text": { "alias": "text"; "required": false; "isSignal": true; }; }, { "text": "textChange"; "textChange": "textChange"; }, never, never, true, never>;
|
|
37
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
1
|
import { ChainOperationContextStep } from '../../services/gve-api.service';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
/**
|
|
@@ -21,28 +20,29 @@ import * as i0 from "@angular/core";
|
|
|
21
20
|
* automatically selected.
|
|
22
21
|
*/
|
|
23
22
|
export declare class StepsMapComponent {
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
lines: {
|
|
24
|
+
[key: string]: string[];
|
|
25
|
+
};
|
|
26
26
|
/**
|
|
27
27
|
* The steps to display.
|
|
28
28
|
*/
|
|
29
|
-
|
|
30
|
-
set steps(value: ChainOperationContextStep[] | undefined | null);
|
|
29
|
+
readonly steps: import("@angular/core").InputSignal<ChainOperationContextStep[]>;
|
|
31
30
|
/**
|
|
32
31
|
* The step that is currently selected.
|
|
33
32
|
*/
|
|
34
|
-
selectedStep: ChainOperationContextStep | undefined
|
|
33
|
+
readonly selectedStep: import("@angular/core").ModelSignal<ChainOperationContextStep | undefined>;
|
|
35
34
|
/**
|
|
36
35
|
* The font size of the steps text.
|
|
37
36
|
*/
|
|
38
|
-
textFontSize: string
|
|
37
|
+
readonly textFontSize: import("@angular/core").InputSignal<string>;
|
|
39
38
|
/**
|
|
40
39
|
* Emitted when the selected step has changed by user, or when
|
|
41
40
|
* the steps are set for the first time.
|
|
42
41
|
*/
|
|
43
|
-
selectedStepChange:
|
|
42
|
+
selectedStepChange: import("@angular/core").OutputEmitterRef<ChainOperationContextStep | undefined>;
|
|
43
|
+
constructor();
|
|
44
44
|
private updateLines;
|
|
45
45
|
onStepClick(step: ChainOperationContextStep): void;
|
|
46
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<StepsMapComponent, never>;
|
|
47
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StepsMapComponent, "gve-steps-map", never, { "steps": { "alias": "steps"; "required": false; }; "selectedStep": { "alias": "selectedStep"; "required": false; }; "textFontSize": { "alias": "textFontSize"; "required": false; }; }, { "selectedStepChange": "selectedStepChange"; }, never, never, true, never>;
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StepsMapComponent, "gve-steps-map", never, { "steps": { "alias": "steps"; "required": false; "isSignal": true; }; "selectedStep": { "alias": "selectedStep"; "required": false; "isSignal": true; }; "textFontSize": { "alias": "textFontSize"; "required": false; "isSignal": true; }; }, { "selectedStep": "selectedStepChange"; "selectedStepChange": "selectedStepChange"; }, never, never, true, never>;
|
|
48
48
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { ErrorService, EnvService } from '@myrmidon/
|
|
3
|
+
import { ErrorService, EnvService } from '@myrmidon/ngx-tools';
|
|
4
4
|
import { CharChainOperation, CharNode, OperationFeature } from '@myrmidon/gve-snapshot-view';
|
|
5
5
|
import { ResultWrapper } from '../models';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
@@ -21,13 +21,16 @@ export interface ChainOperationContextStep {
|
|
|
21
21
|
*/
|
|
22
22
|
outputTag: string;
|
|
23
23
|
/**
|
|
24
|
-
* The string synthetically representing the
|
|
24
|
+
* The string synthetically representing the resulting text
|
|
25
|
+
* version.
|
|
25
26
|
*/
|
|
26
27
|
result?: string;
|
|
27
28
|
/**
|
|
28
29
|
* The features emitted up to the executed operation.
|
|
29
30
|
* These are the features of the text as a whole, and
|
|
30
|
-
* those belonging to specific nodes
|
|
31
|
+
* those belonging to specific nodes, each keyed under
|
|
32
|
+
* a string built with `v` + output version tag + `_`
|
|
33
|
+
* + node ID (e.g. `v1_2` for node with ID 2 at version 1).
|
|
31
34
|
*/
|
|
32
35
|
featureSet: {
|
|
33
36
|
features: OperationFeature[];
|
|
@@ -52,11 +55,15 @@ export interface CharChainResult {
|
|
|
52
55
|
*/
|
|
53
56
|
chainDump: string;
|
|
54
57
|
/**
|
|
55
|
-
* The list of unique tags in the chain.
|
|
58
|
+
* The list of all unique tags in the chain.
|
|
56
59
|
*/
|
|
57
60
|
chainTags: string[];
|
|
58
61
|
/**
|
|
59
62
|
* The sets of nodes in their order, for each version tag.
|
|
63
|
+
* These nodes are collected by following the path defined
|
|
64
|
+
* by the set of links of each version tag; so each of the
|
|
65
|
+
* sets contains only the nodes used at that step to build
|
|
66
|
+
* the text version, with their features up to that stage.
|
|
60
67
|
*/
|
|
61
68
|
taggedNodes: {
|
|
62
69
|
[key: string]: CharNode[];
|
|
@@ -69,6 +76,33 @@ export interface ChainOperationTags {
|
|
|
69
76
|
inputTag: string;
|
|
70
77
|
outputTag: string;
|
|
71
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* The node of a character-based chain, used for diagnostic
|
|
81
|
+
* or demonstration purposes.
|
|
82
|
+
*/
|
|
83
|
+
export interface CharChainNode {
|
|
84
|
+
id: number;
|
|
85
|
+
label: string;
|
|
86
|
+
data: string;
|
|
87
|
+
sourceTag?: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The link of a character-based chain, used for diagnostic
|
|
91
|
+
* or demonstration purposes.
|
|
92
|
+
*/
|
|
93
|
+
export interface CharChainLink {
|
|
94
|
+
tag: string;
|
|
95
|
+
sourceId: number;
|
|
96
|
+
targetId: number;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* The character-based chain, as resulting from running operations
|
|
100
|
+
* on a base text, used for diagnostic or demonstration purposes.
|
|
101
|
+
*/
|
|
102
|
+
export interface CharChain {
|
|
103
|
+
nodes: CharChainNode[];
|
|
104
|
+
links: CharChainLink[];
|
|
105
|
+
}
|
|
72
106
|
/**
|
|
73
107
|
* Service to interact with the GVE API.
|
|
74
108
|
*/
|
|
@@ -99,6 +133,16 @@ export declare class GveApiService {
|
|
|
99
133
|
* @returns Result wrapper.
|
|
100
134
|
*/
|
|
101
135
|
getTags(operations: CharChainOperation[]): Observable<ResultWrapper<string[]>>;
|
|
136
|
+
/**
|
|
137
|
+
* Get the chain corresponding to the operations run on the
|
|
138
|
+
* specified text. This is used for diagnostic or demonstration
|
|
139
|
+
* purposes.
|
|
140
|
+
*
|
|
141
|
+
* @param text The base text.
|
|
142
|
+
* @param operations The operations to run.
|
|
143
|
+
* @returns Result wrapper.
|
|
144
|
+
*/
|
|
145
|
+
getChain(text: CharNode[], operations: CharChainOperation[]): Observable<ResultWrapper<CharChain>>;
|
|
102
146
|
static ɵfac: i0.ɵɵFactoryDeclaration<GveApiService, never>;
|
|
103
147
|
static ɵprov: i0.ɵɵInjectableDeclaration<GveApiService>;
|
|
104
148
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CharChain } from './gve-api.service';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export type GraphvizRankdir = 'TB' | 'LR' | 'BT' | 'RL';
|
|
4
|
+
export declare class GveGraphvizService {
|
|
5
|
+
private hashString;
|
|
6
|
+
private hslToRgb;
|
|
7
|
+
private getColorForTag;
|
|
8
|
+
private getExcludedNodeIds;
|
|
9
|
+
/**
|
|
10
|
+
* Represent the received chain as a Graphviz digraph.
|
|
11
|
+
*
|
|
12
|
+
* @param chain The source chain if any.
|
|
13
|
+
* @param tags The tags to show. When set, only the links with these tags are shown.
|
|
14
|
+
* @param rankdir The rank direction.
|
|
15
|
+
* @returns Graphviz representation of the chain.
|
|
16
|
+
*/
|
|
17
|
+
generateGraph(chain?: CharChain, tags?: string[], rankdir?: GraphvizRankdir): string;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GveGraphvizService, never>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GveGraphvizService>;
|
|
20
|
+
}
|