@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.
Files changed (27) hide show
  1. package/README.md +32 -2
  2. package/fesm2022/myrmidon-gve-core.mjs +1277 -927
  3. package/fesm2022/myrmidon-gve-core.mjs.map +1 -1
  4. package/lib/components/animation-timeline/animation-timeline.component.d.ts +7 -10
  5. package/lib/components/animation-timeline-set/animation-timeline-set.component.d.ts +9 -12
  6. package/lib/components/animation-tween/animation-tween.component.d.ts +6 -8
  7. package/lib/components/base-text-char/base-text-char.component.d.ts +3 -6
  8. package/lib/components/base-text-editor/base-text-editor.component.d.ts +6 -8
  9. package/lib/components/base-text-view/base-text-view.component.d.ts +15 -12
  10. package/lib/components/batch-operation-editor/batch-operation-editor.component.d.ts +5 -7
  11. package/lib/components/chain-operation-editor/chain-operation-editor.component.d.ts +14 -15
  12. package/lib/components/chain-result-view/chain-result-view.component.d.ts +8 -11
  13. package/lib/components/chain-view/chain-view.component.d.ts +42 -0
  14. package/lib/components/feature-editor/feature-editor.component.d.ts +8 -12
  15. package/lib/components/feature-set-editor/feature-set-editor.component.d.ts +11 -13
  16. package/lib/components/feature-set-view/feature-set-view.component.d.ts +5 -7
  17. package/lib/components/ln-heights-editor/ln-heights-editor.component.d.ts +5 -8
  18. package/lib/components/operation-source-editor/operation-source-editor.component.d.ts +8 -11
  19. package/lib/components/snapshot-editor/snapshot-editor.component.d.ts +46 -35
  20. package/lib/components/snapshot-text-editor/snapshot-text-editor.component.d.ts +37 -0
  21. package/lib/components/steps-map/steps-map.component.d.ts +9 -9
  22. package/lib/services/gve-api.service.d.ts +48 -4
  23. package/lib/services/gve-graphviz.service.d.ts +20 -0
  24. package/lib/services/settings.service.d.ts +40 -5
  25. package/package.json +5 -5
  26. package/public-api.d.ts +3 -1
  27. package/lib/components/simple-tree/simple-tree.component.d.ts +0 -35
@@ -1,10 +1,15 @@
1
+ import { Observable } from 'rxjs';
1
2
  import * as i0 from "@angular/core";
2
3
  /**
3
- * Service to store and retrieve dynamic settings. On demand, settings can
4
- * be persisted in the local storage.
4
+ * Service to store and retrieve dynamic settings.
5
5
  */
6
6
  export declare class SettingsService {
7
7
  private readonly _cache;
8
+ private readonly _subject;
9
+ /**
10
+ * Observable emitting the key of the setting that has changed.
11
+ */
12
+ get settingChange$(): Observable<string | null>;
8
13
  /**
9
14
  * Prefix to scope the keys. This prefix is used internally to scope the keys
10
15
  * so that they cannot conflict with other keys in the local storage.
@@ -12,6 +17,10 @@ export declare class SettingsService {
12
17
  * use the keys without the prefix.
13
18
  */
14
19
  keyPrefix?: string;
20
+ /**
21
+ * True to persist the settings in the local storage by default.
22
+ */
23
+ persistDefault: boolean;
15
24
  /**
16
25
  * Scopes the key by prefixing it with the keyPrefix if any.
17
26
  *
@@ -19,6 +28,7 @@ export declare class SettingsService {
19
28
  * @returns The scoped key.
20
29
  */
21
30
  private getScopedKey;
31
+ private isPersist;
22
32
  /**
23
33
  * Sets a setting's value.
24
34
  *
@@ -27,6 +37,15 @@ export declare class SettingsService {
27
37
  * @param persist True to persist this setting in local storage.
28
38
  */
29
39
  set(key: string, value: any, persist?: boolean): void;
40
+ /**
41
+ * Set multiple settings at once from the specified settings object.
42
+ *
43
+ * @param settings The settings to set.
44
+ * @param persist True to persist these settings in local storage.
45
+ */
46
+ setFrom(settings: {
47
+ [key: string]: any;
48
+ } | undefined | null, persist?: boolean): void;
30
49
  /**
31
50
  * Get a setting's value of type T.
32
51
  *
@@ -35,20 +54,36 @@ export declare class SettingsService {
35
54
  * is not found in the store.
36
55
  * @returns The value.
37
56
  */
38
- get<T>(key: string, defaultValue?: any): T;
57
+ get<T>(key: string, defaultValue?: any, persist?: boolean): T;
39
58
  /**
40
59
  * Check if a key exists in the store.
41
60
  *
42
61
  * @param key The key.
62
+ * @param persist True to check if the key exists in local storage.
43
63
  * @returns True if the key exists in the store.
44
64
  */
45
- contains(key: string): boolean;
65
+ contains(key: string, persist?: boolean): boolean;
66
+ /**
67
+ * Get all the keys of the settings in the store.
68
+ *
69
+ * @param persist True to include keys from local storage.
70
+ * @returns The keys of the settings in the store.
71
+ */
72
+ getKeys(persist?: boolean): string[];
46
73
  /**
47
74
  * Remove a setting if present.
48
75
  *
49
76
  * @param key The key.
77
+ * @param persist True to remove the setting from local storage.
78
+ */
79
+ remove(key: string, persist?: boolean): void;
80
+ /**
81
+ * Clear all settings. Warning: this will remove all settings from the
82
+ * local storage if no key prefix is set.
83
+ *
84
+ * @param persist True to remove all settings from local storage.
50
85
  */
51
- remove(key: string): void;
86
+ clear(persist?: boolean): void;
52
87
  static ɵfac: i0.ɵɵFactoryDeclaration<SettingsService, never>;
53
88
  static ɵprov: i0.ɵɵInjectableDeclaration<SettingsService>;
54
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myrmidon/gve-core",
3
- "version": "1.0.0",
3
+ "version": "3.0.2",
4
4
  "description": "Cadmus - GVE Angular frontend core components.",
5
5
  "keywords": [
6
6
  "GVE"
@@ -17,13 +17,13 @@
17
17
  "@angular/common": "^19.0.0",
18
18
  "@angular/core": "^19.0.0",
19
19
  "@cisstech/nge": "^18.0.4",
20
- "@myrmidon/ng-mat-tools": "^4.0.0",
21
- "@myrmidon/ng-tools": "^4.0.0",
22
- "@myrmidon/gve-snapshot-view": "^1.1.2",
20
+ "@myrmidon/ngx-mat-tools": "^0.0.1",
21
+ "@myrmidon/ngx-tools": "^1.0.0",
22
+ "@myrmidon/gve-snapshot-view": "^1.1.6",
23
23
  "@svgdotjs/svg.js": "^3.2.4",
24
24
  "gsap": "^3.12.5",
25
25
  "monaco-editor": "^0.52.0",
26
- "nanoid": "^5.0.8"
26
+ "nanoid": "^5.0.9"
27
27
  },
28
28
  "dependencies": {
29
29
  "tslib": "^2.3.0"
package/public-api.d.ts CHANGED
@@ -7,13 +7,15 @@ export * from './lib/components/base-text-view/base-text-view.component';
7
7
  export * from './lib/components/batch-operation-editor/batch-operation-editor.component';
8
8
  export * from './lib/components/chain-operation-editor/chain-operation-editor.component';
9
9
  export * from './lib/components/chain-result-view/chain-result-view.component';
10
+ export * from './lib/components/chain-view/chain-view.component';
10
11
  export * from './lib/components/feature-editor/feature-editor.component';
11
12
  export * from './lib/components/feature-set-editor/feature-set-editor.component';
12
13
  export * from './lib/components/feature-set-view/feature-set-view.component';
13
14
  export * from './lib/components/ln-heights-editor/ln-heights-editor.component';
14
15
  export * from './lib/components/operation-source-editor/operation-source-editor.component';
15
- export * from './lib/components/simple-tree/simple-tree.component';
16
16
  export * from './lib/components/snapshot-editor/snapshot-editor.component';
17
+ export * from './lib/components/snapshot-text-editor/snapshot-text-editor.component';
17
18
  export * from './lib/components/steps-map/steps-map.component';
18
19
  export * from './lib/services/gve-api.service';
20
+ export * from './lib/services/gve-graphviz.service';
19
21
  export * from './lib/services/settings.service';
@@ -1,35 +0,0 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
2
- import { TreeNode } from '@myrmidon/gve-snapshot-view';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * 🔑 `gve-simple-tree`
6
- *
7
- * A simple tree component.
8
- *
9
- * - ▶️ `node` (`TreeNode<any>`): the node to display.
10
- * - ▶️ `selectedNode` (`TreeNode<any> | null`): the selected node.
11
- * - 🔥 `selectedNodeChange` (`EventEmitter<TreeNode<any> | null>`): the event
12
- * emitted when the selected node changes.
13
- */
14
- export declare class SimpleTreeComponent implements OnInit {
15
- private _node;
16
- /**
17
- * The node to display.
18
- */
19
- get node(): TreeNode<any> | undefined;
20
- set node(value: TreeNode<any> | undefined);
21
- /**
22
- * The selected node.
23
- */
24
- selectedNode?: TreeNode<any> | null;
25
- /**
26
- * The event emitted when the selected node changes.
27
- */
28
- selectedNodeChange: EventEmitter<TreeNode<any> | null>;
29
- level: number;
30
- ngOnInit(): void;
31
- private calculateLevel;
32
- selectNode(node: TreeNode<any>): void;
33
- static ɵfac: i0.ɵɵFactoryDeclaration<SimpleTreeComponent, never>;
34
- 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>;
35
- }