ngssm-store 16.1.11 → 16.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/esm2022/caching/src/reducers/cached-item.reducer.mjs +3 -3
- package/esm2022/lib/logging/console-appender.mjs +3 -3
- package/esm2022/lib/logging/logger.mjs +3 -3
- package/esm2022/lib/ngssm-component.mjs +3 -3
- package/esm2022/lib/store.mjs +3 -3
- package/esm2022/visibility/src/components/hide-element.directive.mjs +3 -3
- package/esm2022/visibility/src/components/index.mjs +2 -1
- package/esm2022/visibility/src/components/is-element-visible.pipe.mjs +3 -3
- package/esm2022/visibility/src/components/show-element.directive.mjs +3 -3
- package/esm2022/visibility/src/components/toggle-element-visibility.directive.mjs +3 -3
- package/esm2022/visibility/src/components/visibility-toggle-group/visibility-toggle-group.component.mjs +25 -0
- package/esm2022/visibility/src/reducers/visibility.reducer.mjs +3 -3
- package/fesm2022/ngssm-store-caching.mjs +3 -3
- package/fesm2022/ngssm-store-visibility.mjs +37 -18
- package/fesm2022/ngssm-store-visibility.mjs.map +1 -1
- package/fesm2022/ngssm-store.mjs +12 -12
- package/package.json +1 -1
- package/visibility/src/components/index.d.ts +1 -0
- package/visibility/src/components/visibility-toggle-group/visibility-toggle-group.component.d.ts +11 -0
|
@@ -40,10 +40,10 @@ export class CachedItemReducer {
|
|
|
40
40
|
}
|
|
41
41
|
return state;
|
|
42
42
|
}
|
|
43
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
44
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
43
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: CachedItemReducer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
44
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: CachedItemReducer }); }
|
|
45
45
|
}
|
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: CachedItemReducer, decorators: [{
|
|
47
47
|
type: Injectable
|
|
48
48
|
}] });
|
|
49
49
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FjaGVkLWl0ZW0ucmVkdWNlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25nc3NtLXN0b3JlL2NhY2hpbmcvc3JjL3JlZHVjZXJzL2NhY2hlZC1pdGVtLnJlZHVjZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUkzQyxPQUFPLEVBQUUsc0JBQXNCLEVBQThDLE1BQU0sWUFBWSxDQUFDO0FBQ2hHLE9BQU8sRUFBRSxxQkFBcUIsRUFBRSx1QkFBdUIsRUFBRSxNQUFNLFVBQVUsQ0FBQztBQUMxRSxPQUFPLEVBQWMsZ0JBQWdCLEVBQUUsTUFBTSxVQUFVLENBQUM7O0FBR3hELE1BQU0sT0FBTyxpQkFBaUI7SUFEOUI7UUFFa0IscUJBQWdCLEdBQWEsQ0FBQyxzQkFBc0IsQ0FBQyxhQUFhLEVBQUUsc0JBQXNCLENBQUMsZUFBZSxDQUFDLENBQUM7S0F1QzdIO0lBckNRLFdBQVcsQ0FBQyxLQUFZLEVBQUUsTUFBYztRQUM3QyxRQUFRLE1BQU0sQ0FBQyxJQUFJLEVBQUU7WUFDbkIsS0FBSyxzQkFBc0IsQ0FBQyxhQUFhLENBQUMsQ0FBQztnQkFDekMsTUFBTSxtQkFBbUIsR0FBRyxNQUE2QixDQUFDO2dCQUMx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dzc21DYWNoZWRJdGVtKHN0YXRlLCB1bnNldENhY2hlZEl0ZW1BY3Rpb24uY2FjaGVkSXRlbUtleSkgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIHJldHVybiBzdGF0ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB1cGRhdGVOZ3NzbUNhY2hpbmdTdGF0ZShzdGF0ZSwge1xuICAgICAgICAgIGNhY2hlczogeyAkdW5zZXQ6IFt1bnNldENhY2hlZEl0ZW1BY3Rpb24uY2FjaGVkSXRlbUtleV0gfVxuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gc3RhdGU7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -32,10 +32,10 @@ export class ConsoleAppender {
|
|
|
32
32
|
stop() {
|
|
33
33
|
this.stopEvent$.next(true);
|
|
34
34
|
}
|
|
35
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
36
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
35
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ConsoleAppender, deps: [{ token: i1.Logger }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
36
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ConsoleAppender, providedIn: 'root' }); }
|
|
37
37
|
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ConsoleAppender, decorators: [{
|
|
39
39
|
type: Injectable,
|
|
40
40
|
args: [{
|
|
41
41
|
providedIn: 'root'
|
|
@@ -25,10 +25,10 @@ export class Logger {
|
|
|
25
25
|
payload
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
29
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: Logger, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
29
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: Logger, providedIn: 'root' }); }
|
|
30
30
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: Logger, decorators: [{
|
|
32
32
|
type: Injectable,
|
|
33
33
|
args: [{
|
|
34
34
|
providedIn: 'root'
|
|
@@ -23,10 +23,10 @@ export class NgSsmComponent {
|
|
|
23
23
|
dispatchActionType(actionType) {
|
|
24
24
|
this.store.dispatchActionType(actionType);
|
|
25
25
|
}
|
|
26
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
27
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgSsmComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
27
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: NgSsmComponent, ngImport: i0 }); }
|
|
28
28
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgSsmComponent, decorators: [{
|
|
30
30
|
type: Directive,
|
|
31
31
|
args: [{}]
|
|
32
32
|
}], ctorParameters: function () { return [{ type: i1.Store }]; } });
|
package/esm2022/lib/store.mjs
CHANGED
|
@@ -108,10 +108,10 @@ export class Store {
|
|
|
108
108
|
setTimeout(() => this.processNextAction());
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
112
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
111
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: Store, deps: [{ token: i1.Logger }, { token: NGSSM_REDUCER, optional: true }, { token: NGSSM_EFFECT, optional: true }, { token: NGSSM_STATE_INITIALIZER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
112
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: Store, providedIn: 'root' }); }
|
|
113
113
|
}
|
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: Store, decorators: [{
|
|
115
115
|
type: Injectable,
|
|
116
116
|
args: [{
|
|
117
117
|
providedIn: 'root'
|
|
@@ -13,10 +13,10 @@ export class HideElementDirective {
|
|
|
13
13
|
this.store.dispatchAction(new HideElementAction(elementKey));
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
17
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: HideElementDirective, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
17
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: HideElementDirective, isStandalone: true, selector: "[hideElement]", inputs: { key: ["hideElement", "key"] }, host: { listeners: { "click": "toggleElementvisibility($event)" } }, ngImport: i0 }); }
|
|
18
18
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: HideElementDirective, decorators: [{
|
|
20
20
|
type: Directive,
|
|
21
21
|
args: [{
|
|
22
22
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -2,4 +2,5 @@ export * from './toggle-element-visibility.directive';
|
|
|
2
2
|
export * from './is-element-visible.pipe';
|
|
3
3
|
export * from './show-element.directive';
|
|
4
4
|
export * from './hide-element.directive';
|
|
5
|
-
|
|
5
|
+
export * from './visibility-toggle-group/visibility-toggle-group.component';
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3NzbS1zdG9yZS92aXNpYmlsaXR5L3NyYy9jb21wb25lbnRzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsdUNBQXVDLENBQUM7QUFDdEQsY0FBYywyQkFBMkIsQ0FBQztBQUMxQyxjQUFjLDBCQUEwQixDQUFDO0FBQ3pDLGNBQWMsMEJBQTBCLENBQUM7QUFDekMsY0FBYyw2REFBNkQsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vdG9nZ2xlLWVsZW1lbnQtdmlzaWJpbGl0eS5kaXJlY3RpdmUnO1xuZXhwb3J0ICogZnJvbSAnLi9pcy1lbGVtZW50LXZpc2libGUucGlwZSc7XG5leHBvcnQgKiBmcm9tICcuL3Nob3ctZWxlbWVudC5kaXJlY3RpdmUnO1xuZXhwb3J0ICogZnJvbSAnLi9oaWRlLWVsZW1lbnQuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vdmlzaWJpbGl0eS10b2dnbGUtZ3JvdXAvdmlzaWJpbGl0eS10b2dnbGUtZ3JvdXAuY29tcG9uZW50JztcbiJdfQ==
|
|
@@ -5,10 +5,10 @@ export class IsElementVisiblePipe {
|
|
|
5
5
|
transform(value, ...args) {
|
|
6
6
|
return selectNgssmVisibilityState(value).elements[args[0]] === true;
|
|
7
7
|
}
|
|
8
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
9
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.
|
|
8
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: IsElementVisiblePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
9
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.2", ngImport: i0, type: IsElementVisiblePipe, isStandalone: true, name: "isElementVisible" }); }
|
|
10
10
|
}
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: IsElementVisiblePipe, decorators: [{
|
|
12
12
|
type: Pipe,
|
|
13
13
|
args: [{
|
|
14
14
|
name: 'isElementVisible',
|
|
@@ -13,10 +13,10 @@ export class ShowElementDirective {
|
|
|
13
13
|
this.store.dispatchAction(new ShowElementAction(elementKey));
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
17
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ShowElementDirective, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
17
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: ShowElementDirective, isStandalone: true, selector: "[showElement]", inputs: { key: ["showElement", "key"] }, host: { listeners: { "click": "toggleElementvisibility($event)" } }, ngImport: i0 }); }
|
|
18
18
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ShowElementDirective, decorators: [{
|
|
20
20
|
type: Directive,
|
|
21
21
|
args: [{
|
|
22
22
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -13,10 +13,10 @@ export class ToggleElementVisibilityDirective {
|
|
|
13
13
|
this.store.dispatchAction(new ToggleElementVisibilityAction(elementKey));
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
17
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ToggleElementVisibilityDirective, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
17
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: ToggleElementVisibilityDirective, isStandalone: true, selector: "[toggleElementVisibility]", inputs: { key: ["toggleElementVisibility", "key"] }, host: { listeners: { "click": "toggleElementvisibility($event)" } }, ngImport: i0 }); }
|
|
18
18
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ToggleElementVisibilityDirective, decorators: [{
|
|
20
20
|
type: Directive,
|
|
21
21
|
args: [{
|
|
22
22
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
4
|
+
import { NgSsmComponent } from 'ngssm-store';
|
|
5
|
+
import { ToggleElementVisibilityDirective } from '../toggle-element-visibility.directive';
|
|
6
|
+
import { IsElementVisiblePipe } from '../is-element-visible.pipe';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "ngssm-store";
|
|
9
|
+
import * as i2 from "@angular/common";
|
|
10
|
+
import * as i3 from "@angular/material/button-toggle";
|
|
11
|
+
export class VisibilityToggleGroupComponent extends NgSsmComponent {
|
|
12
|
+
constructor(store) {
|
|
13
|
+
super(store);
|
|
14
|
+
this.items = [];
|
|
15
|
+
}
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: VisibilityToggleGroupComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: VisibilityToggleGroupComponent, isStandalone: true, selector: "ngssm-visibility-toggle-group", inputs: { items: "items" }, usesInheritance: true, ngImport: i0, template: "<mat-button-toggle-group [multiple]=\"true\">\n <mat-button-toggle *ngFor=\"let item of items\" [toggleElementVisibility]=\"item.key\"\n [checked]=\"store.state() | isElementVisible:item.key\">\n {{item.label}}\n </mat-button-toggle>\n</mat-button-toggle-group>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i3.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i3.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: ToggleElementVisibilityDirective, selector: "[toggleElementVisibility]", inputs: ["toggleElementVisibility"] }, { kind: "pipe", type: IsElementVisiblePipe, name: "isElementVisible" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
18
|
+
}
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: VisibilityToggleGroupComponent, decorators: [{
|
|
20
|
+
type: Component,
|
|
21
|
+
args: [{ selector: 'ngssm-visibility-toggle-group', standalone: true, imports: [CommonModule, MatButtonToggleModule, ToggleElementVisibilityDirective, IsElementVisiblePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-button-toggle-group [multiple]=\"true\">\n <mat-button-toggle *ngFor=\"let item of items\" [toggleElementVisibility]=\"item.key\"\n [checked]=\"store.state() | isElementVisible:item.key\">\n {{item.label}}\n </mat-button-toggle>\n</mat-button-toggle-group>" }]
|
|
22
|
+
}], ctorParameters: function () { return [{ type: i1.Store }]; }, propDecorators: { items: [{
|
|
23
|
+
type: Input
|
|
24
|
+
}] } });
|
|
25
|
+
//# sourceMapp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dEJ1dHRvblRvZ2dsZU1vZHVsZSwgVG9nZ2xlRWxlbWVudFZpc2liaWxpdHlEaXJlY3RpdmUsIElzRWxlbWVudFZpc2libGVQaXBlXSxcbiAgdGVtcGxhdGVVcmw6ICcuL3Zpc2liaWxpdHktdG9nZ2xlLWdyb3VwLmNvbXBvbmVudC5odG1sJyxcbiAgc3R5bGVVcmxzOiBbXSxcbiAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2hcbn0pXG5leHBvcnQgY2xhc3MgVmlzaWJpbGl0eVRvZ2dsZUdyb3VwQ29tcG9uZW50IGV4dGVuZHMgTmdTc21Db21wb25lbnQge1xuICBASW5wdXQoKSBwdWJsaWMgaXRlbXM6IHsgbGFiZWw6IHN0cmluZzsga2V5OiBzdHJpbmcgfVtdID0gW107XG5cbiAgY29uc3RydWN0b3Ioc3RvcmU6IFN0b3JlKSB7XG4gICAgc3VwZXIoc3RvcmUpO1xuICB9XG59XG4iLCI8bWF0LWJ1dHRvbi10b2dnbGUtZ3JvdXAgW211bHRpcGxlXT1cInRydWVcIj5cbiAgICA8bWF0LWJ1dHRvbi10b2dnbGUgKm5nRm9yPVwibGV0IGl0ZW0gb2YgaXRlbXNcIiBbdG9nZ2xlRWxlbWVudFZpc2liaWxpdHldPVwiaXRlbS5rZXlcIlxuICAgICAgICBbY2hlY2tlZF09XCJzdG9yZS5zdGF0ZSgpIHwgaXNFbGVtZW50VmlzaWJsZTppdGVtLmtleVwiPlxuICAgICAgICB7e2l0ZW0ubGFiZWx9fVxuICAgIDwvbWF0LWJ1dHRvbi10b2dnbGU+XG48L21hdC1idXR0b24tdG9nZ2xlLWdyb3VwPiJdfQ==
|
|
@@ -74,10 +74,10 @@ export class VisibilityReducer {
|
|
|
74
74
|
elements: elementsCommand
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
78
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
77
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: VisibilityReducer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
78
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: VisibilityReducer }); }
|
|
79
79
|
}
|
|
80
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: VisibilityReducer, decorators: [{
|
|
81
81
|
type: Injectable
|
|
82
82
|
}] });
|
|
83
83
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlzaWJpbGl0eS5yZWR1Y2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmdzc20tc3RvcmUvdmlzaWJpbGl0eS9zcmMvcmVkdWNlcnMvdmlzaWJpbGl0eS5yZWR1Y2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFNM0MsT0FBTyxFQUdMLHlCQUF5QixFQUcxQixNQUFNLFlBQVksQ0FBQztBQUNwQixPQUFPLEVBQUUsMEJBQTBCLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxVQUFVLENBQUM7O0FBR2xGLE1BQU0sT0FBTyxpQkFBaUI7SUFEOUI7UUFFa0IscUJBQWdCLEdBQWE7WUFDM0MseUJBQXlCLENBQUMsdUJBQXVCO1lBQ2pELHlCQUF5QixDQUFDLFdBQVc7WUFDckMseUJBQXlCLENBQUMsV0FBVztZQUNyQyx5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lbF0gPSB7ICRzZXQ6IGZhbHNlIH07XG4gICAgfSk7XG5cbiAgICByZXR1cm4gdXBkYXRlTmdzc21WaXNpYmlsaXR5U3RhdGUoc3RhdGUsIHtcbiAgICAgIGVsZW1lbnRzOiBlbGVtZW50c0NvbW1hbmRcbiAgICB9KTtcbiAgfVxufVxuIl19
|
|
@@ -91,10 +91,10 @@ class CachedItemReducer {
|
|
|
91
91
|
}
|
|
92
92
|
return state;
|
|
93
93
|
}
|
|
94
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
95
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
94
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: CachedItemReducer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
95
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: CachedItemReducer }); }
|
|
96
96
|
}
|
|
97
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: CachedItemReducer, decorators: [{
|
|
98
98
|
type: Injectable
|
|
99
99
|
}] });
|
|
100
100
|
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, makeEnvironmentProviders, Directive, Input, HostListener, Pipe } from '@angular/core';
|
|
2
|
+
import { Injectable, makeEnvironmentProviders, Directive, Input, HostListener, Pipe, Component, ChangeDetectionStrategy } from '@angular/core';
|
|
3
3
|
import * as i1 from 'ngssm-store';
|
|
4
|
-
import { NgSsmFeatureState, provideReducers } from 'ngssm-store';
|
|
4
|
+
import { NgSsmFeatureState, provideReducers, NgSsmComponent } from 'ngssm-store';
|
|
5
5
|
import { __decorate } from 'tslib';
|
|
6
6
|
import update from 'immutability-helper';
|
|
7
|
+
import * as i2 from '@angular/common';
|
|
8
|
+
import { CommonModule } from '@angular/common';
|
|
9
|
+
import * as i3 from '@angular/material/button-toggle';
|
|
10
|
+
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
7
11
|
|
|
8
12
|
var NgssmVisibilityActionType;
|
|
9
13
|
(function (NgssmVisibilityActionType) {
|
|
@@ -133,10 +137,10 @@ class VisibilityReducer {
|
|
|
133
137
|
elements: elementsCommand
|
|
134
138
|
});
|
|
135
139
|
}
|
|
136
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
137
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
140
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: VisibilityReducer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
141
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: VisibilityReducer }); }
|
|
138
142
|
}
|
|
139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: VisibilityReducer, decorators: [{
|
|
140
144
|
type: Injectable
|
|
141
145
|
}] });
|
|
142
146
|
|
|
@@ -155,10 +159,10 @@ class ToggleElementVisibilityDirective {
|
|
|
155
159
|
this.store.dispatchAction(new ToggleElementVisibilityAction(elementKey));
|
|
156
160
|
}
|
|
157
161
|
}
|
|
158
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
159
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
162
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ToggleElementVisibilityDirective, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
163
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: ToggleElementVisibilityDirective, isStandalone: true, selector: "[toggleElementVisibility]", inputs: { key: ["toggleElementVisibility", "key"] }, host: { listeners: { "click": "toggleElementvisibility($event)" } }, ngImport: i0 }); }
|
|
160
164
|
}
|
|
161
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ToggleElementVisibilityDirective, decorators: [{
|
|
162
166
|
type: Directive,
|
|
163
167
|
args: [{
|
|
164
168
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -177,10 +181,10 @@ class IsElementVisiblePipe {
|
|
|
177
181
|
transform(value, ...args) {
|
|
178
182
|
return selectNgssmVisibilityState(value).elements[args[0]] === true;
|
|
179
183
|
}
|
|
180
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
181
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.
|
|
184
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: IsElementVisiblePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
185
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.2", ngImport: i0, type: IsElementVisiblePipe, isStandalone: true, name: "isElementVisible" }); }
|
|
182
186
|
}
|
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: IsElementVisiblePipe, decorators: [{
|
|
184
188
|
type: Pipe,
|
|
185
189
|
args: [{
|
|
186
190
|
name: 'isElementVisible',
|
|
@@ -199,10 +203,10 @@ class ShowElementDirective {
|
|
|
199
203
|
this.store.dispatchAction(new ShowElementAction(elementKey));
|
|
200
204
|
}
|
|
201
205
|
}
|
|
202
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
203
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
206
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ShowElementDirective, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
207
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: ShowElementDirective, isStandalone: true, selector: "[showElement]", inputs: { key: ["showElement", "key"] }, host: { listeners: { "click": "toggleElementvisibility($event)" } }, ngImport: i0 }); }
|
|
204
208
|
}
|
|
205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ShowElementDirective, decorators: [{
|
|
206
210
|
type: Directive,
|
|
207
211
|
args: [{
|
|
208
212
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -228,10 +232,10 @@ class HideElementDirective {
|
|
|
228
232
|
this.store.dispatchAction(new HideElementAction(elementKey));
|
|
229
233
|
}
|
|
230
234
|
}
|
|
231
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
232
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
235
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: HideElementDirective, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
236
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: HideElementDirective, isStandalone: true, selector: "[hideElement]", inputs: { key: ["hideElement", "key"] }, host: { listeners: { "click": "toggleElementvisibility($event)" } }, ngImport: i0 }); }
|
|
233
237
|
}
|
|
234
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: HideElementDirective, decorators: [{
|
|
235
239
|
type: Directive,
|
|
236
240
|
args: [{
|
|
237
241
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -246,9 +250,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImpor
|
|
|
246
250
|
args: ['click', ['$event']]
|
|
247
251
|
}] } });
|
|
248
252
|
|
|
253
|
+
class VisibilityToggleGroupComponent extends NgSsmComponent {
|
|
254
|
+
constructor(store) {
|
|
255
|
+
super(store);
|
|
256
|
+
this.items = [];
|
|
257
|
+
}
|
|
258
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: VisibilityToggleGroupComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
259
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.2", type: VisibilityToggleGroupComponent, isStandalone: true, selector: "ngssm-visibility-toggle-group", inputs: { items: "items" }, usesInheritance: true, ngImport: i0, template: "<mat-button-toggle-group [multiple]=\"true\">\n <mat-button-toggle *ngFor=\"let item of items\" [toggleElementVisibility]=\"item.key\"\n [checked]=\"store.state() | isElementVisible:item.key\">\n {{item.label}}\n </mat-button-toggle>\n</mat-button-toggle-group>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i3.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i3.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: ToggleElementVisibilityDirective, selector: "[toggleElementVisibility]", inputs: ["toggleElementVisibility"] }, { kind: "pipe", type: IsElementVisiblePipe, name: "isElementVisible" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
260
|
+
}
|
|
261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: VisibilityToggleGroupComponent, decorators: [{
|
|
262
|
+
type: Component,
|
|
263
|
+
args: [{ selector: 'ngssm-visibility-toggle-group', standalone: true, imports: [CommonModule, MatButtonToggleModule, ToggleElementVisibilityDirective, IsElementVisiblePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-button-toggle-group [multiple]=\"true\">\n <mat-button-toggle *ngFor=\"let item of items\" [toggleElementVisibility]=\"item.key\"\n [checked]=\"store.state() | isElementVisible:item.key\">\n {{item.label}}\n </mat-button-toggle>\n</mat-button-toggle-group>" }]
|
|
264
|
+
}], ctorParameters: function () { return [{ type: i1.Store }]; }, propDecorators: { items: [{
|
|
265
|
+
type: Input
|
|
266
|
+
}] } });
|
|
267
|
+
|
|
249
268
|
/**
|
|
250
269
|
* Generated bundle index. Do not edit.
|
|
251
270
|
*/
|
|
252
271
|
|
|
253
|
-
export { DefineElementsGroupAction, HideElementAction, HideElementDirective, IsElementVisiblePipe, NgssmVisibilityActionType, NgssmVisibilityStateSpecification, ShowElementAction, ShowElementDirective, ToggleElementVisibilityAction, ToggleElementVisibilityDirective, provideNgssmVisibility, selectNgssmVisibilityState, updateNgssmVisibilityState };
|
|
272
|
+
export { DefineElementsGroupAction, HideElementAction, HideElementDirective, IsElementVisiblePipe, NgssmVisibilityActionType, NgssmVisibilityStateSpecification, ShowElementAction, ShowElementDirective, ToggleElementVisibilityAction, ToggleElementVisibilityDirective, VisibilityToggleGroupComponent, provideNgssmVisibility, selectNgssmVisibilityState, updateNgssmVisibilityState };
|
|
254
273
|
//# sourceMappingURL=ngssm-store-visibility.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngssm-store-visibility.mjs","sources":["../../../projects/ngssm-store/visibility/src/actions/ngssm-visibility-action-type.ts","../../../projects/ngssm-store/visibility/src/actions/toggle-element-visibility.action.ts","../../../projects/ngssm-store/visibility/src/actions/show-element.action.ts","../../../projects/ngssm-store/visibility/src/actions/hide-element.action.ts","../../../projects/ngssm-store/visibility/src/actions/define-elements-group.action.ts","../../../projects/ngssm-store/visibility/src/state/ngssm-visibility.state.ts","../../../projects/ngssm-store/visibility/src/reducers/visibility.reducer.ts","../../../projects/ngssm-store/visibility/src/provide-ngssm-visibility.ts","../../../projects/ngssm-store/visibility/src/components/toggle-element-visibility.directive.ts","../../../projects/ngssm-store/visibility/src/components/is-element-visible.pipe.ts","../../../projects/ngssm-store/visibility/src/components/show-element.directive.ts","../../../projects/ngssm-store/visibility/src/components/hide-element.directive.ts","../../../projects/ngssm-store/visibility/ngssm-store-visibility.ts"],"sourcesContent":["export enum NgssmVisibilityActionType {\n defineElementsGroup = '[NgssmVisibilityActionType] defineElementsGroup',\n toggleElementVisibility = '[NgssmVisibilityActionType] toggleElementVisibility',\n hideElement = '[NgssmVisibilityActionType] hideElement',\n showElement = '[NgssmVisibilityActionType] showElement'\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmVisibilityActionType } from './ngssm-visibility-action-type';\n\nexport class ToggleElementVisibilityAction implements Action {\n public readonly type: string = NgssmVisibilityActionType.toggleElementVisibility;\n\n constructor(public readonly elementKey: string) {}\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmVisibilityActionType } from './ngssm-visibility-action-type';\n\nexport class ShowElementAction implements Action {\n public readonly type: string = NgssmVisibilityActionType.showElement;\n\n constructor(public readonly elementKey: string) {}\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmVisibilityActionType } from './ngssm-visibility-action-type';\n\nexport class HideElementAction implements Action {\n public readonly type: string = NgssmVisibilityActionType.hideElement;\n\n constructor(public readonly elementKey: string) {}\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmVisibilityActionType } from './ngssm-visibility-action-type';\n\nexport class DefineElementsGroupAction implements Action {\n public readonly type: string = NgssmVisibilityActionType.defineElementsGroup;\n\n constructor(public readonly elementKeys: string[]) {}\n}\n","import update, { Spec } from 'immutability-helper';\n\nimport { NgSsmFeatureState, State } from 'ngssm-store';\n\nexport const selectNgssmVisibilityState = (state: State): NgssmVisibilityState =>\n state[NgssmVisibilityStateSpecification.featureStateKey] as NgssmVisibilityState;\n\nexport const updateNgssmVisibilityState = (state: State, command: Spec<NgssmVisibilityState, never>): State =>\n update(state, {\n [NgssmVisibilityStateSpecification.featureStateKey]: command\n });\n\nexport interface NgssmVisibilityState {\n elements: { [key: string]: boolean };\n elementsGroups: string[][];\n}\n\n@NgSsmFeatureState({\n featureStateKey: NgssmVisibilityStateSpecification.featureStateKey,\n initialState: NgssmVisibilityStateSpecification.initialState\n})\nexport class NgssmVisibilityStateSpecification {\n public static readonly featureStateKey = 'ngssm-visibility-state';\n public static readonly initialState: NgssmVisibilityState = {\n elements: {},\n elementsGroups: []\n };\n}\n","import { Injectable } from '@angular/core';\n\nimport { Spec } from 'immutability-helper';\n\nimport { Reducer, State, Action } from 'ngssm-store';\n\nimport {\n DefineElementsGroupAction,\n HideElementAction,\n NgssmVisibilityActionType,\n ShowElementAction,\n ToggleElementVisibilityAction\n} from '../actions';\nimport { selectNgssmVisibilityState, updateNgssmVisibilityState } from '../state';\n\n@Injectable()\nexport class VisibilityReducer implements Reducer {\n public readonly processedActions: string[] = [\n NgssmVisibilityActionType.toggleElementVisibility,\n NgssmVisibilityActionType.showElement,\n NgssmVisibilityActionType.hideElement,\n NgssmVisibilityActionType.defineElementsGroup\n ];\n\n public updateState(state: State, action: Action): State {\n switch (action.type) {\n case NgssmVisibilityActionType.toggleElementVisibility: {\n const toggleVisibilityAction = action as ToggleElementVisibilityAction;\n if (selectNgssmVisibilityState(state).elements[toggleVisibilityAction.elementKey] === true) {\n return updateNgssmVisibilityState(state, {\n elements: {\n [toggleVisibilityAction.elementKey]: { $set: false }\n }\n });\n }\n\n return this.setElementVisible(state, toggleVisibilityAction.elementKey);\n }\n\n case NgssmVisibilityActionType.showElement: {\n const showAction = action as ShowElementAction;\n return this.setElementVisible(state, showAction.elementKey);\n }\n\n case NgssmVisibilityActionType.hideElement: {\n const hideAction = action as HideElementAction;\n return updateNgssmVisibilityState(state, {\n elements: {\n [hideAction.elementKey]: { $set: false }\n }\n });\n }\n\n case NgssmVisibilityActionType.defineElementsGroup: {\n const defineElementsGroupAction = action as DefineElementsGroupAction;\n const keys = [...defineElementsGroupAction.elementKeys];\n keys.sort();\n if (this.groupExists(keys, selectNgssmVisibilityState(state).elementsGroups)) {\n break;\n }\n\n return updateNgssmVisibilityState(state, {\n elementsGroups: { $push: [keys] }\n });\n }\n }\n\n return state;\n }\n\n private groupExists(keys: string[], groups: string[][]): boolean {\n const index = groups.findIndex((group) => {\n group.length === keys.length && group.findIndex((k, i) => k !== keys[i]) === -1;\n });\n return index !== -1;\n }\n\n private getElementsKeysGroupedWith(key: string, groups: string[][]): string[] {\n const keys = groups.filter((g) => g.includes(key)).flatMap((g) => g);\n const distinctKeys = new Set<string>(keys);\n distinctKeys.delete(key);\n return [...distinctKeys];\n }\n\n private setElementVisible(state: State, key: string): State {\n const elementsCommand: Spec<{ [key: string]: boolean }, never> = {\n [key]: { $set: true }\n };\n\n const associatedElements = this.getElementsKeysGroupedWith(key, selectNgssmVisibilityState(state).elementsGroups);\n associatedElements.forEach((el) => {\n elementsCommand[el] = { $set: false };\n });\n\n return updateNgssmVisibilityState(state, {\n elements: elementsCommand\n });\n }\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { provideReducers } from 'ngssm-store';\nimport { VisibilityReducer } from './reducers';\n\nexport const provideNgssmVisibility = (): EnvironmentProviders => {\n return makeEnvironmentProviders([provideReducers(VisibilityReducer)]);\n};\n","import { Directive, HostListener, Input } from '@angular/core';\n\nimport { Store } from 'ngssm-store';\n\nimport { ToggleElementVisibilityAction } from '../actions';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[toggleElementVisibility]',\n standalone: true\n})\nexport class ToggleElementVisibilityDirective {\n @Input('toggleElementVisibility') public key: string | undefined | null = '';\n\n constructor(private store: Store) {}\n\n @HostListener('click', ['$event'])\n public toggleElementvisibility(): void {\n const elementKey = this.key;\n if (elementKey) {\n this.store.dispatchAction(new ToggleElementVisibilityAction(elementKey));\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { State } from 'ngssm-store';\nimport { selectNgssmVisibilityState } from '../state';\n\n@Pipe({\n name: 'isElementVisible',\n standalone: true\n})\nexport class IsElementVisiblePipe implements PipeTransform {\n public transform(value: State, ...args: string[]): boolean {\n return selectNgssmVisibilityState(value).elements[args[0]] === true;\n }\n}\n","import { Directive, HostListener, Input } from '@angular/core';\nimport { Store } from 'ngssm-store';\nimport { ShowElementAction } from '../actions';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[showElement]',\n standalone: true\n})\nexport class ShowElementDirective {\n @Input('showElement') public key: string | undefined | null = '';\n\n constructor(private store: Store) {}\n\n @HostListener('click', ['$event'])\n public toggleElementvisibility(): void {\n const elementKey = this.key;\n if (elementKey) {\n this.store.dispatchAction(new ShowElementAction(elementKey));\n }\n }\n}\n","import { Directive, HostListener, Input } from '@angular/core';\nimport { Store } from 'ngssm-store';\nimport { HideElementAction } from '../actions';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[hideElement]',\n standalone: true\n})\nexport class HideElementDirective {\n @Input('hideElement') public key: string | undefined | null = '';\n\n constructor(private store: Store) {}\n\n @HostListener('click', ['$event'])\n public toggleElementvisibility(): void {\n const elementKey = this.key;\n if (elementKey) {\n this.store.dispatchAction(new HideElementAction(elementKey));\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;IAAY,0BAKX;AALD,CAAA,UAAY,yBAAyB,EAAA;AACnC,IAAA,yBAAA,CAAA,qBAAA,CAAA,GAAA,iDAAuE,CAAA;AACvE,IAAA,yBAAA,CAAA,yBAAA,CAAA,GAAA,qDAA+E,CAAA;AAC/E,IAAA,yBAAA,CAAA,aAAA,CAAA,GAAA,yCAAuD,CAAA;AACvD,IAAA,yBAAA,CAAA,aAAA,CAAA,GAAA,yCAAuD,CAAA;AACzD,CAAC,EALW,yBAAyB,KAAzB,yBAAyB,GAKpC,EAAA,CAAA,CAAA;;MCFY,6BAA6B,CAAA;AAGxC,IAAA,WAAA,CAA4B,UAAkB,EAAA;QAAlB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAQ;AAF9B,QAAA,IAAA,CAAA,IAAI,GAAW,yBAAyB,CAAC,uBAAuB,CAAC;KAE/B;AACnD;;MCJY,iBAAiB,CAAA;AAG5B,IAAA,WAAA,CAA4B,UAAkB,EAAA;QAAlB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAQ;AAF9B,QAAA,IAAA,CAAA,IAAI,GAAW,yBAAyB,CAAC,WAAW,CAAC;KAEnB;AACnD;;MCJY,iBAAiB,CAAA;AAG5B,IAAA,WAAA,CAA4B,UAAkB,EAAA;QAAlB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAQ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IAAI,iBAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;AAC9D,SAAA;KACF;8GAXU,oBAAoB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,KAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,EAAA,GAAA,EAAA,CAAA,aAAA,EAAA,KAAA,CAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,iCAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBALhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;AAET,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA,CAAA;4FAE8B,GAAG,EAAA,CAAA;sBAA/B,KAAK;uBAAC,aAAa,CAAA;gBAKb,uBAAuB,EAAA,CAAA;sBAD7B,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAA;;;ACdnC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngssm-store-visibility.mjs","sources":["../../../projects/ngssm-store/visibility/src/actions/ngssm-visibility-action-type.ts","../../../projects/ngssm-store/visibility/src/actions/toggle-element-visibility.action.ts","../../../projects/ngssm-store/visibility/src/actions/show-element.action.ts","../../../projects/ngssm-store/visibility/src/actions/hide-element.action.ts","../../../projects/ngssm-store/visibility/src/actions/define-elements-group.action.ts","../../../projects/ngssm-store/visibility/src/state/ngssm-visibility.state.ts","../../../projects/ngssm-store/visibility/src/reducers/visibility.reducer.ts","../../../projects/ngssm-store/visibility/src/provide-ngssm-visibility.ts","../../../projects/ngssm-store/visibility/src/components/toggle-element-visibility.directive.ts","../../../projects/ngssm-store/visibility/src/components/is-element-visible.pipe.ts","../../../projects/ngssm-store/visibility/src/components/show-element.directive.ts","../../../projects/ngssm-store/visibility/src/components/hide-element.directive.ts","../../../projects/ngssm-store/visibility/src/components/visibility-toggle-group/visibility-toggle-group.component.ts","../../../projects/ngssm-store/visibility/src/components/visibility-toggle-group/visibility-toggle-group.component.html","../../../projects/ngssm-store/visibility/ngssm-store-visibility.ts"],"sourcesContent":["export enum NgssmVisibilityActionType {\n defineElementsGroup = '[NgssmVisibilityActionType] defineElementsGroup',\n toggleElementVisibility = '[NgssmVisibilityActionType] toggleElementVisibility',\n hideElement = '[NgssmVisibilityActionType] hideElement',\n showElement = '[NgssmVisibilityActionType] showElement'\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmVisibilityActionType } from './ngssm-visibility-action-type';\n\nexport class ToggleElementVisibilityAction implements Action {\n public readonly type: string = NgssmVisibilityActionType.toggleElementVisibility;\n\n constructor(public readonly elementKey: string) {}\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmVisibilityActionType } from './ngssm-visibility-action-type';\n\nexport class ShowElementAction implements Action {\n public readonly type: string = NgssmVisibilityActionType.showElement;\n\n constructor(public readonly elementKey: string) {}\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmVisibilityActionType } from './ngssm-visibility-action-type';\n\nexport class HideElementAction implements Action {\n public readonly type: string = NgssmVisibilityActionType.hideElement;\n\n constructor(public readonly elementKey: string) {}\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmVisibilityActionType } from './ngssm-visibility-action-type';\n\nexport class DefineElementsGroupAction implements Action {\n public readonly type: string = NgssmVisibilityActionType.defineElementsGroup;\n\n constructor(public readonly elementKeys: string[]) {}\n}\n","import update, { Spec } from 'immutability-helper';\n\nimport { NgSsmFeatureState, State } from 'ngssm-store';\n\nexport const selectNgssmVisibilityState = (state: State): NgssmVisibilityState =>\n state[NgssmVisibilityStateSpecification.featureStateKey] as NgssmVisibilityState;\n\nexport const updateNgssmVisibilityState = (state: State, command: Spec<NgssmVisibilityState, never>): State =>\n update(state, {\n [NgssmVisibilityStateSpecification.featureStateKey]: command\n });\n\nexport interface NgssmVisibilityState {\n elements: { [key: string]: boolean };\n elementsGroups: string[][];\n}\n\n@NgSsmFeatureState({\n featureStateKey: NgssmVisibilityStateSpecification.featureStateKey,\n initialState: NgssmVisibilityStateSpecification.initialState\n})\nexport class NgssmVisibilityStateSpecification {\n public static readonly featureStateKey = 'ngssm-visibility-state';\n public static readonly initialState: NgssmVisibilityState = {\n elements: {},\n elementsGroups: []\n };\n}\n","import { Injectable } from '@angular/core';\n\nimport { Spec } from 'immutability-helper';\n\nimport { Reducer, State, Action } from 'ngssm-store';\n\nimport {\n DefineElementsGroupAction,\n HideElementAction,\n NgssmVisibilityActionType,\n ShowElementAction,\n ToggleElementVisibilityAction\n} from '../actions';\nimport { selectNgssmVisibilityState, updateNgssmVisibilityState } from '../state';\n\n@Injectable()\nexport class VisibilityReducer implements Reducer {\n public readonly processedActions: string[] = [\n NgssmVisibilityActionType.toggleElementVisibility,\n NgssmVisibilityActionType.showElement,\n NgssmVisibilityActionType.hideElement,\n NgssmVisibilityActionType.defineElementsGroup\n ];\n\n public updateState(state: State, action: Action): State {\n switch (action.type) {\n case NgssmVisibilityActionType.toggleElementVisibility: {\n const toggleVisibilityAction = action as ToggleElementVisibilityAction;\n if (selectNgssmVisibilityState(state).elements[toggleVisibilityAction.elementKey] === true) {\n return updateNgssmVisibilityState(state, {\n elements: {\n [toggleVisibilityAction.elementKey]: { $set: false }\n }\n });\n }\n\n return this.setElementVisible(state, toggleVisibilityAction.elementKey);\n }\n\n case NgssmVisibilityActionType.showElement: {\n const showAction = action as ShowElementAction;\n return this.setElementVisible(state, showAction.elementKey);\n }\n\n case NgssmVisibilityActionType.hideElement: {\n const hideAction = action as HideElementAction;\n return updateNgssmVisibilityState(state, {\n elements: {\n [hideAction.elementKey]: { $set: false }\n }\n });\n }\n\n case NgssmVisibilityActionType.defineElementsGroup: {\n const defineElementsGroupAction = action as DefineElementsGroupAction;\n const keys = [...defineElementsGroupAction.elementKeys];\n keys.sort();\n if (this.groupExists(keys, selectNgssmVisibilityState(state).elementsGroups)) {\n break;\n }\n\n return updateNgssmVisibilityState(state, {\n elementsGroups: { $push: [keys] }\n });\n }\n }\n\n return state;\n }\n\n private groupExists(keys: string[], groups: string[][]): boolean {\n const index = groups.findIndex((group) => {\n group.length === keys.length && group.findIndex((k, i) => k !== keys[i]) === -1;\n });\n return index !== -1;\n }\n\n private getElementsKeysGroupedWith(key: string, groups: string[][]): string[] {\n const keys = groups.filter((g) => g.includes(key)).flatMap((g) => g);\n const distinctKeys = new Set<string>(keys);\n distinctKeys.delete(key);\n return [...distinctKeys];\n }\n\n private setElementVisible(state: State, key: string): State {\n const elementsCommand: Spec<{ [key: string]: boolean }, never> = {\n [key]: { $set: true }\n };\n\n const associatedElements = this.getElementsKeysGroupedWith(key, selectNgssmVisibilityState(state).elementsGroups);\n associatedElements.forEach((el) => {\n elementsCommand[el] = { $set: false };\n });\n\n return updateNgssmVisibilityState(state, {\n elements: elementsCommand\n });\n }\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { provideReducers } from 'ngssm-store';\nimport { VisibilityReducer } from './reducers';\n\nexport const provideNgssmVisibility = (): EnvironmentProviders => {\n return makeEnvironmentProviders([provideReducers(VisibilityReducer)]);\n};\n","import { Directive, HostListener, Input } from '@angular/core';\n\nimport { Store } from 'ngssm-store';\n\nimport { ToggleElementVisibilityAction } from '../actions';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[toggleElementVisibility]',\n standalone: true\n})\nexport class ToggleElementVisibilityDirective {\n @Input('toggleElementVisibility') public key: string | undefined | null = '';\n\n constructor(private store: Store) {}\n\n @HostListener('click', ['$event'])\n public toggleElementvisibility(): void {\n const elementKey = this.key;\n if (elementKey) {\n this.store.dispatchAction(new ToggleElementVisibilityAction(elementKey));\n }\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { State } from 'ngssm-store';\nimport { selectNgssmVisibilityState } from '../state';\n\n@Pipe({\n name: 'isElementVisible',\n standalone: true\n})\nexport class IsElementVisiblePipe implements PipeTransform {\n public transform(value: State, ...args: string[]): boolean {\n return selectNgssmVisibilityState(value).elements[args[0]] === true;\n }\n}\n","import { Directive, HostListener, Input } from '@angular/core';\nimport { Store } from 'ngssm-store';\nimport { ShowElementAction } from '../actions';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[showElement]',\n standalone: true\n})\nexport class ShowElementDirective {\n @Input('showElement') public key: string | undefined | null = '';\n\n constructor(private store: Store) {}\n\n @HostListener('click', ['$event'])\n public toggleElementvisibility(): void {\n const elementKey = this.key;\n if (elementKey) {\n this.store.dispatchAction(new ShowElementAction(elementKey));\n }\n }\n}\n","import { Directive, HostListener, Input } from '@angular/core';\nimport { Store } from 'ngssm-store';\nimport { HideElementAction } from '../actions';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[hideElement]',\n standalone: true\n})\nexport class HideElementDirective {\n @Input('hideElement') public key: string | undefined | null = '';\n\n constructor(private store: Store) {}\n\n @HostListener('click', ['$event'])\n public toggleElementvisibility(): void {\n const elementKey = this.key;\n if (elementKey) {\n this.store.dispatchAction(new HideElementAction(elementKey));\n }\n }\n}\n","import { Component, ChangeDetectionStrategy, Input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\n\nimport { NgSsmComponent, Store } from 'ngssm-store';\n\nimport { ToggleElementVisibilityDirective } from '../toggle-element-visibility.directive';\nimport { IsElementVisiblePipe } from '../is-element-visible.pipe';\n\n@Component({\n selector: 'ngssm-visibility-toggle-group',\n standalone: true,\n imports: [CommonModule, MatButtonToggleModule, ToggleElementVisibilityDirective, IsElementVisiblePipe],\n templateUrl: './visibility-toggle-group.component.html',\n styleUrls: [],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class VisibilityToggleGroupComponent extends NgSsmComponent {\n @Input() public items: { label: string; key: string }[] = [];\n\n constructor(store: Store) {\n super(store);\n }\n}\n","<mat-button-toggle-group [multiple]=\"true\">\n <mat-button-toggle *ngFor=\"let item of items\" [toggleElementVisibility]=\"item.key\"\n [checked]=\"store.state() | isElementVisible:item.key\">\n {{item.label}}\n </mat-button-toggle>\n</mat-button-toggle-group>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;IAAY,0BAKX;AALD,CAAA,UAAY,yBAAyB,EAAA;AACnC,IAAA,yBAAA,CAAA,qBAAA,CAAA,GAAA,iDAAuE,CAAA;AACvE,IAAA,yBAAA,CAAA,yBAAA,CAAA,GAAA,qDAA+E,CAAA;AAC/E,IAAA,yBAAA,CAAA,aAAA,CAAA,GAAA,yCAAuD,CAAA;AACvD,IAAA,yBAAA,CAAA,aAAA,CAAA,GAAA,yCAAuD,CAAA;AACzD,CAAC,EALW,yBAAyB,KAAzB,yBAAyB,GAKpC,EAAA,CAAA,CAAA;;MCFY,6BAA6B,CAAA;AAGxC,IAAA,WAAA,CAA4B,UAAkB,EAAA;QAAlB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAQ;AAF9B,QAAA,IAAA,CAAA,IAAI,GAAW,yBAAyB,CAAC,uBAAuB,CAAC;KAE/B;AACnD;;MCJY,iBAAiB,CAAA;AAG5B,IAAA,WAAA,CAA4B,UAAkB,EAAA;QAAlB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAQ;AAF9B,QAAA,IAAA,CAAA,IAAI,GAAW,yBAAyB,CAAC,WAAW,CAAC;KAEnB;AACnD;;MCJY,iBAAiB,CAAA;AAG5B,IAAA,WAAA,CAA4B,UAAkB,EAAA;QAAlB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAQ;AAF9B,QAAA,IAAA,CAAA,IAAI,GAAW,yBAAyB,CAAC,WAAW,CAAC;KAEnB;AACnD;;MC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AM,EAAA,QAAA,EAAA,2RAAA,EAAA,CAAA;4FAG/B,KAAK,EAAA,CAAA;sBAApB,KAAK;;;AElBR;;AAEG;;;;"}
|
package/fesm2022/ngssm-store.mjs
CHANGED
|
@@ -51,10 +51,10 @@ class Logger {
|
|
|
51
51
|
payload
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
55
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
54
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: Logger, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
55
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: Logger, providedIn: 'root' }); }
|
|
56
56
|
}
|
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: Logger, decorators: [{
|
|
58
58
|
type: Injectable,
|
|
59
59
|
args: [{
|
|
60
60
|
providedIn: 'root'
|
|
@@ -90,10 +90,10 @@ class ConsoleAppender {
|
|
|
90
90
|
stop() {
|
|
91
91
|
this.stopEvent$.next(true);
|
|
92
92
|
}
|
|
93
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
94
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
93
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ConsoleAppender, deps: [{ token: Logger }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
94
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ConsoleAppender, providedIn: 'root' }); }
|
|
95
95
|
}
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: ConsoleAppender, decorators: [{
|
|
97
97
|
type: Injectable,
|
|
98
98
|
args: [{
|
|
99
99
|
providedIn: 'root'
|
|
@@ -202,10 +202,10 @@ class Store {
|
|
|
202
202
|
setTimeout(() => this.processNextAction());
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
206
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
205
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: Store, deps: [{ token: Logger }, { token: NGSSM_REDUCER, optional: true }, { token: NGSSM_EFFECT, optional: true }, { token: NGSSM_STATE_INITIALIZER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
206
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: Store, providedIn: 'root' }); }
|
|
207
207
|
}
|
|
208
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: Store, decorators: [{
|
|
209
209
|
type: Injectable,
|
|
210
210
|
args: [{
|
|
211
211
|
providedIn: 'root'
|
|
@@ -248,10 +248,10 @@ class NgSsmComponent {
|
|
|
248
248
|
dispatchActionType(actionType) {
|
|
249
249
|
this.store.dispatchActionType(actionType);
|
|
250
250
|
}
|
|
251
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
252
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.
|
|
251
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgSsmComponent, deps: [{ token: Store }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
252
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.2", type: NgSsmComponent, ngImport: i0 }); }
|
|
253
253
|
}
|
|
254
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
254
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.2", ngImport: i0, type: NgSsmComponent, decorators: [{
|
|
255
255
|
type: Directive,
|
|
256
256
|
args: [{}]
|
|
257
257
|
}], ctorParameters: function () { return [{ type: Store }]; } });
|
package/package.json
CHANGED
package/visibility/src/components/visibility-toggle-group/visibility-toggle-group.component.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NgSsmComponent, Store } from 'ngssm-store';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class VisibilityToggleGroupComponent extends NgSsmComponent {
|
|
4
|
+
items: {
|
|
5
|
+
label: string;
|
|
6
|
+
key: string;
|
|
7
|
+
}[];
|
|
8
|
+
constructor(store: Store);
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VisibilityToggleGroupComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<VisibilityToggleGroupComponent, "ngssm-visibility-toggle-group", never, { "items": { "alias": "items"; "required": false; }; }, {}, never, never, true, never>;
|
|
11
|
+
}
|