ngssm-store 22.0.1 → 22.2.0
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 +3 -52
- package/fesm2022/ngssm-store-caching-testing.mjs +61 -126
- package/fesm2022/ngssm-store-caching-testing.mjs.map +1 -1
- package/fesm2022/ngssm-store-caching.mjs +102 -134
- package/fesm2022/ngssm-store-caching.mjs.map +1 -1
- package/fesm2022/ngssm-store-testing.mjs +36 -64
- package/fesm2022/ngssm-store-testing.mjs.map +1 -1
- package/fesm2022/ngssm-store-visibility-testing.mjs +53 -75
- package/fesm2022/ngssm-store-visibility-testing.mjs.map +1 -1
- package/fesm2022/ngssm-store-visibility.mjs +441 -244
- package/fesm2022/ngssm-store-visibility.mjs.map +1 -1
- package/fesm2022/ngssm-store.mjs +385 -488
- package/fesm2022/ngssm-store.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ngssm-store-caching-testing.d.ts +35 -39
- package/types/ngssm-store-caching.d.ts +43 -55
- package/types/ngssm-store-testing.d.ts +13 -19
- package/types/ngssm-store-visibility-testing.d.ts +29 -33
- package/types/ngssm-store-visibility.d.ts +107 -95
- package/types/ngssm-store.d.ts +183 -232
|
@@ -1,113 +1,125 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import { EnvironmentProviders, PipeTransform, Signal } from
|
|
3
|
-
import { Action, State, Store
|
|
4
|
-
import { Spec } from
|
|
5
|
-
|
|
6
|
-
declare
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
hideElement = "[NgssmVisibilityActionType] hideElement",
|
|
12
|
-
showElement = "[NgssmVisibilityActionType] showElement"
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { EnvironmentProviders, PipeTransform, Signal } from "@angular/core";
|
|
3
|
+
import { Action, Reducer, State, Store } from "ngssm-store";
|
|
4
|
+
import { Spec } from "immutability-helper";
|
|
5
|
+
export declare const provideNgssmVisibility: () => EnvironmentProviders;
|
|
6
|
+
export declare enum NgssmVisibilityActionType {
|
|
7
|
+
defineElementsGroup = "[NgssmVisibilityActionType] defineElementsGroup",
|
|
8
|
+
toggleElementVisibility = "[NgssmVisibilityActionType] toggleElementVisibility",
|
|
9
|
+
hideElement = "[NgssmVisibilityActionType] hideElement",
|
|
10
|
+
showElement = "[NgssmVisibilityActionType] showElement"
|
|
13
11
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
constructor(elementKey: string);
|
|
12
|
+
export declare class ToggleElementVisibilityAction implements Action {
|
|
13
|
+
readonly elementKey: string;
|
|
14
|
+
readonly type: string;
|
|
15
|
+
constructor(elementKey: string);
|
|
19
16
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
constructor(elementKey: string);
|
|
17
|
+
export declare class ShowElementAction implements Action {
|
|
18
|
+
readonly elementKey: string;
|
|
19
|
+
readonly type: string;
|
|
20
|
+
constructor(elementKey: string);
|
|
25
21
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
constructor(elementKey: string);
|
|
22
|
+
export declare class HideElementAction implements Action {
|
|
23
|
+
readonly elementKey: string;
|
|
24
|
+
readonly type: string;
|
|
25
|
+
constructor(elementKey: string);
|
|
31
26
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
constructor(elementKeys: string[]);
|
|
27
|
+
export declare class DefineElementsGroupAction implements Action {
|
|
28
|
+
readonly elementKeys: string[];
|
|
29
|
+
readonly type: string;
|
|
30
|
+
constructor(elementKeys: string[]);
|
|
37
31
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<NgssmIsElementVisiblePipe, "ngssmIsElementVisible", true>;
|
|
32
|
+
export declare class NgssmIsElementVisiblePipe implements PipeTransform {
|
|
33
|
+
transform(value: State, ...args: string[]): boolean;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgssmIsElementVisiblePipe, never>;
|
|
35
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<NgssmIsElementVisiblePipe, "ngssmIsElementVisible", true>;
|
|
43
36
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
export declare class NgssmShowElement {
|
|
38
|
+
readonly ngssmShowElement: import("@angular/core").InputSignal<string | null | undefined>;
|
|
39
|
+
private readonly store;
|
|
40
|
+
showElement(): void;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgssmShowElement, never>;
|
|
42
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgssmShowElement, "[ngssmShowElement]", never, {
|
|
43
|
+
"ngssmShowElement": {
|
|
44
|
+
"alias": "ngssmShowElement";
|
|
45
|
+
"required": false;
|
|
46
|
+
"isSignal": true;
|
|
47
|
+
};
|
|
48
|
+
}, {}, never, never, true, never>;
|
|
51
49
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
export declare class NgssmHideElement {
|
|
51
|
+
readonly ngssmHideElement: import("@angular/core").InputSignal<string | null | undefined>;
|
|
52
|
+
private readonly store;
|
|
53
|
+
hideElement(): void;
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgssmHideElement, never>;
|
|
55
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgssmHideElement, "[ngssmHideElement]", never, {
|
|
56
|
+
"ngssmHideElement": {
|
|
57
|
+
"alias": "ngssmHideElement";
|
|
58
|
+
"required": false;
|
|
59
|
+
"isSignal": true;
|
|
60
|
+
};
|
|
61
|
+
}, {}, never, never, true, never>;
|
|
59
62
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
export declare class NgssmToggleElementVisibility {
|
|
64
|
+
readonly ngssmToggleElementVisibility: import("@angular/core").InputSignal<string | null | undefined>;
|
|
65
|
+
private readonly store;
|
|
66
|
+
toggleElementVisibility(): void;
|
|
67
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgssmToggleElementVisibility, never>;
|
|
68
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgssmToggleElementVisibility, "[ngssmToggleElementVisibility]", never, {
|
|
69
|
+
"ngssmToggleElementVisibility": {
|
|
70
|
+
"alias": "ngssmToggleElementVisibility";
|
|
71
|
+
"required": false;
|
|
72
|
+
"isSignal": true;
|
|
73
|
+
};
|
|
74
|
+
}, {}, never, never, true, never>;
|
|
67
75
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
export declare class NgssmVisibilityToggleGroup {
|
|
77
|
+
readonly items: import("@angular/core").InputSignal<{
|
|
78
|
+
label: string;
|
|
79
|
+
key: string;
|
|
80
|
+
}[]>;
|
|
81
|
+
readonly hideMultipleSelectionIndicator: import("@angular/core").InputSignalWithTransform<boolean, boolean>;
|
|
82
|
+
protected readonly store: Store;
|
|
83
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgssmVisibilityToggleGroup, never>;
|
|
84
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgssmVisibilityToggleGroup, "ngssm-visibility-toggle-group", never, {
|
|
85
|
+
"items": {
|
|
86
|
+
"alias": "items";
|
|
87
|
+
"required": false;
|
|
88
|
+
"isSignal": true;
|
|
89
|
+
};
|
|
90
|
+
"hideMultipleSelectionIndicator": {
|
|
91
|
+
"alias": "hideMultipleSelectionIndicator";
|
|
92
|
+
"required": false;
|
|
93
|
+
"isSignal": true;
|
|
94
|
+
};
|
|
95
|
+
}, {}, never, never, true, never>;
|
|
78
96
|
}
|
|
79
|
-
|
|
80
|
-
declare const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
elementsGroups: string[][];
|
|
97
|
+
export declare const selectNgssmVisibilityState: (state: State) => NgssmVisibilityState;
|
|
98
|
+
export declare const updateNgssmVisibilityState: (state: State, command: Spec<NgssmVisibilityState, never>) => State;
|
|
99
|
+
export interface NgssmVisibilityState {
|
|
100
|
+
elements: Record<string, boolean>;
|
|
101
|
+
elementsGroups: string[][];
|
|
85
102
|
}
|
|
86
|
-
declare class NgssmVisibilityStateSpecification {
|
|
87
|
-
|
|
88
|
-
|
|
103
|
+
export declare class NgssmVisibilityStateSpecification {
|
|
104
|
+
static readonly featureStateKey = "ngssm-visibility-state";
|
|
105
|
+
static readonly initialState: NgssmVisibilityState;
|
|
89
106
|
}
|
|
90
|
-
|
|
91
107
|
/**
|
|
92
108
|
* Represents the visibility state of a specific element.
|
|
93
109
|
* - key: The unique identifier for the element.
|
|
94
110
|
* - visible: A signal that emits the visibility status (true if visible, false otherwise).
|
|
95
111
|
*/
|
|
96
|
-
interface ElementVisibility {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
declare const isElementVisible: (elementKey: string) => ElementVisibility;
|
|
101
|
-
|
|
102
|
-
declare class VisibilityReducer implements Reducer {
|
|
103
|
-
readonly processedActions: string[];
|
|
104
|
-
updateState(state: State, action: Action): State;
|
|
105
|
-
private groupExists;
|
|
106
|
-
private getElementsKeysGroupedWith;
|
|
107
|
-
private setElementVisible;
|
|
108
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<VisibilityReducer, never>;
|
|
109
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<VisibilityReducer>;
|
|
112
|
+
export interface ElementVisibility {
|
|
113
|
+
key: string;
|
|
114
|
+
visible: Signal<boolean>;
|
|
110
115
|
}
|
|
111
|
-
|
|
112
|
-
export
|
|
113
|
-
|
|
116
|
+
export declare const isElementVisible: (elementKey: string) => ElementVisibility;
|
|
117
|
+
export declare class VisibilityReducer implements Reducer {
|
|
118
|
+
readonly processedActions: string[];
|
|
119
|
+
updateState(state: State, action: Action): State;
|
|
120
|
+
private groupExists;
|
|
121
|
+
private getElementsKeysGroupedWith;
|
|
122
|
+
private setElementVisible;
|
|
123
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VisibilityReducer, never>;
|
|
124
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
125
|
+
}
|