@myrmidon/gve-core 0.0.1

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.
Files changed (48) hide show
  1. package/README.md +83 -0
  2. package/esm2022/lib/components/animation-timeline/animation-timeline.component.mjs +176 -0
  3. package/esm2022/lib/components/animation-tween/animation-tween.component.mjs +161 -0
  4. package/esm2022/lib/components/animation-vars/animation-vars.component.mjs +141 -0
  5. package/esm2022/lib/components/base-text-char/base-text-char.component.mjs +37 -0
  6. package/esm2022/lib/components/base-text-editor/base-text-editor.component.mjs +111 -0
  7. package/esm2022/lib/components/base-text-view/base-text-view.component.mjs +125 -0
  8. package/esm2022/lib/components/chain-operation-editor/chain-operation-editor.component.mjs +512 -0
  9. package/esm2022/lib/components/chain-result-view/chain-result-view.component.mjs +190 -0
  10. package/esm2022/lib/components/feature-editor/feature-editor.component.mjs +185 -0
  11. package/esm2022/lib/components/feature-set-editor/feature-set-editor.component.mjs +152 -0
  12. package/esm2022/lib/components/feature-set-view/feature-set-view.component.mjs +80 -0
  13. package/esm2022/lib/components/ln-heights-editor/ln-heights-editor.component.mjs +95 -0
  14. package/esm2022/lib/components/operation-source-editor/operation-source-editor.component.mjs +106 -0
  15. package/esm2022/lib/components/simple-tree/simple-tree.component.mjs +56 -0
  16. package/esm2022/lib/components/snapshot-editor/snapshot-editor.component.mjs +510 -0
  17. package/esm2022/lib/components/steps-map/steps-map.component.mjs +55 -0
  18. package/esm2022/lib/models.mjs +2 -0
  19. package/esm2022/lib/services/gve-api.service.mjs +52 -0
  20. package/esm2022/lib/services/settings.service.mjs +86 -0
  21. package/esm2022/lib/validators/svg-validators.mjs +28 -0
  22. package/esm2022/myrmidon-gve-core.mjs +5 -0
  23. package/esm2022/public-api.mjs +23 -0
  24. package/fesm2022/myrmidon-gve-core.mjs +2592 -0
  25. package/fesm2022/myrmidon-gve-core.mjs.map +1 -0
  26. package/index.d.ts +5 -0
  27. package/lib/components/animation-timeline/animation-timeline.component.d.ts +42 -0
  28. package/lib/components/animation-tween/animation-tween.component.d.ts +47 -0
  29. package/lib/components/animation-vars/animation-vars.component.d.ts +30 -0
  30. package/lib/components/base-text-char/base-text-char.component.d.ts +29 -0
  31. package/lib/components/base-text-editor/base-text-editor.component.d.ts +40 -0
  32. package/lib/components/base-text-view/base-text-view.component.d.ts +29 -0
  33. package/lib/components/chain-operation-editor/chain-operation-editor.component.d.ts +102 -0
  34. package/lib/components/chain-result-view/chain-result-view.component.d.ts +44 -0
  35. package/lib/components/feature-editor/feature-editor.component.d.ts +72 -0
  36. package/lib/components/feature-set-editor/feature-set-editor.component.d.ts +55 -0
  37. package/lib/components/feature-set-view/feature-set-view.component.d.ts +36 -0
  38. package/lib/components/ln-heights-editor/ln-heights-editor.component.d.ts +22 -0
  39. package/lib/components/operation-source-editor/operation-source-editor.component.d.ts +24 -0
  40. package/lib/components/simple-tree/simple-tree.component.d.ts +16 -0
  41. package/lib/components/snapshot-editor/snapshot-editor.component.d.ts +105 -0
  42. package/lib/components/steps-map/steps-map.component.d.ts +29 -0
  43. package/lib/models.d.ts +7 -0
  44. package/lib/services/gve-api.service.d.ts +57 -0
  45. package/lib/services/settings.service.d.ts +53 -0
  46. package/lib/validators/svg-validators.d.ts +4 -0
  47. package/package.json +45 -0
  48. package/public-api.d.ts +19 -0
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@myrmidon/gve-core" />
5
+ export * from './public-api';
@@ -0,0 +1,42 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
3
+ import { GveAnimationTimeline, GveAnimationTween, GveAnimationVars } from '@myrmidon/gve-snapshot-view';
4
+ import * as i0 from "@angular/core";
5
+ export declare class AnimationTimelineComponent {
6
+ private _timeline?;
7
+ get timeline(): GveAnimationTimeline | undefined;
8
+ set timeline(value: GveAnimationTimeline | undefined | null);
9
+ /**
10
+ * The IDs of the elements that can be selected by the tween.
11
+ * This list is used to allow the user to select an element from a dropdown.
12
+ */
13
+ elementIds?: string[];
14
+ tags: string[];
15
+ readonly timelineChange: EventEmitter<GveAnimationTimeline>;
16
+ readonly cancel: EventEmitter<void>;
17
+ tag: FormControl<string>;
18
+ tweens: FormControl<GveAnimationTween[]>;
19
+ vars: FormControl<GveAnimationVars>;
20
+ form: FormGroup;
21
+ editedTweenIndex: number;
22
+ editedTween?: GveAnimationTween;
23
+ readonly selectors: {
24
+ 0: string;
25
+ 1: string;
26
+ 2: string;
27
+ };
28
+ constructor(formBuilder: FormBuilder);
29
+ private updateForm;
30
+ addTween(): void;
31
+ editTween(index: number): void;
32
+ deleteTween(index: number): void;
33
+ closeTween(): void;
34
+ saveTween(tween: GveAnimationTween): void;
35
+ moveTweenUp(index: number): void;
36
+ moveTweenDown(index: number): void;
37
+ private getTimeline;
38
+ close(): void;
39
+ save(): void;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<AnimationTimelineComponent, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<AnimationTimelineComponent, "gve-animation-timeline", never, { "timeline": { "alias": "timeline"; "required": false; }; "elementIds": { "alias": "elementIds"; "required": false; }; "tags": { "alias": "tags"; "required": false; }; }, { "timelineChange": "timelineChange"; "cancel": "cancel"; }, never, never, true, never>;
42
+ }
@@ -0,0 +1,47 @@
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
3
+ import { GveAnimationTween, GveAnimationVars } from '@myrmidon/gve-snapshot-view';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * A component to edit an animation tween.
7
+ */
8
+ export declare class AnimationTweenComponent implements OnInit, OnDestroy {
9
+ private _sub?;
10
+ private _tween?;
11
+ /**
12
+ * The tween to edit.
13
+ */
14
+ get tween(): GveAnimationTween | undefined;
15
+ set tween(value: GveAnimationTween | undefined | null);
16
+ /**
17
+ * The IDs of the elements that can be selected by the tween.
18
+ * This list is used to allow the user to select an element from a dropdown.
19
+ */
20
+ elementIds?: string[];
21
+ readonly tweenChange: EventEmitter<GveAnimationTween>;
22
+ readonly cancel: EventEmitter<void>;
23
+ label: FormControl<string>;
24
+ note: FormControl<string | null>;
25
+ type: FormControl<number>;
26
+ selector: FormControl<string>;
27
+ vars: FormControl<GveAnimationVars>;
28
+ vars2: FormControl<GveAnimationVars | null>;
29
+ position: FormControl<string | null>;
30
+ form: FormGroup;
31
+ elementId: FormControl<string | null>;
32
+ types: {
33
+ label: string;
34
+ value: number;
35
+ }[];
36
+ constructor(formBuilder: FormBuilder);
37
+ ngOnInit(): void;
38
+ ngOnDestroy(): void;
39
+ onVarsChange(vars: GveAnimationVars): void;
40
+ onVars2Change(vars: GveAnimationVars): void;
41
+ close(): void;
42
+ private updateForm;
43
+ private getTween;
44
+ save(): void;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<AnimationTweenComponent, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<AnimationTweenComponent, "gve-animation-tween", never, { "tween": { "alias": "tween"; "required": false; }; "elementIds": { "alias": "elementIds"; "required": false; }; }, { "tweenChange": "tweenChange"; "cancel": "cancel"; }, never, never, true, never>;
47
+ }
@@ -0,0 +1,30 @@
1
+ import { ElementRef, EventEmitter } from '@angular/core';
2
+ import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
3
+ import { GveAnimationVars } from '@myrmidon/gve-snapshot-view';
4
+ import * as i0 from "@angular/core";
5
+ interface VarViewModel {
6
+ name: string;
7
+ value: string | number | boolean;
8
+ }
9
+ export declare class AnimationVarsComponent {
10
+ private _vars;
11
+ get vars(): GveAnimationVars;
12
+ set vars(value: GveAnimationVars);
13
+ varsChange: EventEmitter<GveAnimationVars>;
14
+ nameInput?: ElementRef;
15
+ name: FormControl<string>;
16
+ value: FormControl<string>;
17
+ form: FormGroup;
18
+ editedVars: VarViewModel[];
19
+ constructor(formBuilder: FormBuilder);
20
+ private updateForm;
21
+ private getVars;
22
+ addVar(): void;
23
+ editVar(index: number): void;
24
+ deleteVar(index: number): void;
25
+ private parseValue;
26
+ saveVar(): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<AnimationVarsComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<AnimationVarsComponent, "gve-animation-vars", never, { "vars": { "alias": "vars"; "required": false; }; }, { "varsChange": "varsChange"; }, never, never, true, never>;
29
+ }
30
+ export {};
@@ -0,0 +1,29 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export interface BaseTextChar {
4
+ id: number;
5
+ value: string;
6
+ label: string;
7
+ color: string;
8
+ borderColor: string;
9
+ emSize: number;
10
+ }
11
+ export interface BaseTextCharEvent {
12
+ char: BaseTextChar;
13
+ event: MouseEvent;
14
+ }
15
+ /**
16
+ * A component that displays a single character from a base text.
17
+ */
18
+ export declare class BaseTextCharComponent {
19
+ private _char;
20
+ defaultColor: string;
21
+ defaultBorderColor: string;
22
+ defaultEmSize: number;
23
+ get char(): BaseTextChar | undefined;
24
+ set char(value: BaseTextChar | undefined | null);
25
+ charPick: EventEmitter<BaseTextCharEvent>;
26
+ onCharClick(event: MouseEvent): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseTextCharComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<BaseTextCharComponent, "gve-base-text-char", never, { "char": { "alias": "char"; "required": false; }; }, { "charPick": "charPick"; }, never, never, true, never>;
29
+ }
@@ -0,0 +1,40 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
3
+ import { CharNode, Feature } from '@myrmidon/gve-snapshot-view';
4
+ import { DialogService } from '@myrmidon/ng-mat-tools';
5
+ import { BaseTextCharEvent } from '../base-text-char/base-text-char.component';
6
+ import { VarBaseTextRange } from '../base-text-view/base-text-view.component';
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * Editor for snapshot's base text. This can receive a string or an array
10
+ * of `CharNode` objects, and lets the user edit the text, character by
11
+ * character, optionally also setting its features.
12
+ */
13
+ export declare class BaseTextEditorComponent {
14
+ private _dialogService;
15
+ private _text;
16
+ /**
17
+ * The text to edit. In input this can be a string, an array of `CharNode`
18
+ * objects. In output this will be an array of `CharNode` objects.
19
+ */
20
+ get text(): CharNode[];
21
+ set text(value: string | CharNode[] | undefined | null);
22
+ /**
23
+ * Emits the edited text as an array of `CharNode`'s whenever it changes.
24
+ */
25
+ readonly textChange: EventEmitter<CharNode[]>;
26
+ userText: FormControl<string>;
27
+ form: FormGroup;
28
+ selectedChar?: CharNode;
29
+ selectedCharLabel?: string;
30
+ textRange?: VarBaseTextRange;
31
+ constructor(formBuilder: FormBuilder, _dialogService: DialogService);
32
+ private resetSelectedChar;
33
+ onSelectedChar(event: BaseTextCharEvent): void;
34
+ onFeaturesChange(features: Feature[]): void;
35
+ onRangePick(range: VarBaseTextRange): void;
36
+ patchTextFromUser(): void;
37
+ setTextFromUser(): void;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseTextEditorComponent, never>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<BaseTextEditorComponent, "gve-base-text-editor", never, { "text": { "alias": "text"; "required": false; }; }, { "textChange": "textChange"; }, never, never, true, never>;
40
+ }
@@ -0,0 +1,29 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { BaseTextChar, BaseTextCharEvent } from '../base-text-char/base-text-char.component';
3
+ import { CharNode } from '@myrmidon/gve-snapshot-view';
4
+ import * as i0 from "@angular/core";
5
+ export interface VarBaseTextRange {
6
+ at: number;
7
+ run: number;
8
+ }
9
+ /**
10
+ * A component to display a selectable base text.
11
+ */
12
+ export declare class BaseTextViewComponent {
13
+ private _text?;
14
+ private _lastSelectedChar?;
15
+ defaultColor: string;
16
+ defaultBorderColor: string;
17
+ selectionColor: string;
18
+ hasLineNumber: boolean;
19
+ get text(): string | CharNode[] | undefined;
20
+ set text(value: string | CharNode[] | undefined | null);
21
+ charPick: EventEmitter<BaseTextCharEvent>;
22
+ rangePick: EventEmitter<VarBaseTextRange>;
23
+ lines: BaseTextChar[][];
24
+ private buildLines;
25
+ private resetColors;
26
+ onCharPick(event: BaseTextCharEvent): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseTextViewComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<BaseTextViewComponent, "gve-base-text-view", never, { "defaultColor": { "alias": "defaultColor"; "required": false; }; "defaultBorderColor": { "alias": "defaultBorderColor"; "required": false; }; "selectionColor": { "alias": "selectionColor"; "required": false; }; "hasLineNumber": { "alias": "hasLineNumber"; "required": false; }; "text": { "alias": "text"; "required": false; }; }, { "charPick": "charPick"; "rangePick": "rangePick"; }, never, never, true, never>;
29
+ }
@@ -0,0 +1,102 @@
1
+ /// <reference types="monaco-editor/monaco" />
2
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
3
+ import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
4
+ import { Clipboard } from '@angular/cdk/clipboard';
5
+ import { CharChainOperation, Feature, OperationFeature, OperationType, OperationSource, SnapshotBase } from '@myrmidon/gve-snapshot-view';
6
+ import { SettingsService } from '../../services/settings.service';
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * A component for editing a variant generation operation.
10
+ */
11
+ export declare class ChainOperationEditorComponent implements OnInit, OnDestroy {
12
+ private _clipboard;
13
+ private _settings;
14
+ private readonly _disposables;
15
+ private _editorModel?;
16
+ private _editor?;
17
+ private readonly _subs;
18
+ private readonly _nanoid;
19
+ private _operation;
20
+ private _editedSourceIndex;
21
+ private _snapshot;
22
+ /**
23
+ * The operation to edit.
24
+ */
25
+ get operation(): CharChainOperation | undefined | null;
26
+ set operation(value: CharChainOperation | undefined);
27
+ /**
28
+ * The snapshot the operation refers to.
29
+ */
30
+ get snapshot(): SnapshotBase | undefined;
31
+ set snapshot(value: SnapshotBase | undefined | null);
32
+ /**
33
+ * Whether to hide the preview request button.
34
+ */
35
+ hidePreview?: boolean;
36
+ /**
37
+ * Emits when the operation is changed.
38
+ */
39
+ readonly operationChange: EventEmitter<CharChainOperation>;
40
+ /**
41
+ * Emits when the operation preview is requested.
42
+ */
43
+ readonly operationPreview: EventEmitter<CharChainOperation>;
44
+ /**
45
+ * Emits when the operation editing is cancelled.
46
+ */
47
+ readonly operationCancel: EventEmitter<void>;
48
+ tabIndex: number;
49
+ id?: string;
50
+ hasTo: boolean;
51
+ hasToRun: boolean;
52
+ hasValue: boolean;
53
+ rank: FormControl<number>;
54
+ groupId: FormControl<string | null>;
55
+ features: FormControl<Feature[]>;
56
+ sources: FormControl<OperationSource[]>;
57
+ type: FormControl<OperationType>;
58
+ at: FormControl<number>;
59
+ atAsIndex: FormControl<boolean>;
60
+ to: FormControl<number>;
61
+ toAsIndex: FormControl<boolean>;
62
+ inputTag: FormControl<string | null>;
63
+ outputTag: FormControl<string | null>;
64
+ run: FormControl<number>;
65
+ toRun: FormControl<number>;
66
+ value: FormControl<string | null>;
67
+ svg: FormControl<string>;
68
+ elementFeatures: FormControl<Record<string, Feature[]>>;
69
+ dpFeatures: FormControl<Feature[]>;
70
+ form: FormGroup;
71
+ elements: SVGElement[];
72
+ editedElementId?: string;
73
+ editedSource?: OperationSource;
74
+ constructor(formBuilder: FormBuilder, _clipboard: Clipboard, _settings: SettingsService);
75
+ ngOnInit(): void;
76
+ ngOnDestroy(): void;
77
+ private hasTextChanges;
78
+ onCreateEditor(editor: monaco.editor.IEditor): void;
79
+ onFeaturesChange(features: OperationFeature[]): void;
80
+ onDpFeaturesChange(features: Feature[]): void;
81
+ addSource(): void;
82
+ editSource(index: number): void;
83
+ closeSource(): void;
84
+ onSourceChange(source: OperationSource): void;
85
+ saveSvg(): void;
86
+ openSvgEditor(): void;
87
+ loadSvg(): void;
88
+ setSvgFromClipboard(): void;
89
+ private parseSvg;
90
+ onTabIndexChange(index: number): void;
91
+ editElementFeatures(element: SVGElement): void;
92
+ deleteElementFeatures(element: SVGElement): void;
93
+ onElementFeaturesChange(features: Feature[]): void;
94
+ private updateArgsUI;
95
+ private updateForm;
96
+ cancel(): void;
97
+ private getOperation;
98
+ requestPreview(): void;
99
+ save(): void;
100
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChainOperationEditorComponent, never>;
101
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChainOperationEditorComponent, "gve-chain-operation-editor", never, { "operation": { "alias": "operation"; "required": false; }; "snapshot": { "alias": "snapshot"; "required": false; }; "hidePreview": { "alias": "hidePreview"; "required": false; }; }, { "operationChange": "operationChange"; "operationPreview": "operationPreview"; "operationCancel": "operationCancel"; }, never, never, true, never>;
102
+ }
@@ -0,0 +1,44 @@
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { FormBuilder, FormControl } from '@angular/forms';
3
+ import { OperationFeature } from '@myrmidon/gve-snapshot-view';
4
+ import { VarBaseTextRange } from '../base-text-view/base-text-view.component';
5
+ import { ChainOperationContextStep, CharChainResult } from '../../services/gve-api.service';
6
+ import { BaseTextCharEvent } from '../base-text-char/base-text-char.component';
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * Component to display a chain result.
10
+ */
11
+ export declare class ChainResultViewComponent implements OnInit, OnDestroy {
12
+ private _subs?;
13
+ private _result?;
14
+ private _stepPickFrozen?;
15
+ /**
16
+ * The result to display.
17
+ */
18
+ get result(): CharChainResult | undefined;
19
+ set result(value: CharChainResult | undefined | null);
20
+ /**
21
+ * Emits when a result's step is picked.
22
+ */
23
+ stepPick: EventEmitter<ChainOperationContextStep>;
24
+ versionTags: string[];
25
+ tags: string[];
26
+ versionTag: FormControl<string | null>;
27
+ tag: FormControl<string | null>;
28
+ step?: ChainOperationContextStep;
29
+ selection?: string;
30
+ selectionFeatures: OperationFeature[];
31
+ constructor(formBuilder: FormBuilder);
32
+ ngOnInit(): void;
33
+ ngOnDestroy(): void;
34
+ private updateVersionTags;
35
+ private getTagFromVersion;
36
+ private updateForm;
37
+ private getNodeFeatures;
38
+ private findNode;
39
+ onStepCharPick(event: BaseTextCharEvent): void;
40
+ onStepRangePick(range: VarBaseTextRange): void;
41
+ onStepChange(step: ChainOperationContextStep): void;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChainResultViewComponent, never>;
43
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChainResultViewComponent, "gve-chain-result-view", never, { "result": { "alias": "result"; "required": false; }; }, { "stepPick": "stepPick"; }, never, never, true, never>;
44
+ }
@@ -0,0 +1,72 @@
1
+ import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
3
+ import { Feature, FeatureSetPolicy, LabeledId, OperationFeature } from '@myrmidon/gve-snapshot-view';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Features map. This is used for features from closed sets,
7
+ * and lists the possible values for each feature.
8
+ */
9
+ export interface FeatureMap {
10
+ [key: string]: LabeledId[];
11
+ }
12
+ /**
13
+ * Feature editor. This edits a single feature, either free or from
14
+ * a closed set. In the latter case you must define the set via
15
+ * the `labeledIds` input. Also, you can provide a map of features
16
+ * to values via the `map` input. This is useful when you want to
17
+ * provide a set of features and values to the user, and you want
18
+ * to provide human-readable labels for the values.
19
+ */
20
+ export declare class FeatureEditorComponent implements OnInit, OnDestroy {
21
+ private _sub?;
22
+ private _feature?;
23
+ private _map?;
24
+ nameControl?: ElementRef;
25
+ /**
26
+ * The list of feature names to display in the name selection.
27
+ * This is used when you have a closed list of features.
28
+ */
29
+ featNames: LabeledId[] | undefined;
30
+ /**
31
+ * The feature values map. When specified and the user selects a feature
32
+ * name present in the map keys, the corresponding values will be used
33
+ * to populate the value selection.
34
+ */
35
+ get featValues(): FeatureMap | undefined;
36
+ set featValues(value: FeatureMap | undefined | null);
37
+ /**
38
+ * The feature to edit.
39
+ */
40
+ get feature(): Feature | OperationFeature | undefined;
41
+ set feature(value: Feature | OperationFeature | undefined | null);
42
+ /**
43
+ * True if the feature is a variant operation feature, which has
44
+ * additional properties like negation, global, and short-lived.
45
+ */
46
+ isVar: boolean;
47
+ /**
48
+ * Event emitted when the user cancels the feature editing.
49
+ */
50
+ featureCancel: EventEmitter<void>;
51
+ /**
52
+ * Event emitted when the user saves the edited feature.
53
+ */
54
+ featureChange: EventEmitter<OperationFeature | Feature>;
55
+ name: FormControl<string>;
56
+ value: FormControl<string>;
57
+ setPolicy: FormControl<FeatureSetPolicy>;
58
+ isNegated: FormControl<boolean>;
59
+ isGlobal: FormControl<boolean>;
60
+ isShortLived: FormControl<boolean>;
61
+ form: FormGroup;
62
+ nameIds?: LabeledId[];
63
+ constructor(formBuilder: FormBuilder);
64
+ ngOnInit(): void;
65
+ ngOnDestroy(): void;
66
+ private getLabeledIdsFor;
67
+ private updateForm;
68
+ cancel(): void;
69
+ save(): void;
70
+ static ɵfac: i0.ɵɵFactoryDeclaration<FeatureEditorComponent, never>;
71
+ static ɵcmp: i0.ɵɵComponentDeclaration<FeatureEditorComponent, "gve-feature-editor", never, { "featNames": { "alias": "featNames"; "required": false; }; "featValues": { "alias": "featValues"; "required": false; }; "feature": { "alias": "feature"; "required": false; }; "isVar": { "alias": "isVar"; "required": false; }; }, { "featureCancel": "featureCancel"; "featureChange": "featureChange"; }, never, never, true, never>;
72
+ }
@@ -0,0 +1,55 @@
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { FormBuilder, FormControl } from '@angular/forms';
3
+ import { LabeledId, Feature, OperationFeature } from '@myrmidon/gve-snapshot-view';
4
+ import { FeatureMap } from '../feature-editor/feature-editor.component';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * Editor for a set of features.
8
+ */
9
+ export declare class FeatureSetEditorComponent implements OnInit, OnDestroy {
10
+ private _sub?;
11
+ private _features;
12
+ private _editedFeatureIndex;
13
+ /**
14
+ * True if the features are variable features.
15
+ */
16
+ isVar: boolean;
17
+ /**
18
+ * The list of feature names to display in the name selection.
19
+ * This is used when you have a closed list of features.
20
+ */
21
+ featNames: LabeledId[] | undefined;
22
+ /**
23
+ * The feature values map. When specified and the user selects a feature
24
+ * name present in the map keys, the corresponding values will be used
25
+ * to populate the value selection.
26
+ */
27
+ featValues: FeatureMap | undefined;
28
+ /**
29
+ * True to hide the feature filter.
30
+ */
31
+ noFilter: boolean;
32
+ /**
33
+ * The features to edit.
34
+ */
35
+ get features(): Feature[] | OperationFeature[];
36
+ set features(value: Feature[] | OperationFeature[]);
37
+ /**
38
+ * Emitted when the features change.
39
+ */
40
+ featuresChange: EventEmitter<Feature[] | OperationFeature[]>;
41
+ editedFeature?: Feature | OperationFeature;
42
+ filter: FormControl<string | null>;
43
+ filteredFeatures: Feature[] | OperationFeature[];
44
+ constructor(formBuilder: FormBuilder);
45
+ private applyFeatureFilter;
46
+ ngOnInit(): void;
47
+ ngOnDestroy(): void;
48
+ addFeature(): void;
49
+ editFeature(feature: Feature | OperationFeature): void;
50
+ deleteFeature(feature: Feature | OperationFeature): void;
51
+ onFeatureChange(feature: Feature | OperationFeature): void;
52
+ onFeatureCancel(): void;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<FeatureSetEditorComponent, never>;
54
+ 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; }; "noFilter": { "alias": "noFilter"; "required": false; }; "features": { "alias": "features"; "required": false; }; }, { "featuresChange": "featuresChange"; }, never, never, true, never>;
55
+ }
@@ -0,0 +1,36 @@
1
+ import { FormBuilder, FormControl } from '@angular/forms';
2
+ import { Feature, LabeledId, OperationFeature } from '@myrmidon/gve-snapshot-view';
3
+ import { FeatureMap } from '../feature-editor/feature-editor.component';
4
+ import * as i0 from "@angular/core";
5
+ export declare class FeatureSetViewComponent {
6
+ private _sub?;
7
+ private _features;
8
+ /**
9
+ * The features.
10
+ */
11
+ get features(): Feature[] | OperationFeature[];
12
+ set features(value: Feature[] | OperationFeature[]);
13
+ /**
14
+ * The list of feature names to display in the name selection.
15
+ * This is used when you have a closed list of features.
16
+ */
17
+ featNames: LabeledId[] | undefined;
18
+ /**
19
+ * The feature values map. When specified and the user selects a feature
20
+ * name present in the map keys, the corresponding values will be used
21
+ * to populate the value selection.
22
+ */
23
+ featValues: FeatureMap | undefined;
24
+ /**
25
+ * The minimum count of features required for filter to be visible.
26
+ */
27
+ minFilterCount: number;
28
+ filter: FormControl<string | null>;
29
+ filteredFeatures: Feature[] | OperationFeature[];
30
+ constructor(formBuilder: FormBuilder);
31
+ private applyFeatureFilter;
32
+ ngOnInit(): void;
33
+ ngOnDestroy(): void;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<FeatureSetViewComponent, never>;
35
+ 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; }; "minFilterCount": { "alias": "minFilterCount"; "required": false; }; }, {}, never, never, true, never>;
36
+ }
@@ -0,0 +1,22 @@
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { FormBuilder, FormControl } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export declare class LnHeightsEditorComponent implements OnInit, OnDestroy {
5
+ private _subs?;
6
+ private _heights?;
7
+ private _lineCount;
8
+ lineNumber: FormControl<number>;
9
+ height: FormControl<number>;
10
+ get lineCount(): number;
11
+ set lineCount(value: number);
12
+ get heights(): Record<number, number> | undefined;
13
+ set heights(value: Record<number, number> | undefined | null);
14
+ readonly heightsChange: EventEmitter<Record<number, number> | undefined>;
15
+ lineNumbers: number[];
16
+ constructor(formBuilder: FormBuilder);
17
+ ngOnInit(): void;
18
+ ngOnDestroy(): void;
19
+ reset(): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<LnHeightsEditorComponent, never>;
21
+ 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>;
22
+ }
@@ -0,0 +1,24 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
3
+ import { LabeledId, OperationSource } from '@myrmidon/gve-snapshot-view';
4
+ import * as i0 from "@angular/core";
5
+ export declare class OperationSourceEditorComponent {
6
+ private _source;
7
+ get source(): OperationSource | undefined;
8
+ set source(value: OperationSource | undefined | null);
9
+ ids?: LabeledId[];
10
+ types?: LabeledId[];
11
+ readonly sourceChange: EventEmitter<OperationSource | undefined>;
12
+ sourceCancel: EventEmitter<void>;
13
+ id: FormControl<string>;
14
+ type: FormControl<string>;
15
+ rank: FormControl<number>;
16
+ note: FormControl<string | null>;
17
+ form: FormGroup;
18
+ constructor(formBuilder: FormBuilder);
19
+ private updateForm;
20
+ cancel(): void;
21
+ save(): void;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<OperationSourceEditorComponent, never>;
23
+ 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>;
24
+ }
@@ -0,0 +1,16 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { TreeNode } from '@myrmidon/gve-snapshot-view';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SimpleTreeComponent implements OnInit {
5
+ private _node;
6
+ get node(): TreeNode<any> | undefined;
7
+ set node(value: TreeNode<any> | undefined);
8
+ selectedNode?: TreeNode<any> | null;
9
+ selectedNodeChange: EventEmitter<TreeNode<any> | null>;
10
+ level: number;
11
+ ngOnInit(): void;
12
+ private calculateLevel;
13
+ selectNode(node: TreeNode<any>): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<SimpleTreeComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<SimpleTreeComponent, "gve-simple-tree", never, { "node": { "alias": "node"; "required": false; }; "selectedNode": { "alias": "selectedNode"; "required": false; }; }, { "selectedNodeChange": "selectedNodeChange"; }, never, never, true, never>;
16
+ }