@myrmidon/gve-core 7.0.8 → 7.0.9
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/myrmidon-gve-core.mjs +252 -225
- package/fesm2022/myrmidon-gve-core.mjs.map +1 -1
- package/package.json +1 -1
- package/types/myrmidon-gve-core.d.ts +132 -98
package/package.json
CHANGED
|
@@ -6,7 +6,6 @@ import { DialogService } from '@myrmidon/ngx-mat-tools';
|
|
|
6
6
|
import { HttpClient } from '@angular/common/http';
|
|
7
7
|
import { Observable } from 'rxjs';
|
|
8
8
|
import { ErrorService, EnvService } from '@myrmidon/ngx-tools';
|
|
9
|
-
import { Clipboard } from '@angular/cdk/clipboard';
|
|
10
9
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
11
10
|
import { GveSnapshotRendition, GveRenditionSettings } from '@myrmidon/gve-snapshot-rendition';
|
|
12
11
|
|
|
@@ -607,94 +606,6 @@ declare class BatchOperationEditorComponent implements OnInit {
|
|
|
607
606
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BatchOperationEditorComponent, "gve-batch-operation-editor", never, { "preset": { "alias": "preset"; "required": false; "isSignal": true; }; }, { "operationsChange": "operationsChange"; }, never, never, true, never>;
|
|
608
607
|
}
|
|
609
608
|
|
|
610
|
-
/**
|
|
611
|
-
* Service to store and retrieve dynamic settings.
|
|
612
|
-
*/
|
|
613
|
-
declare class SettingsService {
|
|
614
|
-
private readonly _cache;
|
|
615
|
-
private readonly _subject;
|
|
616
|
-
/**
|
|
617
|
-
* Observable emitting the key of the setting that has changed.
|
|
618
|
-
*/
|
|
619
|
-
get settingChange$(): Observable<string | null>;
|
|
620
|
-
/**
|
|
621
|
-
* Prefix to scope the keys. This prefix is used internally to scope the keys
|
|
622
|
-
* so that they cannot conflict with other keys in the local storage.
|
|
623
|
-
* The prefix is totally transparent to the user of the service, who should
|
|
624
|
-
* use the keys without the prefix.
|
|
625
|
-
*/
|
|
626
|
-
keyPrefix?: string;
|
|
627
|
-
/**
|
|
628
|
-
* True to persist the settings in the local storage by default.
|
|
629
|
-
*/
|
|
630
|
-
persistDefault: boolean;
|
|
631
|
-
/**
|
|
632
|
-
* Scopes the key by prefixing it with the keyPrefix if any.
|
|
633
|
-
*
|
|
634
|
-
* @param key The key to scope.
|
|
635
|
-
* @returns The scoped key.
|
|
636
|
-
*/
|
|
637
|
-
private getScopedKey;
|
|
638
|
-
private isPersist;
|
|
639
|
-
/**
|
|
640
|
-
* Sets a setting's value.
|
|
641
|
-
*
|
|
642
|
-
* @param key The key.
|
|
643
|
-
* @param value The value.
|
|
644
|
-
* @param persist True to persist this setting in local storage.
|
|
645
|
-
*/
|
|
646
|
-
set(key: string, value: any, persist?: boolean): void;
|
|
647
|
-
/**
|
|
648
|
-
* Set multiple settings at once from the specified settings object.
|
|
649
|
-
*
|
|
650
|
-
* @param settings The settings to set.
|
|
651
|
-
* @param persist True to persist these settings in local storage.
|
|
652
|
-
*/
|
|
653
|
-
setFrom(settings: {
|
|
654
|
-
[key: string]: any;
|
|
655
|
-
} | undefined | null, persist?: boolean): void;
|
|
656
|
-
/**
|
|
657
|
-
* Get a setting's value of type T.
|
|
658
|
-
*
|
|
659
|
-
* @param key The key.
|
|
660
|
-
* @param defaultValue The default value to get when the setting
|
|
661
|
-
* is not found in the store.
|
|
662
|
-
* @returns The value.
|
|
663
|
-
*/
|
|
664
|
-
get<T>(key: string, defaultValue?: any, persist?: boolean): T;
|
|
665
|
-
/**
|
|
666
|
-
* Check if a key exists in the store.
|
|
667
|
-
*
|
|
668
|
-
* @param key The key.
|
|
669
|
-
* @param persist True to check if the key exists in local storage.
|
|
670
|
-
* @returns True if the key exists in the store.
|
|
671
|
-
*/
|
|
672
|
-
contains(key: string, persist?: boolean): boolean;
|
|
673
|
-
/**
|
|
674
|
-
* Get all the keys of the settings in the store.
|
|
675
|
-
*
|
|
676
|
-
* @param persist True to include keys from local storage.
|
|
677
|
-
* @returns The keys of the settings in the store.
|
|
678
|
-
*/
|
|
679
|
-
getKeys(persist?: boolean): string[];
|
|
680
|
-
/**
|
|
681
|
-
* Remove a setting if present.
|
|
682
|
-
*
|
|
683
|
-
* @param key The key.
|
|
684
|
-
* @param persist True to remove the setting from local storage.
|
|
685
|
-
*/
|
|
686
|
-
remove(key: string, persist?: boolean): void;
|
|
687
|
-
/**
|
|
688
|
-
* Clear all settings. Warning: this will remove all settings from the
|
|
689
|
-
* local storage if no key prefix is set.
|
|
690
|
-
*
|
|
691
|
-
* @param persist True to remove all settings from local storage.
|
|
692
|
-
*/
|
|
693
|
-
clear(persist?: boolean): void;
|
|
694
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SettingsService, never>;
|
|
695
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SettingsService>;
|
|
696
|
-
}
|
|
697
|
-
|
|
698
609
|
/**
|
|
699
610
|
* Features map. This is used for features from closed sets,
|
|
700
611
|
* and lists the possible values for each feature.
|
|
@@ -704,6 +615,20 @@ declare class SettingsService {
|
|
|
704
615
|
interface FeatureMap {
|
|
705
616
|
[key: string]: LabeledId[];
|
|
706
617
|
}
|
|
618
|
+
/**
|
|
619
|
+
* Feature properties map. This is used to preset properties like set policy,
|
|
620
|
+
* negation, global, and short-lived for specific features without hardcoding
|
|
621
|
+
* that logic in the component. The key is the feature name's ID, and the
|
|
622
|
+
* value is an object containing the properties to preset for that feature.
|
|
623
|
+
*/
|
|
624
|
+
interface FeaturePropMap {
|
|
625
|
+
[key: string]: {
|
|
626
|
+
setPolicy: FeatureSetPolicy;
|
|
627
|
+
isNegated?: boolean;
|
|
628
|
+
isGlobal?: boolean;
|
|
629
|
+
isShortLived?: boolean;
|
|
630
|
+
};
|
|
631
|
+
}
|
|
707
632
|
/**
|
|
708
633
|
* 🔑 `gve-feature-editor`
|
|
709
634
|
*
|
|
@@ -742,6 +667,14 @@ declare class FeatureEditorComponent implements OnInit, OnDestroy {
|
|
|
742
667
|
* to populate the value selection.
|
|
743
668
|
*/
|
|
744
669
|
readonly featValues: _angular_core.InputSignal<FeatureMap | undefined>;
|
|
670
|
+
/**
|
|
671
|
+
* The feature properties map. When specified and the user selects a
|
|
672
|
+
* feature name present in the map keys, the corresponding properties
|
|
673
|
+
* will be used to populate the form controls for set policy, negation,
|
|
674
|
+
* global, and short-lived. This allows presetting these properties
|
|
675
|
+
* for specific features without hardcoding that logic in the component.
|
|
676
|
+
*/
|
|
677
|
+
readonly featProps: _angular_core.InputSignal<FeaturePropMap | undefined>;
|
|
745
678
|
/**
|
|
746
679
|
* The feature to edit.
|
|
747
680
|
*/
|
|
@@ -796,7 +729,7 @@ declare class FeatureEditorComponent implements OnInit, OnDestroy {
|
|
|
796
729
|
cancel(): void;
|
|
797
730
|
save(): void;
|
|
798
731
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FeatureEditorComponent, never>;
|
|
799
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FeatureEditorComponent, "gve-feature-editor", never, { "featNames": { "alias": "featNames"; "required": false; "isSignal": true; }; "featValues": { "alias": "featValues"; "required": false; "isSignal": true; }; "feature": { "alias": "feature"; "required": false; "isSignal": true; }; "isVar": { "alias": "isVar"; "required": false; "isSignal": true; }; "multiValuedFeatureIds": { "alias": "multiValuedFeatureIds"; "required": false; "isSignal": true; }; }, { "feature": "featureChange"; "featureCancel": "featureCancel"; }, never, never, true, never>;
|
|
732
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FeatureEditorComponent, "gve-feature-editor", never, { "featNames": { "alias": "featNames"; "required": false; "isSignal": true; }; "featValues": { "alias": "featValues"; "required": false; "isSignal": true; }; "featProps": { "alias": "featProps"; "required": false; "isSignal": true; }; "feature": { "alias": "feature"; "required": false; "isSignal": true; }; "isVar": { "alias": "isVar"; "required": false; "isSignal": true; }; "multiValuedFeatureIds": { "alias": "multiValuedFeatureIds"; "required": false; "isSignal": true; }; }, { "feature": "featureChange"; "featureCancel": "featureCancel"; }, never, never, true, never>;
|
|
800
733
|
}
|
|
801
734
|
|
|
802
735
|
/**
|
|
@@ -814,6 +747,14 @@ interface FeatureDefinitions {
|
|
|
814
747
|
* to populate the value selection.
|
|
815
748
|
*/
|
|
816
749
|
values?: FeatureMap;
|
|
750
|
+
/**
|
|
751
|
+
* The feature properties map. When specified and the user selects a
|
|
752
|
+
* feature name present in the map keys, the corresponding properties
|
|
753
|
+
* will be used to populate the form controls for set policy, negation,
|
|
754
|
+
* global, and short-lived. This allows presetting these properties
|
|
755
|
+
* for specific features without hardcoding that logic in the component.
|
|
756
|
+
*/
|
|
757
|
+
props?: FeaturePropMap;
|
|
817
758
|
}
|
|
818
759
|
/**
|
|
819
760
|
* 🔑 `gve-chain-operation-editor`
|
|
@@ -826,7 +767,7 @@ interface FeatureDefinitions {
|
|
|
826
767
|
* - ▶️ `sourceIds` (`LabeledId[]`): the list of source IDs, when using a closed list.
|
|
827
768
|
* - ▶️ `sourceTypes` (`LabeledId[]`): the list of source types, when using a closed list.
|
|
828
769
|
* - ▶️ `featureDefs` (`FeatureDefinitions`): definitions for features, including
|
|
829
|
-
* names and
|
|
770
|
+
* names, values, and properties.
|
|
830
771
|
* - ▶️ `rangePatch` (`BaseTextRange`): when set, the edited operation's text
|
|
831
772
|
* range (at and run) will be patched with the provided one.
|
|
832
773
|
* - 🔥 `operationChange` (`CharChainOperation`): emitted when the operation
|
|
@@ -872,9 +813,6 @@ interface FeatureDefinitions {
|
|
|
872
813
|
* as a whole.
|
|
873
814
|
*/
|
|
874
815
|
declare class ChainOperationEditorComponent implements OnInit, OnDestroy {
|
|
875
|
-
private _clipboard;
|
|
876
|
-
private _settings;
|
|
877
|
-
private _dialogService;
|
|
878
816
|
private readonly _subs;
|
|
879
817
|
private readonly _nanoid;
|
|
880
818
|
/**
|
|
@@ -890,7 +828,7 @@ declare class ChainOperationEditorComponent implements OnInit, OnDestroy {
|
|
|
890
828
|
*/
|
|
891
829
|
readonly hidePreview: _angular_core.InputSignal<boolean | undefined>;
|
|
892
830
|
/**
|
|
893
|
-
* Definitions for features, including names and
|
|
831
|
+
* Definitions for features, including names, values, and properties.
|
|
894
832
|
*/
|
|
895
833
|
readonly featureDefs: _angular_core.InputSignal<FeatureDefinitions | undefined>;
|
|
896
834
|
/**
|
|
@@ -951,7 +889,7 @@ declare class ChainOperationEditorComponent implements OnInit, OnDestroy {
|
|
|
951
889
|
newTextHidden: FormControl<boolean>;
|
|
952
890
|
dpFeatures: FormControl<Feature[]>;
|
|
953
891
|
form: FormGroup;
|
|
954
|
-
constructor(formBuilder: FormBuilder
|
|
892
|
+
constructor(formBuilder: FormBuilder);
|
|
955
893
|
ngOnInit(): void;
|
|
956
894
|
ngOnDestroy(): void;
|
|
957
895
|
private toggleLfEscape;
|
|
@@ -1096,6 +1034,14 @@ declare class FeatureSetEditorComponent implements OnInit, OnDestroy {
|
|
|
1096
1034
|
* to populate the value selection.
|
|
1097
1035
|
*/
|
|
1098
1036
|
readonly featValues: _angular_core.InputSignal<FeatureMap | undefined>;
|
|
1037
|
+
/**
|
|
1038
|
+
* The feature properties map. When specified and the user selects a
|
|
1039
|
+
* feature name present in the map keys, the corresponding properties
|
|
1040
|
+
* will be used to populate the form controls for set policy, negation,
|
|
1041
|
+
* global, and short-lived. This allows presetting these properties
|
|
1042
|
+
* for specific features without hardcoding that logic in the component.
|
|
1043
|
+
*/
|
|
1044
|
+
readonly featProps: _angular_core.InputSignal<FeaturePropMap | undefined>;
|
|
1099
1045
|
/**
|
|
1100
1046
|
* The threshold at which the features filter should become visible.
|
|
1101
1047
|
* If set to 0, the filter is always visible; if set to -1, it is always
|
|
@@ -1142,7 +1088,7 @@ declare class FeatureSetEditorComponent implements OnInit, OnDestroy {
|
|
|
1142
1088
|
onFeatureCancel(): void;
|
|
1143
1089
|
onOk(): void;
|
|
1144
1090
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FeatureSetEditorComponent, never>;
|
|
1145
|
-
static ɵcmp: _angular_core.ɵɵ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; }; "multiValuedFeatureIds": { "alias": "multiValuedFeatureIds"; "required": false; "isSignal": true; }; "batchMode": { "alias": "batchMode"; "required": false; "isSignal": true; }; "features": { "alias": "features"; "required": false; "isSignal": true; }; }, { "close": "close"; "features": "featuresChange"; }, never, never, true, never>;
|
|
1091
|
+
static ɵcmp: _angular_core.ɵɵ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; }; "featProps": { "alias": "featProps"; "required": false; "isSignal": true; }; "filterThreshold": { "alias": "filterThreshold"; "required": false; "isSignal": true; }; "multiValuedFeatureIds": { "alias": "multiValuedFeatureIds"; "required": false; "isSignal": true; }; "batchMode": { "alias": "batchMode"; "required": false; "isSignal": true; }; "features": { "alias": "features"; "required": false; "isSignal": true; }; }, { "close": "close"; "features": "featuresChange"; }, never, never, true, never>;
|
|
1146
1092
|
}
|
|
1147
1093
|
|
|
1148
1094
|
/**
|
|
@@ -1687,5 +1633,93 @@ declare class GveGraphvizService {
|
|
|
1687
1633
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<GveGraphvizService>;
|
|
1688
1634
|
}
|
|
1689
1635
|
|
|
1636
|
+
/**
|
|
1637
|
+
* Service to store and retrieve dynamic settings.
|
|
1638
|
+
*/
|
|
1639
|
+
declare class SettingsService {
|
|
1640
|
+
private readonly _cache;
|
|
1641
|
+
private readonly _subject;
|
|
1642
|
+
/**
|
|
1643
|
+
* Observable emitting the key of the setting that has changed.
|
|
1644
|
+
*/
|
|
1645
|
+
get settingChange$(): Observable<string | null>;
|
|
1646
|
+
/**
|
|
1647
|
+
* Prefix to scope the keys. This prefix is used internally to scope the keys
|
|
1648
|
+
* so that they cannot conflict with other keys in the local storage.
|
|
1649
|
+
* The prefix is totally transparent to the user of the service, who should
|
|
1650
|
+
* use the keys without the prefix.
|
|
1651
|
+
*/
|
|
1652
|
+
keyPrefix?: string;
|
|
1653
|
+
/**
|
|
1654
|
+
* True to persist the settings in the local storage by default.
|
|
1655
|
+
*/
|
|
1656
|
+
persistDefault: boolean;
|
|
1657
|
+
/**
|
|
1658
|
+
* Scopes the key by prefixing it with the keyPrefix if any.
|
|
1659
|
+
*
|
|
1660
|
+
* @param key The key to scope.
|
|
1661
|
+
* @returns The scoped key.
|
|
1662
|
+
*/
|
|
1663
|
+
private getScopedKey;
|
|
1664
|
+
private isPersist;
|
|
1665
|
+
/**
|
|
1666
|
+
* Sets a setting's value.
|
|
1667
|
+
*
|
|
1668
|
+
* @param key The key.
|
|
1669
|
+
* @param value The value.
|
|
1670
|
+
* @param persist True to persist this setting in local storage.
|
|
1671
|
+
*/
|
|
1672
|
+
set(key: string, value: any, persist?: boolean): void;
|
|
1673
|
+
/**
|
|
1674
|
+
* Set multiple settings at once from the specified settings object.
|
|
1675
|
+
*
|
|
1676
|
+
* @param settings The settings to set.
|
|
1677
|
+
* @param persist True to persist these settings in local storage.
|
|
1678
|
+
*/
|
|
1679
|
+
setFrom(settings: {
|
|
1680
|
+
[key: string]: any;
|
|
1681
|
+
} | undefined | null, persist?: boolean): void;
|
|
1682
|
+
/**
|
|
1683
|
+
* Get a setting's value of type T.
|
|
1684
|
+
*
|
|
1685
|
+
* @param key The key.
|
|
1686
|
+
* @param defaultValue The default value to get when the setting
|
|
1687
|
+
* is not found in the store.
|
|
1688
|
+
* @returns The value.
|
|
1689
|
+
*/
|
|
1690
|
+
get<T>(key: string, defaultValue?: any, persist?: boolean): T;
|
|
1691
|
+
/**
|
|
1692
|
+
* Check if a key exists in the store.
|
|
1693
|
+
*
|
|
1694
|
+
* @param key The key.
|
|
1695
|
+
* @param persist True to check if the key exists in local storage.
|
|
1696
|
+
* @returns True if the key exists in the store.
|
|
1697
|
+
*/
|
|
1698
|
+
contains(key: string, persist?: boolean): boolean;
|
|
1699
|
+
/**
|
|
1700
|
+
* Get all the keys of the settings in the store.
|
|
1701
|
+
*
|
|
1702
|
+
* @param persist True to include keys from local storage.
|
|
1703
|
+
* @returns The keys of the settings in the store.
|
|
1704
|
+
*/
|
|
1705
|
+
getKeys(persist?: boolean): string[];
|
|
1706
|
+
/**
|
|
1707
|
+
* Remove a setting if present.
|
|
1708
|
+
*
|
|
1709
|
+
* @param key The key.
|
|
1710
|
+
* @param persist True to remove the setting from local storage.
|
|
1711
|
+
*/
|
|
1712
|
+
remove(key: string, persist?: boolean): void;
|
|
1713
|
+
/**
|
|
1714
|
+
* Clear all settings. Warning: this will remove all settings from the
|
|
1715
|
+
* local storage if no key prefix is set.
|
|
1716
|
+
*
|
|
1717
|
+
* @param persist True to remove all settings from local storage.
|
|
1718
|
+
*/
|
|
1719
|
+
clear(persist?: boolean): void;
|
|
1720
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SettingsService, never>;
|
|
1721
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SettingsService>;
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1690
1724
|
export { BaseTextCharComponent, BaseTextEditorComponent, BaseTextViewComponent, BatchOperationEditorComponent, ChainOperationEditorComponent, ChainResultViewComponent, FeatureEditorComponent, FeatureSetEditorComponent, FeatureSetPolicy, FeatureSetViewComponent, GveApiService, GveBaseTextService, GveGraphvizService, OperationSourceEditorComponent, OperationType, SettingsService, SnapshotEditorComponent, SnapshotTextEditorComponent, StepsMapComponent };
|
|
1691
|
-
export type { BaseTextChar, BaseTextCharEvent, BaseTextRange, ChainOperationContextStep, ChainOperationTags, CharChain, CharChainLink, CharChainNode, CharChainOperation, CharChainResult, CharNode, Feature, FeatureDefinitions, FeatureMap, GraphvizRankdir, LabeledId, OperationFeature, OperationMetadata, OperationSource, PayloadMatDialogConfig, ResultWrapper, Snapshot, TreeNode };
|
|
1725
|
+
export type { BaseTextChar, BaseTextCharEvent, BaseTextRange, ChainOperationContextStep, ChainOperationTags, CharChain, CharChainLink, CharChainNode, CharChainOperation, CharChainResult, CharNode, Feature, FeatureDefinitions, FeatureMap, FeaturePropMap, GraphvizRankdir, LabeledId, OperationFeature, OperationMetadata, OperationSource, PayloadMatDialogConfig, ResultWrapper, Snapshot, TreeNode };
|