ngssm-data 19.2.2 → 19.3.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/fesm2022/ngssm-data.mjs
CHANGED
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, makeEnvironmentProviders, inject, Injectable, runInInjectionContext, Inject, Optional, provideAppInitializer, Pipe, Input, ChangeDetectionStrategy, Component, signal, Directive } from '@angular/core';
|
|
2
|
+
import { InjectionToken, makeEnvironmentProviders, inject, Injectable, runInInjectionContext, Inject, Optional, provideAppInitializer, Pipe, Input, ChangeDetectionStrategy, Component, signal, input, effect, Directive } from '@angular/core';
|
|
3
3
|
import * as i1 from 'ngssm-store';
|
|
4
|
-
import { Store, NgSsmFeatureState, provideReducers, provideEffects, NgSsmComponent, ACTION_DISPATCHER } from 'ngssm-store';
|
|
4
|
+
import { Store, NgSsmFeatureState, provideReducers, provideEffects, NgSsmComponent, createSignal, ACTION_DISPATCHER } from 'ngssm-store';
|
|
5
5
|
import { __decorate } from 'tslib';
|
|
6
6
|
import update from 'immutability-helper';
|
|
7
7
|
import { DateTime } from 'luxon';
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
14
|
-
import * as i3$1 from '@angular/material/button';
|
|
15
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
16
|
-
import * as i5 from '@angular/material/icon';
|
|
17
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
18
|
-
import { Subject, takeUntil } from 'rxjs';
|
|
8
|
+
import { CommonModule, NgClass } from '@angular/common';
|
|
9
|
+
import { MatTooltip } from '@angular/material/tooltip';
|
|
10
|
+
import { MatProgressSpinner } from '@angular/material/progress-spinner';
|
|
11
|
+
import { MatButton, MatIconButton } from '@angular/material/button';
|
|
12
|
+
import { MatIcon } from '@angular/material/icon';
|
|
19
13
|
import * as i2 from '@angular/forms';
|
|
20
14
|
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
21
15
|
import * as i4 from '@angular/material/select';
|
|
@@ -138,24 +132,28 @@ class NgssmSetDataSourceParameterValidityAction extends NgssmDataSourceValueActi
|
|
|
138
132
|
}
|
|
139
133
|
}
|
|
140
134
|
|
|
135
|
+
// Injection token for registering data sources
|
|
141
136
|
const NGSSM_DATA_SOURCE = new InjectionToken('NGSSM_DATA_SOURCE');
|
|
142
|
-
//
|
|
143
|
-
//
|
|
144
|
-
|
|
137
|
+
// Function to provide a data source as an environment provider
|
|
138
|
+
const provideNgssmDataSource = (key, // Unique key for the data source
|
|
139
|
+
loadingFunc, // Function to load data
|
|
140
|
+
options // Optional configuration options
|
|
141
|
+
) => {
|
|
145
142
|
return makeEnvironmentProviders([
|
|
146
143
|
{
|
|
147
144
|
provide: NGSSM_DATA_SOURCE,
|
|
148
145
|
useFactory: () => {
|
|
149
146
|
const dataSource = {
|
|
150
147
|
key,
|
|
151
|
-
dataLifetimeInSeconds,
|
|
152
|
-
dataLoadingFunc: loadingFunc
|
|
148
|
+
dataLifetimeInSeconds: options?.dataLifetimeInSeconds,
|
|
149
|
+
dataLoadingFunc: loadingFunc,
|
|
150
|
+
additionalPropertyLoadingFunc: options?.additionalPropertyLoadingFunc
|
|
153
151
|
};
|
|
154
|
-
if (initialParameter) {
|
|
155
|
-
dataSource.initialParameter = initialParameter;
|
|
152
|
+
if (options?.initialParameter) {
|
|
153
|
+
dataSource.initialParameter = options?.initialParameter;
|
|
156
154
|
}
|
|
157
|
-
if (initialParameterInvalid) {
|
|
158
|
-
dataSource.initialParameterInvalid = initialParameterInvalid;
|
|
155
|
+
if (options?.initialParameterInvalid) {
|
|
156
|
+
dataSource.initialParameterInvalid = options?.initialParameterInvalid;
|
|
159
157
|
}
|
|
160
158
|
return dataSource;
|
|
161
159
|
},
|
|
@@ -163,6 +161,7 @@ const provideNgssmDataSource = (key, loadingFunc, dataLifetimeInSeconds, initial
|
|
|
163
161
|
}
|
|
164
162
|
]);
|
|
165
163
|
};
|
|
164
|
+
// Function to dispatch an action to load a data source value
|
|
166
165
|
const ngssmLoadDataSourceValue = (key, forceReload = false) => {
|
|
167
166
|
return () => {
|
|
168
167
|
inject(Store).dispatchAction(new NgssmLoadDataSourceValueAction(key, { forceReload }));
|
|
@@ -266,10 +265,10 @@ class DataSourcesRegistrationReducer {
|
|
|
266
265
|
}
|
|
267
266
|
return state;
|
|
268
267
|
}
|
|
269
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
270
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
268
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DataSourcesRegistrationReducer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
269
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DataSourcesRegistrationReducer }); }
|
|
271
270
|
}
|
|
272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DataSourcesRegistrationReducer, decorators: [{
|
|
273
272
|
type: Injectable
|
|
274
273
|
}] });
|
|
275
274
|
|
|
@@ -486,10 +485,10 @@ class DataSourceValueReducer {
|
|
|
486
485
|
}
|
|
487
486
|
return state;
|
|
488
487
|
}
|
|
489
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
490
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
488
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DataSourceValueReducer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
489
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DataSourceValueReducer }); }
|
|
491
490
|
}
|
|
492
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
491
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DataSourceValueReducer, decorators: [{
|
|
493
492
|
type: Injectable
|
|
494
493
|
}] });
|
|
495
494
|
|
|
@@ -517,7 +516,7 @@ class DataLoadingEffect {
|
|
|
517
516
|
return;
|
|
518
517
|
}
|
|
519
518
|
runInInjectionContext(this.injector, () => {
|
|
520
|
-
dataSource.dataLoadingFunc(state, dataSourceValue.parameter).subscribe({
|
|
519
|
+
dataSource.dataLoadingFunc(state, key, dataSourceValue.parameter).subscribe({
|
|
521
520
|
next: (value) => actiondispatcher.dispatchAction(new NgssmSetDataSourceValueAction(key, NgssmDataSourceValueStatus.loaded, value)),
|
|
522
521
|
error: (error) => {
|
|
523
522
|
this.logger.error(`Unable to load data for '${key}'`, error);
|
|
@@ -535,7 +534,7 @@ class DataLoadingEffect {
|
|
|
535
534
|
return;
|
|
536
535
|
}
|
|
537
536
|
runInInjectionContext(this.injector, () => {
|
|
538
|
-
dataSource.
|
|
537
|
+
dataSource.additionalPropertyLoadingFunc?.(state, key, property).subscribe({
|
|
539
538
|
next: (value) => actiondispatcher.dispatchAction(new NgssmSetDataSourceAdditionalPropertyValueAction(key, property, NgssmDataSourceValueStatus.loaded, value)),
|
|
540
539
|
error: (error) => {
|
|
541
540
|
this.logger.error(`Unable to load data for '${key}' and property '${property}'`, error);
|
|
@@ -547,10 +546,10 @@ class DataLoadingEffect {
|
|
|
547
546
|
}
|
|
548
547
|
}
|
|
549
548
|
}
|
|
550
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
551
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
549
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DataLoadingEffect, deps: [{ token: i1.Logger }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
550
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DataLoadingEffect }); }
|
|
552
551
|
}
|
|
553
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
552
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: DataLoadingEffect, decorators: [{
|
|
554
553
|
type: Injectable
|
|
555
554
|
}], ctorParameters: () => [{ type: i1.Logger }, { type: i0.EnvironmentInjector }] });
|
|
556
555
|
|
|
@@ -558,10 +557,10 @@ class NgssmDataSourceCollection {
|
|
|
558
557
|
constructor(dataSources) {
|
|
559
558
|
this.dataSources = dataSources;
|
|
560
559
|
}
|
|
561
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
562
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
560
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: NgssmDataSourceCollection, deps: [{ token: NGSSM_DATA_SOURCE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
561
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: NgssmDataSourceCollection, providedIn: 'root' }); }
|
|
563
562
|
}
|
|
564
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
563
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: NgssmDataSourceCollection, decorators: [{
|
|
565
564
|
type: Injectable,
|
|
566
565
|
args: [{
|
|
567
566
|
providedIn: 'root'
|
|
@@ -595,10 +594,10 @@ class IsNgssmDataSourceValueStatusPipe {
|
|
|
595
594
|
const itemStatus = selectNgssmDataSourceValue(value, key).status;
|
|
596
595
|
return expectedStatuses.includes(itemStatus);
|
|
597
596
|
}
|
|
598
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
599
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.
|
|
597
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IsNgssmDataSourceValueStatusPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
598
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: IsNgssmDataSourceValueStatusPipe, isStandalone: true, name: "isNgssmDataSourceValueStatus" }); }
|
|
600
599
|
}
|
|
601
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
600
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IsNgssmDataSourceValueStatusPipe, decorators: [{
|
|
602
601
|
type: Pipe,
|
|
603
602
|
args: [{
|
|
604
603
|
name: 'isNgssmDataSourceValueStatus',
|
|
@@ -638,46 +637,36 @@ class NgssmAutoReloadComponent extends NgSsmComponent {
|
|
|
638
637
|
}
|
|
639
638
|
});
|
|
640
639
|
}
|
|
641
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
642
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
640
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: NgssmAutoReloadComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
641
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: NgssmAutoReloadComponent, isStandalone: true, selector: "ngssm-auto-reload", inputs: { autoReloadAction: "autoReloadAction" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>Select auto reload period</mat-label>\n <mat-select [formControl]=\"reloadTypeControl\">\n @for (option of reloadTypes; track option.value){\n <mat-option [value]=\"option.value\">\n {{option.label}}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
643
642
|
}
|
|
644
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
643
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: NgssmAutoReloadComponent, decorators: [{
|
|
645
644
|
type: Component,
|
|
646
645
|
args: [{ selector: 'ngssm-auto-reload', imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, MatSelectModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field>\n <mat-label>Select auto reload period</mat-label>\n <mat-select [formControl]=\"reloadTypeControl\">\n @for (option of reloadTypes; track option.value){\n <mat-option [value]=\"option.value\">\n {{option.label}}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>" }]
|
|
647
646
|
}], ctorParameters: () => [{ type: i1.Store }], propDecorators: { autoReloadAction: [{
|
|
648
647
|
type: Input
|
|
649
648
|
}] } });
|
|
650
649
|
|
|
651
|
-
class NgssmDataReloadButtonComponent
|
|
652
|
-
constructor(
|
|
653
|
-
|
|
654
|
-
this.
|
|
655
|
-
this._dataSourceKeys = [];
|
|
650
|
+
class NgssmDataReloadButtonComponent {
|
|
651
|
+
constructor() {
|
|
652
|
+
this.store = inject(Store);
|
|
653
|
+
this.dataSourceValues = createSignal((state) => selectNgssmDataState(state).dataSourceValues);
|
|
656
654
|
this.loadInProgress = signal(false);
|
|
657
655
|
this.buttonDisabled = signal(true);
|
|
658
656
|
this.tooltipMessage = signal('');
|
|
659
|
-
this.icon = signal('fa-solid fa-rotate-right');
|
|
660
657
|
this.color = signal('primary');
|
|
661
|
-
this.withAutoReload = signal(false);
|
|
662
658
|
this.reloadAction = () => this.reload();
|
|
663
|
-
this.
|
|
664
|
-
this.keepAdditionalProperties = false;
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
this.
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
set dataSourceKeys(value) {
|
|
673
|
-
this.toUnsubscribe$.next();
|
|
674
|
-
this._dataSourceKeys = value ?? [];
|
|
675
|
-
this.watch((s) => selectNgssmDataState(s).dataSourceValues)
|
|
676
|
-
.pipe(takeUntil(this.toUnsubscribe$))
|
|
677
|
-
.subscribe((values) => {
|
|
678
|
-
this.loadInProgress.set(this._dataSourceKeys.findIndex((v) => values[v]?.status === NgssmDataSourceValueStatus.loading) !== -1);
|
|
659
|
+
this.label = input(undefined);
|
|
660
|
+
this.keepAdditionalProperties = input(false);
|
|
661
|
+
this.buttonIcon = input('fa-solid fa-rotate-right');
|
|
662
|
+
this.autoReloadEnabled = input(false);
|
|
663
|
+
this.dataSourceKeys = input([]);
|
|
664
|
+
effect(() => {
|
|
665
|
+
const values = this.dataSourceValues();
|
|
666
|
+
const keys = this.dataSourceKeys();
|
|
667
|
+
this.loadInProgress.set(keys.findIndex((v) => values[v]?.status === NgssmDataSourceValueStatus.loading) !== -1);
|
|
679
668
|
let timestamp;
|
|
680
|
-
|
|
669
|
+
keys.forEach((key) => {
|
|
681
670
|
const keyTimestamp = values[key]?.lastLoadingDate;
|
|
682
671
|
if (keyTimestamp) {
|
|
683
672
|
if (!timestamp || timestamp > keyTimestamp) {
|
|
@@ -694,43 +683,30 @@ class NgssmDataReloadButtonComponent extends NgSsmComponent {
|
|
|
694
683
|
this.buttonDisabled.set(true);
|
|
695
684
|
return;
|
|
696
685
|
}
|
|
697
|
-
const someHasAnInvalidParameter =
|
|
686
|
+
const someHasAnInvalidParameter = keys.findIndex((key) => values[key]?.parameterIsValid === false) !== -1;
|
|
698
687
|
if (someHasAnInvalidParameter) {
|
|
699
688
|
this.buttonDisabled.set(true);
|
|
700
689
|
return;
|
|
701
690
|
}
|
|
702
|
-
this.buttonDisabled.set(
|
|
703
|
-
const someHasAnOutdatedValue =
|
|
691
|
+
this.buttonDisabled.set(keys.findIndex((v) => !!values[v]) === -1);
|
|
692
|
+
const someHasAnOutdatedValue = keys.findIndex((key) => values[key]?.valueOutdated === true) !== -1;
|
|
704
693
|
this.color.set(someHasAnOutdatedValue ? 'accent' : 'primary');
|
|
705
694
|
});
|
|
706
695
|
}
|
|
707
|
-
set label(value) {
|
|
708
|
-
this.buttonLabel.set(value);
|
|
709
|
-
}
|
|
710
696
|
reload() {
|
|
711
697
|
const isDisabled = this.buttonDisabled();
|
|
712
698
|
if (isDisabled) {
|
|
713
699
|
return;
|
|
714
700
|
}
|
|
715
|
-
this.
|
|
701
|
+
this.dataSourceKeys().forEach((key) => this.store.dispatchAction(new NgssmLoadDataSourceValueAction(key, { forceReload: true, keepAdditionalProperties: this.keepAdditionalProperties() })));
|
|
716
702
|
}
|
|
717
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
718
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
703
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: NgssmDataReloadButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
704
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.5", type: NgssmDataReloadButtonComponent, isStandalone: true, selector: "ngssm-data-reload-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, keepAdditionalProperties: { classPropertyName: "keepAdditionalProperties", publicName: "keepAdditionalProperties", isSignal: true, isRequired: false, transformFunction: null }, buttonIcon: { classPropertyName: "buttonIcon", publicName: "buttonIcon", isSignal: true, isRequired: false, transformFunction: null }, autoReloadEnabled: { classPropertyName: "autoReloadEnabled", publicName: "autoReloadEnabled", isSignal: true, isRequired: false, transformFunction: null }, dataSourceKeys: { classPropertyName: "dataSourceKeys", publicName: "dataSourceKeys", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"flex-row-center\">\n @if (label(); as buttonLabel) {\n <button\n mat-stroked-button\n [color]=\"color()\"\n (click)=\"reload()\"\n [matTooltip]=\"tooltipMessage()\"\n [disabled]=\"buttonDisabled() === true\"\n id=\"reloadButton\">\n <div class=\"flex-row-center\">\n @if (loadInProgress()) {\n <mat-spinner [diameter]=\"24\" id=\"loadingSpinner\"></mat-spinner>\n } @else {\n <mat-icon [ngClass]=\"buttonIcon()\"></mat-icon>\n }\n\n <span style=\"width:0.5rem\"></span>\n\n {{ buttonLabel }}\n </div>\n </button>\n } @else {\n <button\n mat-icon-button\n [color]=\"color()\"\n (click)=\"reload()\"\n [matTooltip]=\"tooltipMessage()\"\n [disabled]=\"buttonDisabled() === true\"\n id=\"reloadButton\">\n @if (loadInProgress()) {\n <mat-spinner [diameter]=\"24\" id=\"loadingSpinner\"></mat-spinner>\n } @else {\n <mat-icon [ngClass]=\"buttonIcon()\"></mat-icon>\n }\n </button>\n }\n\n @if (autoReloadEnabled()) {\n <ngssm-auto-reload class=\"with-margin-left-8\" [autoReloadAction]=\"reloadAction\"></ngssm-auto-reload>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: NgssmAutoReloadComponent, selector: "ngssm-auto-reload", inputs: ["autoReloadAction"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
719
705
|
}
|
|
720
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: NgssmDataReloadButtonComponent, decorators: [{
|
|
721
707
|
type: Component,
|
|
722
|
-
args: [{ selector: 'ngssm-data-reload-button', imports: [
|
|
723
|
-
}], ctorParameters: () => [
|
|
724
|
-
type: Input
|
|
725
|
-
}], buttonIcon: [{
|
|
726
|
-
type: Input
|
|
727
|
-
}], autoReloadEnabled: [{
|
|
728
|
-
type: Input
|
|
729
|
-
}], dataSourceKeys: [{
|
|
730
|
-
type: Input
|
|
731
|
-
}], label: [{
|
|
732
|
-
type: Input
|
|
733
|
-
}] } });
|
|
708
|
+
args: [{ selector: 'ngssm-data-reload-button', imports: [NgClass, MatButton, MatIconButton, MatTooltip, MatIcon, MatProgressSpinner, NgssmAutoReloadComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex-row-center\">\n @if (label(); as buttonLabel) {\n <button\n mat-stroked-button\n [color]=\"color()\"\n (click)=\"reload()\"\n [matTooltip]=\"tooltipMessage()\"\n [disabled]=\"buttonDisabled() === true\"\n id=\"reloadButton\">\n <div class=\"flex-row-center\">\n @if (loadInProgress()) {\n <mat-spinner [diameter]=\"24\" id=\"loadingSpinner\"></mat-spinner>\n } @else {\n <mat-icon [ngClass]=\"buttonIcon()\"></mat-icon>\n }\n\n <span style=\"width:0.5rem\"></span>\n\n {{ buttonLabel }}\n </div>\n </button>\n } @else {\n <button\n mat-icon-button\n [color]=\"color()\"\n (click)=\"reload()\"\n [matTooltip]=\"tooltipMessage()\"\n [disabled]=\"buttonDisabled() === true\"\n id=\"reloadButton\">\n @if (loadInProgress()) {\n <mat-spinner [diameter]=\"24\" id=\"loadingSpinner\"></mat-spinner>\n } @else {\n <mat-icon [ngClass]=\"buttonIcon()\"></mat-icon>\n }\n </button>\n }\n\n @if (autoReloadEnabled()) {\n <ngssm-auto-reload class=\"with-margin-left-8\" [autoReloadAction]=\"reloadAction\"></ngssm-auto-reload>\n }\n</div>\n" }]
|
|
709
|
+
}], ctorParameters: () => [] });
|
|
734
710
|
|
|
735
711
|
class NgssmScopedDataSourceDirective {
|
|
736
712
|
constructor() {
|
|
@@ -749,10 +725,10 @@ class NgssmScopedDataSourceDirective {
|
|
|
749
725
|
this.actionDispatcher.dispatchAction(new NgssmUnregisterDataSourceAction(key));
|
|
750
726
|
}
|
|
751
727
|
}
|
|
752
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
753
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
728
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: NgssmScopedDataSourceDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
729
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.5", type: NgssmScopedDataSourceDirective, isStandalone: true, selector: "[ngssmScopedDataSource]", inputs: { ngssmScopedDataSource: "ngssmScopedDataSource" }, ngImport: i0 }); }
|
|
754
730
|
}
|
|
755
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
731
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: NgssmScopedDataSourceDirective, decorators: [{
|
|
756
732
|
type: Directive,
|
|
757
733
|
args: [{
|
|
758
734
|
selector: '[ngssmScopedDataSource]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngssm-data.mjs","sources":["../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-data-action-type.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-data-source-value.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-load-data-source-value.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-set-data-source-value.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-register-data-sources.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-clear-data-source-value.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-set-data-source-parameter.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-load-data-source-additional-property-value.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-set-data-source-additional-property-value.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-register-data-source.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-unregister-data-source.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-update-data-source-parameter.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-set-data-source-parameter-validity.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/model/ngssm-data-source.ts","../../../projects/ngssm-data/src/lib/ngssm-data/model/ngssm-data-source-value.ts","../../../projects/ngssm-data/src/lib/ngssm-data/state/ngssm-data.state.ts","../../../projects/ngssm-data/src/lib/ngssm-data/state/selectors.ts","../../../projects/ngssm-data/src/lib/ngssm-data/reducers/data-sources-registration.reducer.ts","../../../projects/ngssm-data/src/lib/ngssm-data/reducers/data-source-value.reducer.ts","../../../projects/ngssm-data/src/lib/ngssm-data/effects/data-loading.effect.ts","../../../projects/ngssm-data/src/lib/ngssm-data/provide-ngssm-data.ts","../../../projects/ngssm-data/src/lib/ngssm-data/components/is-ngssm-data-source-value-status.pipe.ts","../../../projects/ngssm-data/src/lib/ngssm-data/components/ngssm-auto-reload/ngssm-auto-reload.component.ts","../../../projects/ngssm-data/src/lib/ngssm-data/components/ngssm-auto-reload/ngssm-auto-reload.component.html","../../../projects/ngssm-data/src/lib/ngssm-data/components/ngssm-data-reload-button/ngssm-data-reload-button.component.ts","../../../projects/ngssm-data/src/lib/ngssm-data/components/ngssm-data-reload-button/ngssm-data-reload-button.component.html","../../../projects/ngssm-data/src/lib/ngssm-data/components/ngssm-scoped-data-source.directive.ts","../../../projects/ngssm-data/src/public-api.ts","../../../projects/ngssm-data/src/ngssm-data.ts"],"sourcesContent":["export enum NgssmDataActionType {\n // Used by the library to initialize all the data sources provided by the application\n registerDataSources = '[NgssmDataActionType] registerDataSources',\n\n // Could be used by the application to register or unregister a data source.\n // This can be used, for example, to limit the lifetime of a data source to the lifetime of a component\n registerDataSource = '[NgssmDataActionType] registerDataSource',\n unregisterDataSource = '[NgssmDataActionType] unregisterDataSource',\n\n // Used to call the loading method to get the value for the data source\n loadDataSourceValue = '[NgssmDataActionType] loadDataSourceValue',\n\n // Update the parameter used by the loading method, if one is required\n setDataSourceParameter = '[NgssmDataActionType] setDataSourceParameter',\n\n // Used to partially update the parameter. Usefull when creating a search component with multiple search criteria.\n updateDataSourceParameter = '[NgssmDataActionType] updateDataSourceParameter',\n\n // Update only the validity of the parameter. Usefull in case of a partial update of the parameter.\n setDataSourceParameterValidity = '[NgssmDataActionType] setDataSourceParameterValidity',\n\n // Clear the stored value associated to a data source\n clearDataSourceValue = '[NgssmDataActionType] clearDataSourceValue',\n\n // Store the value for a given data source\n setDataSourceValue = '[NgssmDataActionType] setDataSourceValue',\n\n // Call the loading method to get the value for an additional property of the data source\n loadDataSourceAdditionalPropertyValue = '[NgssmDataActionType] loadDataSourceAdditionalPropertyValue',\n\n // Store the value for an additional property of the data source\n setDataSourceAdditionalPropertyValue = '[NgssmDataActionType] setDataSourceAdditionalPropertyValue'\n}\n","import { Action } from 'ngssm-store';\n\nexport class NgssmDataSourceValueAction implements Action {\n constructor(\n public readonly type: string,\n public readonly key: string\n ) {}\n}\n","import { NgssmDataSourceValueAction } from './ngssm-data-source-value.action';\nimport { NgssmDataActionType } from './ngssm-data-action-type';\nimport { NgssmLoadDataSourceOptions } from '../model';\n\nexport class NgssmLoadDataSourceValueAction<TParameter = unknown> extends NgssmDataSourceValueAction {\n constructor(\n key: string,\n public readonly options?: NgssmLoadDataSourceOptions<TParameter>\n ) {\n super(NgssmDataActionType.loadDataSourceValue, key);\n }\n}\n","import { NgssmDataSourceValueAction } from './ngssm-data-source-value.action';\nimport { NgssmDataActionType } from './ngssm-data-action-type';\nimport { NgssmDataSourceValueStatus } from '../model';\n\nexport class NgssmSetDataSourceValueAction<TData = unknown> extends NgssmDataSourceValueAction {\n constructor(\n key: string,\n public readonly status: NgssmDataSourceValueStatus,\n public readonly value?: TData\n ) {\n super(NgssmDataActionType.setDataSourceValue, key);\n }\n}\n","import { Action } from 'ngssm-store';\n\nimport { NgssmDataActionType } from './ngssm-data-action-type';\nimport { NgssmDataSource } from '../model';\n\nexport class NgssmRegisterDataSourcesAction implements Action {\n public readonly type: string = NgssmDataActionType.registerDataSources;\n\n constructor(public readonly dataSources: NgssmDataSource[]) {}\n}\n","import { NgssmDataSourceValueAction } from './ngssm-data-source-value.action';\nimport { NgssmDataActionType } from './ngssm-data-action-type';\n\nexport class NgssmClearDataSourceValueAction extends NgssmDataSourceValueAction {\n constructor(\n key: string,\n public readonly clearParameter = false\n ) {\n super(NgssmDataActionType.clearDataSourceValue, key);\n }\n}\n","import { NgssmDataActionType } from './ngssm-data-action-type';\nimport { NgssmDataSourceValueAction } from './ngssm-data-source-value.action';\n\nexport class NgssmSetDataSourceParameterAction<TParameter = unknown> extends NgssmDataSourceValueAction {\n constructor(\n key: string,\n public readonly parameter?: TParameter,\n public readonly parameterIsValid?: boolean\n ) {\n super(NgssmDataActionType.setDataSourceParameter, key);\n }\n}\n","import { NgssmDataSourceValueAction } from './ngssm-data-source-value.action';\nimport { NgssmDataActionType } from './ngssm-data-action-type';\n\nexport class NgssmLoadDataSourceAdditionalPropertyValueAction extends NgssmDataSourceValueAction {\n constructor(\n key: string,\n public readonly property: string,\n public readonly forceReload?: boolean\n ) {\n super(NgssmDataActionType.loadDataSourceAdditionalPropertyValue, key);\n }\n}\n","import { NgssmDataSourceValueAction } from './ngssm-data-source-value.action';\nimport { NgssmDataSourceValueStatus } from '../model';\nimport { NgssmDataActionType } from './ngssm-data-action-type';\n\nexport class NgssmSetDataSourceAdditionalPropertyValueAction<TProperty = unknown> extends NgssmDataSourceValueAction {\n constructor(\n key: string,\n public readonly property: string,\n public readonly status: NgssmDataSourceValueStatus,\n public readonly value?: TProperty\n ) {\n super(NgssmDataActionType.setDataSourceAdditionalPropertyValue, key);\n }\n}\n","import { Action } from 'ngssm-store';\n\nimport { NgssmDataActionType } from './ngssm-data-action-type';\nimport { NgssmDataSource } from '../model';\n\nexport class NgssmRegisterDataSourceAction implements Action {\n public readonly type: string = NgssmDataActionType.registerDataSource;\n\n constructor(public readonly dataSource: NgssmDataSource) {}\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmDataActionType } from './ngssm-data-action-type';\n\nexport class NgssmUnregisterDataSourceAction implements Action {\n public readonly type: string = NgssmDataActionType.unregisterDataSource;\n\n constructor(public readonly dataSourceKey: string) {}\n}\n","import { NgssmDataActionType } from './ngssm-data-action-type';\nimport { NgssmDataSourceValueAction } from './ngssm-data-source-value.action';\n\nexport class NgssmUpdateDataSourceParameterAction<TParameter = unknown> extends NgssmDataSourceValueAction {\n constructor(\n key: string,\n public readonly parameter: Partial<TParameter>\n ) {\n super(NgssmDataActionType.updateDataSourceParameter, key);\n }\n}\n","import { NgssmDataSourceValueAction } from './ngssm-data-source-value.action';\nimport { NgssmDataActionType } from './ngssm-data-action-type';\n\nexport class NgssmSetDataSourceParameterValidityAction extends NgssmDataSourceValueAction {\n constructor(\n key: string,\n public readonly isValid: boolean\n ) {\n super(NgssmDataActionType.setDataSourceParameterValidity, key);\n }\n}\n","import { EnvironmentProviders, InjectionToken, inject, makeEnvironmentProviders } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { State, Store } from 'ngssm-store';\nimport { NgssmLoadDataSourceValueAction } from '../actions';\n\nexport type NgssmDataLoading<TData = unknown, TParameter = unknown> = (state: State, parameter?: TParameter, additionalProperty?: string) => Observable<TData>;\n\nexport interface NgssmDataSource<TData = unknown, TParameter = unknown> {\n key: string;\n dataLifetimeInSeconds?: number;\n dataLoadingFunc: NgssmDataLoading<TData, TParameter>;\n initialParameter?: TParameter;\n initialParameterInvalid?: boolean;\n}\n\nexport const NGSSM_DATA_SOURCE = new InjectionToken<NgssmDataSource>('NGSSM_DATA_SOURCE');\n\n// Why not creating an app intializer that dispatch a NgssmRegisterDataSourceAction action\n// instead of registering the data source ?\nexport const provideNgssmDataSource = <TData = unknown, TParameter = unknown>(\n key: string,\n loadingFunc: NgssmDataLoading<TData, TParameter>,\n dataLifetimeInSeconds?: number,\n initialParameter?: TParameter,\n initialParameterInvalid?: boolean\n): EnvironmentProviders => {\n return makeEnvironmentProviders([\n {\n provide: NGSSM_DATA_SOURCE,\n useFactory: () => {\n const dataSource: NgssmDataSource<TData, TParameter> = {\n key,\n dataLifetimeInSeconds,\n dataLoadingFunc: loadingFunc\n };\n\n if (initialParameter) {\n dataSource.initialParameter = initialParameter;\n }\n\n if (initialParameterInvalid) {\n dataSource.initialParameterInvalid = initialParameterInvalid;\n }\n\n return dataSource;\n },\n multi: true\n }\n ]);\n};\n\nexport const ngssmLoadDataSourceValue = (key: string, forceReload = false): (() => boolean) => {\n return () => {\n inject(Store).dispatchAction(new NgssmLoadDataSourceValueAction(key, { forceReload }));\n return true;\n };\n};\n","import { DateTime } from 'luxon';\n\nexport enum NgssmDataSourceValueStatus {\n none = 'none',\n notRegistered = 'notRegistered',\n loading = 'loading',\n loaded = 'loaded',\n error = 'error'\n}\n\nexport interface NgssmDataSourceAdditionalPropertyValue<TProperty = unknown> {\n status: NgssmDataSourceValueStatus;\n value?: TProperty;\n lastLoadingDate?: DateTime;\n}\n\nexport interface NgssmDataSourceValue<TData = unknown, TParameter = unknown> {\n status: NgssmDataSourceValueStatus;\n value?: TData;\n parameter?: TParameter;\n lastLoadingDate?: DateTime;\n dataLifetimeInSeconds?: number;\n additionalProperties: Record<string, NgssmDataSourceAdditionalPropertyValue>;\n parameterIsValid?: boolean;\n\n // Parameter has been updated but not value\n valueOutdated?: boolean;\n}\n\nexport type NgssmDataSourceValueAutoReloadType = 'Off' | '1min' | '5min' | '15min';\nexport const getNgssmDataSourceValueAutoReloadTypes = (): { label: string; value: NgssmDataSourceValueAutoReloadType }[] => [\n { label: 'Off', value: 'Off' },\n { label: 'Every minute', value: '1min' },\n { label: 'Every 5 minutes', value: '5min' },\n { label: 'Every 15 minutes', value: '15min' }\n];\n","import update, { Spec } from 'immutability-helper';\n\nimport { NgSsmFeatureState, State } from 'ngssm-store';\nimport { NgssmDataSource, NgssmDataSourceValue } from '../model';\n\nexport const selectNgssmDataState = (state: State): NgssmDataState => state[NgssmDataStateSpecification.featureStateKey] as NgssmDataState;\n\nexport const updateNgssmDataState = (state: State, command: Spec<NgssmDataState, never>): State =>\n update(state, {\n [NgssmDataStateSpecification.featureStateKey]: command\n });\n\nexport interface NgssmDataState {\n dataSourceValues: Record<string, NgssmDataSourceValue>;\n dataSources: Record<string, NgssmDataSource>;\n}\n\n@NgSsmFeatureState({\n featureStateKey: NgssmDataStateSpecification.featureStateKey,\n initialState: NgssmDataStateSpecification.initialState\n})\nexport class NgssmDataStateSpecification {\n public static readonly featureStateKey = 'ngssm-data-state';\n public static readonly initialState: NgssmDataState = {\n dataSourceValues: {},\n dataSources: {}\n };\n}\n","import { State } from 'ngssm-store';\nimport { NgssmDataSourceAdditionalPropertyValue, NgssmDataSourceValue, NgssmDataSourceValueStatus } from '../model';\nimport { selectNgssmDataState } from './ngssm-data.state';\n\nexport const selectNgssmDataSourceValue = <TDataType = unknown, TParameter = unknown>(\n state: State,\n key: string\n): NgssmDataSourceValue<TDataType, TParameter> => {\n return (selectNgssmDataState(state).dataSourceValues[key] ?? {\n status: NgssmDataSourceValueStatus.notRegistered\n }) as NgssmDataSourceValue<TDataType, TParameter>;\n};\n\nexport const selectNgssmDataSourceAdditionalPropertyValue = <TProperty = unknown>(\n state: State,\n key: string,\n property: string\n): NgssmDataSourceAdditionalPropertyValue<TProperty> => {\n return (selectNgssmDataState(state).dataSourceValues[key]?.additionalProperties[property] ?? {\n status: NgssmDataSourceValueStatus.notRegistered\n }) as NgssmDataSourceAdditionalPropertyValue<TProperty>;\n};\n","import { Injectable } from '@angular/core';\n\nimport { Reducer, State, Action } from 'ngssm-store';\n\nimport {\n NgssmDataActionType,\n NgssmRegisterDataSourceAction,\n NgssmRegisterDataSourcesAction,\n NgssmUnregisterDataSourceAction\n} from '../actions';\nimport { NgssmDataSource, NgssmDataSourceValue, NgssmDataSourceValueStatus } from '../model';\nimport { selectNgssmDataState, updateNgssmDataState } from '../state';\n\n@Injectable()\nexport class DataSourcesRegistrationReducer implements Reducer {\n public readonly processedActions: string[] = [\n NgssmDataActionType.registerDataSources,\n NgssmDataActionType.registerDataSource,\n NgssmDataActionType.unregisterDataSource\n ];\n\n public updateState(state: State, action: Action): State {\n switch (action.type) {\n case NgssmDataActionType.registerDataSources: {\n const registerDataSourcesAction = action as NgssmRegisterDataSourcesAction;\n const dataSourceValues: Record<string, NgssmDataSourceValue> = {};\n const dataSources: Record<string, NgssmDataSource> = {};\n registerDataSourcesAction.dataSources.forEach((dataSource) => {\n if (selectNgssmDataState(state).dataSources[dataSource.key]) {\n return;\n }\n\n dataSourceValues[dataSource.key] = {\n status: NgssmDataSourceValueStatus.none,\n additionalProperties: {}\n };\n\n if (dataSource.dataLifetimeInSeconds) {\n dataSourceValues[dataSource.key].dataLifetimeInSeconds = dataSource.dataLifetimeInSeconds;\n }\n\n if (dataSource.initialParameter) {\n dataSourceValues[dataSource.key].parameter = dataSource.initialParameter;\n }\n\n if (dataSource.initialParameterInvalid) {\n dataSourceValues[dataSource.key].parameterIsValid = false;\n }\n\n dataSources[dataSource.key] = dataSource;\n });\n\n return updateNgssmDataState(state, {\n dataSourceValues: { $merge: dataSourceValues },\n dataSources: { $merge: dataSources }\n });\n }\n\n case NgssmDataActionType.registerDataSource: {\n const registerDataSourceAction = action as NgssmRegisterDataSourceAction;\n return this.updateState(state, new NgssmRegisterDataSourcesAction([registerDataSourceAction.dataSource]));\n }\n\n case NgssmDataActionType.unregisterDataSource: {\n const unregisterDataSource = action as NgssmUnregisterDataSourceAction;\n return updateNgssmDataState(state, {\n dataSourceValues: { $unset: [unregisterDataSource.dataSourceKey] },\n dataSources: { $unset: [unregisterDataSource.dataSourceKey] }\n });\n }\n }\n\n return state;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DateTime } from 'luxon';\nimport update from 'immutability-helper';\n\nimport { Reducer, State, Action } from 'ngssm-store';\n\nimport {\n NgssmClearDataSourceValueAction,\n NgssmDataActionType,\n NgssmLoadDataSourceAdditionalPropertyValueAction,\n NgssmLoadDataSourceValueAction,\n NgssmSetDataSourceAdditionalPropertyValueAction,\n NgssmSetDataSourceParameterAction,\n NgssmSetDataSourceParameterValidityAction,\n NgssmSetDataSourceValueAction,\n NgssmUpdateDataSourceParameterAction\n} from '../actions';\nimport { selectNgssmDataSourceValue, selectNgssmDataState, updateNgssmDataState } from '../state';\nimport { NgssmDataSourceValueStatus } from '../model';\n\n@Injectable()\nexport class DataSourceValueReducer implements Reducer {\n public readonly processedActions: string[] = [\n NgssmDataActionType.loadDataSourceValue,\n NgssmDataActionType.setDataSourceValue,\n NgssmDataActionType.clearDataSourceValue,\n NgssmDataActionType.setDataSourceParameter,\n NgssmDataActionType.loadDataSourceAdditionalPropertyValue,\n NgssmDataActionType.setDataSourceAdditionalPropertyValue,\n NgssmDataActionType.updateDataSourceParameter,\n NgssmDataActionType.setDataSourceParameterValidity\n ];\n\n public updateState(state: State, action: Action): State {\n switch (action.type) {\n case NgssmDataActionType.loadDataSourceValue: {\n const loadDataSourceValue = action as NgssmLoadDataSourceValueAction;\n const dataSourceValue = selectNgssmDataState(state).dataSourceValues[loadDataSourceValue.key];\n if (!dataSourceValue) {\n break;\n }\n\n let shouldReload = false;\n\n let currentState = state;\n if (loadDataSourceValue.options?.parameter) {\n shouldReload = true;\n currentState = updateNgssmDataState(state, {\n dataSourceValues: {\n [loadDataSourceValue.key]: {\n parameter: { $set: loadDataSourceValue.options?.parameter.value }\n }\n }\n });\n }\n\n if (dataSourceValue.status === NgssmDataSourceValueStatus.loaded) {\n if (\n loadDataSourceValue.options?.forceReload === true ||\n !dataSourceValue.dataLifetimeInSeconds ||\n !dataSourceValue.lastLoadingDate\n ) {\n shouldReload = true;\n } else {\n const dataLifetime = DateTime.now().diff(dataSourceValue.lastLoadingDate, 'second');\n if ((dataLifetime.toObject().seconds ?? 0) > dataSourceValue.dataLifetimeInSeconds) {\n shouldReload = true;\n }\n }\n } else {\n shouldReload = true;\n }\n\n if (dataSourceValue.parameterIsValid === false) {\n shouldReload = false;\n }\n\n if (shouldReload) {\n if (loadDataSourceValue.options?.keepAdditionalProperties !== true) {\n currentState = updateNgssmDataState(currentState, {\n dataSourceValues: {\n [loadDataSourceValue.key]: {\n additionalProperties: { $set: {} }\n }\n }\n });\n }\n\n if (loadDataSourceValue.options?.resetValue === true) {\n currentState = updateNgssmDataState(currentState, {\n dataSourceValues: {\n [loadDataSourceValue.key]: {\n value: { $set: undefined }\n }\n }\n });\n }\n\n return updateNgssmDataState(currentState, {\n dataSourceValues: {\n [loadDataSourceValue.key]: {\n status: { $set: NgssmDataSourceValueStatus.loading },\n valueOutdated: { $set: false }\n }\n }\n });\n }\n\n break;\n }\n\n case NgssmDataActionType.setDataSourceValue: {\n const ngssmSetDataSourceValueAction = action as NgssmSetDataSourceValueAction;\n const dataSourceValue = selectNgssmDataState(state).dataSourceValues[ngssmSetDataSourceValueAction.key];\n if (!dataSourceValue) {\n break;\n }\n\n return updateNgssmDataState(state, {\n dataSourceValues: {\n [ngssmSetDataSourceValueAction.key]: {\n status: { $set: ngssmSetDataSourceValueAction.status },\n value: { $set: ngssmSetDataSourceValueAction.value },\n lastLoadingDate: { $set: DateTime.now() }\n }\n }\n });\n }\n\n case NgssmDataActionType.clearDataSourceValue: {\n const ngssmClearDataSourceValueAction = action as NgssmClearDataSourceValueAction;\n let currentState = state;\n if (ngssmClearDataSourceValueAction.clearParameter) {\n currentState = updateNgssmDataState(state, {\n dataSourceValues: {\n [ngssmClearDataSourceValueAction.key]: {\n parameter: { $set: undefined },\n parameterIsValid: { $set: undefined }\n }\n }\n });\n }\n\n return updateNgssmDataState(currentState, {\n dataSourceValues: {\n [ngssmClearDataSourceValueAction.key]: {\n status: { $set: NgssmDataSourceValueStatus.none },\n value: { $set: undefined },\n lastLoadingDate: { $set: undefined },\n additionalProperties: { $set: {} }\n }\n }\n });\n }\n\n case NgssmDataActionType.setDataSourceParameter: {\n const ngssmSetDataSourceParameterAction = action as NgssmSetDataSourceParameterAction;\n return updateNgssmDataState(state, {\n dataSourceValues: {\n [ngssmSetDataSourceParameterAction.key]: {\n parameter: { $set: ngssmSetDataSourceParameterAction.parameter },\n parameterIsValid: { $set: ngssmSetDataSourceParameterAction.parameterIsValid },\n valueOutdated: { $set: true }\n }\n }\n });\n }\n\n case NgssmDataActionType.updateDataSourceParameter: {\n const ngssmUpdateDataSourceParameterAction = action as NgssmUpdateDataSourceParameterAction;\n const newParameter = update<object, never>(\n selectNgssmDataSourceValue(state, ngssmUpdateDataSourceParameterAction.key)?.parameter as object,\n {\n $merge: ngssmUpdateDataSourceParameterAction.parameter\n }\n );\n return updateNgssmDataState(state, {\n dataSourceValues: {\n [ngssmUpdateDataSourceParameterAction.key]: {\n parameter: { $set: newParameter },\n valueOutdated: { $set: true }\n }\n }\n });\n }\n\n case NgssmDataActionType.setDataSourceParameterValidity: {\n const ngssmSetDataSourceParameterValidityAction = action as NgssmSetDataSourceParameterValidityAction;\n return updateNgssmDataState(state, {\n dataSourceValues: {\n [ngssmSetDataSourceParameterValidityAction.key]: {\n parameterIsValid: { $set: ngssmSetDataSourceParameterValidityAction.isValid }\n }\n }\n });\n }\n\n case NgssmDataActionType.loadDataSourceAdditionalPropertyValue: {\n const ngssmLoadDataSourceAdditionalPropertyValueAction = action as NgssmLoadDataSourceAdditionalPropertyValueAction;\n const dataSourcePropertyValue =\n selectNgssmDataState(state).dataSourceValues[ngssmLoadDataSourceAdditionalPropertyValueAction.key]?.additionalProperties[\n ngssmLoadDataSourceAdditionalPropertyValueAction.property\n ];\n\n if (\n dataSourcePropertyValue?.status === NgssmDataSourceValueStatus.loaded &&\n ngssmLoadDataSourceAdditionalPropertyValueAction.forceReload !== true\n ) {\n break;\n }\n\n if (!dataSourcePropertyValue) {\n return updateNgssmDataState(state, {\n dataSourceValues: {\n [ngssmLoadDataSourceAdditionalPropertyValueAction.key]: {\n additionalProperties: {\n [ngssmLoadDataSourceAdditionalPropertyValueAction.property]: {\n $set: {\n status: NgssmDataSourceValueStatus.loading\n }\n }\n }\n }\n }\n });\n }\n\n return updateNgssmDataState(state, {\n dataSourceValues: {\n [ngssmLoadDataSourceAdditionalPropertyValueAction.key]: {\n additionalProperties: {\n [ngssmLoadDataSourceAdditionalPropertyValueAction.property]: {\n status: { $set: NgssmDataSourceValueStatus.loading }\n }\n }\n }\n }\n });\n }\n\n case NgssmDataActionType.setDataSourceAdditionalPropertyValue: {\n const ngssmSetDataSourceAdditionalPropertyValueAction = action as NgssmSetDataSourceAdditionalPropertyValueAction;\n return updateNgssmDataState(state, {\n dataSourceValues: {\n [ngssmSetDataSourceAdditionalPropertyValueAction.key]: {\n additionalProperties: {\n [ngssmSetDataSourceAdditionalPropertyValueAction.property]: {\n $set: {\n status: ngssmSetDataSourceAdditionalPropertyValueAction.status,\n value: ngssmSetDataSourceAdditionalPropertyValueAction.value,\n lastLoadingDate: DateTime.now()\n }\n }\n }\n }\n }\n });\n }\n }\n\n return state;\n }\n}\n","import { EnvironmentInjector, Injectable, runInInjectionContext } from '@angular/core';\n\nimport { Effect, State, Action, Logger, ActionDispatcher } from 'ngssm-store';\n\nimport {\n NgssmDataActionType,\n NgssmDataSourceValueAction,\n NgssmLoadDataSourceAdditionalPropertyValueAction,\n NgssmSetDataSourceAdditionalPropertyValueAction,\n NgssmSetDataSourceValueAction\n} from '../actions';\nimport { selectNgssmDataState } from '../state';\nimport { NgssmDataSourceValueStatus } from '../model';\n\n@Injectable()\nexport class DataLoadingEffect implements Effect {\n public readonly processedActions: string[] = [\n NgssmDataActionType.loadDataSourceValue,\n NgssmDataActionType.loadDataSourceAdditionalPropertyValue\n ];\n\n constructor(\n private logger: Logger,\n private injector: EnvironmentInjector\n ) {}\n\n public processAction(actiondispatcher: ActionDispatcher, state: State, action: Action): void {\n const key = (action as NgssmDataSourceValueAction).key;\n const dataSource = selectNgssmDataState(state).dataSources[key];\n if (!dataSource) {\n this.logger.error(`No data source setup for key '${key}'`);\n return;\n }\n\n const dataSourceValue = selectNgssmDataState(state).dataSourceValues[key];\n\n switch (action.type) {\n case NgssmDataActionType.loadDataSourceValue: {\n if (dataSourceValue?.status !== NgssmDataSourceValueStatus.loading) {\n this.logger.information(\n `Data source value for '${key}' is not in '${NgssmDataSourceValueStatus.loading}' status: '${dataSourceValue?.status}'`\n );\n return;\n }\n\n runInInjectionContext(this.injector, () => {\n dataSource.dataLoadingFunc(state, dataSourceValue.parameter).subscribe({\n next: (value) => actiondispatcher.dispatchAction(new NgssmSetDataSourceValueAction(key, NgssmDataSourceValueStatus.loaded, value)),\n error: (error) => {\n this.logger.error(`Unable to load data for '${key}'`, error);\n actiondispatcher.dispatchAction(new NgssmSetDataSourceValueAction(key, NgssmDataSourceValueStatus.error));\n }\n });\n });\n\n break;\n }\n\n case NgssmDataActionType.loadDataSourceAdditionalPropertyValue: {\n const ngssmLoadDataSourceAdditionalPropertyValueAction = action as NgssmLoadDataSourceAdditionalPropertyValueAction;\n const property = ngssmLoadDataSourceAdditionalPropertyValueAction.property;\n if (dataSourceValue.additionalProperties[property]?.status !== NgssmDataSourceValueStatus.loading) {\n this.logger.information(\n `Data source additional property value for '${key}' and property '${property}' is not in '${NgssmDataSourceValueStatus.loading}' status: '${dataSourceValue?.status}'`\n );\n return;\n }\n\n runInInjectionContext(this.injector, () => {\n dataSource.dataLoadingFunc(state, dataSourceValue.parameter, property).subscribe({\n next: (value) =>\n actiondispatcher.dispatchAction(\n new NgssmSetDataSourceAdditionalPropertyValueAction(key, property, NgssmDataSourceValueStatus.loaded, value)\n ),\n error: (error) => {\n this.logger.error(`Unable to load data for '${key}' and property '${property}'`, error);\n actiondispatcher.dispatchAction(new NgssmSetDataSourceAdditionalPropertyValueAction(key, property, NgssmDataSourceValueStatus.error));\n }\n });\n });\n\n break;\n }\n }\n }\n}\n","import { EnvironmentProviders, Inject, Injectable, Optional, makeEnvironmentProviders, inject, provideAppInitializer } from '@angular/core';\n\nimport { Store, provideEffects, provideReducers } from 'ngssm-store';\n\nimport { NGSSM_DATA_SOURCE, NgssmDataSource } from './model';\nimport { DataSourceValueReducer, DataSourcesRegistrationReducer } from './reducers';\nimport { DataLoadingEffect } from './effects';\nimport { NgssmRegisterDataSourcesAction } from './actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgssmDataSourceCollection {\n constructor(@Inject(NGSSM_DATA_SOURCE) @Optional() public dataSources: NgssmDataSource[]) {}\n}\n\nconst initDataSourceValues = () => {\n const store = inject(Store);\n const dataSourceCollection = inject(NgssmDataSourceCollection);\n const dataSources = dataSourceCollection.dataSources ?? [];\n if (dataSources.length > 0) {\n store.dispatchAction(new NgssmRegisterDataSourcesAction(dataSources));\n }\n};\n\nexport const provideNgssmData = (): EnvironmentProviders => {\n return makeEnvironmentProviders([\n provideAppInitializer(initDataSourceValues),\n provideReducers(DataSourcesRegistrationReducer, DataSourceValueReducer),\n provideEffects(DataLoadingEffect)\n ]);\n};\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { State } from 'ngssm-store';\n\nimport { NgssmDataSourceValueStatus } from '../model';\nimport { selectNgssmDataSourceValue } from '../state';\n\n@Pipe({\n name: 'isNgssmDataSourceValueStatus',\n standalone: true\n})\nexport class IsNgssmDataSourceValueStatusPipe implements PipeTransform {\n public transform(value: State, ...args: string[]): boolean {\n const key = args[0];\n const expectedStatuses = args.slice(1).map((a) => a as NgssmDataSourceValueStatus);\n const itemStatus = selectNgssmDataSourceValue(value, key).status;\n return expectedStatuses.includes(itemStatus);\n }\n}\n","import { Component, ChangeDetectionStrategy, Input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatFormFieldModule } from '@angular/material/form-field';\n\nimport { NgSsmComponent, Store } from 'ngssm-store';\n\nimport { getNgssmDataSourceValueAutoReloadTypes, NgssmDataSourceValueAutoReloadType } from '../../model';\n\n@Component({\n selector: 'ngssm-auto-reload',\n imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, MatSelectModule],\n templateUrl: './ngssm-auto-reload.component.html',\n styleUrls: [],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NgssmAutoReloadComponent extends NgSsmComponent {\n private timerId: number | undefined;\n\n public readonly reloadTypes = getNgssmDataSourceValueAutoReloadTypes();\n public readonly reloadTypeControl = new FormControl<NgssmDataSourceValueAutoReloadType>('Off');\n\n @Input() autoReloadAction: () => void = () => {\n // nothing by default\n };\n\n constructor(store: Store) {\n super(store);\n\n this.reloadTypeControl.valueChanges.subscribe((v) => {\n if (v === 'Off' && this.timerId) {\n clearInterval(this.timerId);\n this.timerId = undefined;\n return;\n }\n\n let period = 60000;\n switch (v) {\n case '5min':\n period = 5 * period;\n break;\n\n case '15min':\n period = 15 * period;\n break;\n }\n\n this.timerId = setInterval(this.autoReloadAction, period) as unknown as number;\n });\n\n this.unsubscribeAll$.subscribe(() => {\n if (this.timerId) {\n clearInterval(this.timerId);\n this.timerId = undefined;\n }\n });\n }\n}\n","<mat-form-field>\n <mat-label>Select auto reload period</mat-label>\n <mat-select [formControl]=\"reloadTypeControl\">\n @for (option of reloadTypes; track option.value){\n <mat-option [value]=\"option.value\">\n {{option.label}}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>","import { Component, ChangeDetectionStrategy, Input, signal } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { Subject, takeUntil } from 'rxjs';\n\nimport { DateTime } from 'luxon';\n\nimport { NgSsmComponent, Store } from 'ngssm-store';\n\nimport { selectNgssmDataState } from '../../state';\nimport { NgssmDataSourceValueStatus } from '../../model';\nimport { NgssmLoadDataSourceValueAction } from '../../actions';\nimport { NgssmAutoReloadComponent } from '../ngssm-auto-reload/ngssm-auto-reload.component';\n\n@Component({\n selector: 'ngssm-data-reload-button',\n imports: [CommonModule, MatButtonModule, MatTooltipModule, MatIconModule, MatProgressSpinnerModule, NgssmAutoReloadComponent],\n templateUrl: './ngssm-data-reload-button.component.html',\n styleUrls: [],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NgssmDataReloadButtonComponent extends NgSsmComponent {\n private readonly toUnsubscribe$ = new Subject<void>();\n private _dataSourceKeys: string[] = [];\n\n public readonly loadInProgress = signal<boolean>(false);\n public readonly buttonDisabled = signal<boolean>(true);\n public readonly tooltipMessage = signal<string>('');\n public readonly icon = signal<string>('fa-solid fa-rotate-right');\n public readonly color = signal<string>('primary');\n public readonly withAutoReload = signal<boolean>(false);\n public readonly reloadAction = () => this.reload();\n public readonly buttonLabel = signal<string | undefined>(undefined);\n\n @Input() public keepAdditionalProperties = false;\n\n constructor(store: Store) {\n super(store);\n }\n\n @Input() set buttonIcon(value: string) {\n this.icon.set(value);\n }\n\n @Input() set autoReloadEnabled(value: boolean) {\n this.withAutoReload.set(value);\n }\n\n @Input() public set dataSourceKeys(value: string[]) {\n this.toUnsubscribe$.next();\n this._dataSourceKeys = value ?? [];\n this.watch((s) => selectNgssmDataState(s).dataSourceValues)\n .pipe(takeUntil(this.toUnsubscribe$))\n .subscribe((values) => {\n this.loadInProgress.set(this._dataSourceKeys.findIndex((v) => values[v]?.status === NgssmDataSourceValueStatus.loading) !== -1);\n let timestamp: DateTime | undefined;\n this._dataSourceKeys.forEach((key) => {\n const keyTimestamp = values[key]?.lastLoadingDate;\n if (keyTimestamp) {\n if (!timestamp || timestamp > keyTimestamp) {\n timestamp = keyTimestamp;\n }\n }\n });\n\n let tooltiMessage = 'Reload data.';\n if (timestamp) {\n tooltiMessage = [tooltiMessage, `Loaded at ${timestamp.toHTTP()}`].join('\\n');\n }\n this.tooltipMessage.set(tooltiMessage);\n\n if (this.loadInProgress()) {\n this.buttonDisabled.set(true);\n return;\n }\n\n const someHasAnInvalidParameter = this._dataSourceKeys.findIndex((key) => values[key]?.parameterIsValid === false) !== -1;\n if (someHasAnInvalidParameter) {\n this.buttonDisabled.set(true);\n return;\n }\n\n this.buttonDisabled.set(this._dataSourceKeys.findIndex((v) => !!values[v]) === -1);\n\n const someHasAnOutdatedValue = this._dataSourceKeys.findIndex((key) => values[key]?.valueOutdated === true) !== -1;\n this.color.set(someHasAnOutdatedValue ? 'accent' : 'primary');\n });\n }\n\n @Input() public set label(value: string | undefined) {\n this.buttonLabel.set(value);\n }\n\n public reload(): void {\n const isDisabled = this.buttonDisabled();\n if (isDisabled) {\n return;\n }\n\n this._dataSourceKeys.forEach((key) =>\n this.dispatchAction(\n new NgssmLoadDataSourceValueAction(key, { forceReload: true, keepAdditionalProperties: this.keepAdditionalProperties })\n )\n );\n }\n}\n","<div class=\"flex-row-center\">\n @if (buttonLabel()) {\n <button\n mat-stroked-button\n [color]=\"color()\"\n (click)=\"reload()\"\n [matTooltip]=\"tooltipMessage()\"\n [disabled]=\"buttonDisabled() === true\"\n id=\"reloadButton\">\n <div class=\"flex-row-center\">\n @if (loadInProgress()) {\n <mat-spinner [diameter]=\"24\" id=\"loadingSpinner\"></mat-spinner>\n } @else {\n <mat-icon [ngClass]=\"icon()\"></mat-icon>\n }\n\n <span style=\"width:0.5rem\"></span>\n\n {{ buttonLabel() }}\n </div>\n </button>\n } @else {\n <button\n mat-icon-button\n [color]=\"color()\"\n (click)=\"reload()\"\n [matTooltip]=\"tooltipMessage()\"\n [disabled]=\"buttonDisabled() === true\"\n id=\"reloadButton\">\n @if (loadInProgress()) {\n <mat-spinner [diameter]=\"24\" id=\"loadingSpinner\"></mat-spinner>\n } @else {\n <mat-icon [ngClass]=\"icon()\"></mat-icon>\n }\n </button>\n }\n\n @if (withAutoReload()) {\n <ngssm-auto-reload class=\"with-margin-left-8\" [autoReloadAction]=\"reloadAction\"></ngssm-auto-reload>\n }\n</div>\n","import { Directive, inject, Input, OnDestroy } from '@angular/core';\n\nimport { ACTION_DISPATCHER, ActionDispatcher } from 'ngssm-store';\n\nimport { NgssmDataSource } from '../model';\nimport { NgssmRegisterDataSourceAction, NgssmUnregisterDataSourceAction } from '../actions';\n\n@Directive({\n selector: '[ngssmScopedDataSource]',\n standalone: true\n})\nexport class NgssmScopedDataSourceDirective implements OnDestroy {\n private readonly actionDispatcher: ActionDispatcher = inject(ACTION_DISPATCHER);\n private _dataSource: NgssmDataSource | undefined;\n\n @Input() set ngssmScopedDataSource(value: NgssmDataSource) {\n if (this._dataSource) {\n throw new Error('Data source is already set.');\n }\n this._dataSource = value;\n this.actionDispatcher.dispatchAction(new NgssmRegisterDataSourceAction(this._dataSource));\n }\n\n public ngOnDestroy(): void {\n const key = this._dataSource?.key;\n if (key) {\n this.actionDispatcher.dispatchAction(new NgssmUnregisterDataSourceAction(key));\n }\n }\n}\n","/*\n * Public API Surface of ngssm-data\n */\n\nexport * from './lib/ngssm-data/public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i3","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IAAY;AAAZ,C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8BAKc,qBAAqB,EAAA,CAAA;sBAAjC;;;ACfH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngssm-data.mjs","sources":["../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-data-action-type.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-data-source-value.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-load-data-source-value.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-set-data-source-value.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-register-data-sources.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-clear-data-source-value.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-set-data-source-parameter.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-load-data-source-additional-property-value.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-set-data-source-additional-property-value.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-register-data-source.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-unregister-data-source.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-update-data-source-parameter.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/actions/ngssm-set-data-source-parameter-validity.action.ts","../../../projects/ngssm-data/src/lib/ngssm-data/model/ngssm-data-source.ts","../../../projects/ngssm-data/src/lib/ngssm-data/model/ngssm-data-source-value.ts","../../../projects/ngssm-data/src/lib/ngssm-data/state/ngssm-data.state.ts","../../../projects/ngssm-data/src/lib/ngssm-data/state/selectors.ts","../../../projects/ngssm-data/src/lib/ngssm-data/reducers/data-sources-registration.reducer.ts","../../../projects/ngssm-data/src/lib/ngssm-data/reducers/data-source-value.reducer.ts","../../../projects/ngssm-data/src/lib/ngssm-data/effects/data-loading.effect.ts","../../../projects/ngssm-data/src/lib/ngssm-data/provide-ngssm-data.ts","../../../projects/ngssm-data/src/lib/ngssm-data/components/is-ngssm-data-source-value-status.pipe.ts","../../../projects/ngssm-data/src/lib/ngssm-data/components/ngssm-auto-reload/ngssm-auto-reload.component.ts","../../../projects/ngssm-data/src/lib/ngssm-data/components/ngssm-auto-reload/ngssm-auto-reload.component.html","../../../projects/ngssm-data/src/lib/ngssm-data/components/ngssm-data-reload-button/ngssm-data-reload-button.component.ts","../../../projects/ngssm-data/src/lib/ngssm-data/components/ngssm-data-reload-button/ngssm-data-reload-button.component.html","../../../projects/ngssm-data/src/lib/ngssm-data/components/ngssm-scoped-data-source.directive.ts","../../../projects/ngssm-data/src/public-api.ts","../../../projects/ngssm-data/src/ngssm-data.ts"],"sourcesContent":["export enum NgssmDataActionType {\n // Used by the library to initialize all the data sources provided by the application\n registerDataSources = '[NgssmDataActionType] registerDataSources',\n\n // Could be used by the application to register or unregister a data source.\n // This can be used, for example, to limit the lifetime of a data source to the lifetime of a component\n registerDataSource = '[NgssmDataActionType] registerDataSource',\n unregisterDataSource = '[NgssmDataActionType] unregisterDataSource',\n\n // Used to call the loading method to get the value for the data source\n loadDataSourceValue = '[NgssmDataActionType] loadDataSourceValue',\n\n // Update the parameter used by the loading method, if one is required\n setDataSourceParameter = '[NgssmDataActionType] setDataSourceParameter',\n\n // Used to partially update the parameter. Usefull when creating a search component with multiple search criteria.\n updateDataSourceParameter = '[NgssmDataActionType] updateDataSourceParameter',\n\n // Update only the validity of the parameter. Usefull in case of a partial update of the parameter.\n setDataSourceParameterValidity = '[NgssmDataActionType] setDataSourceParameterValidity',\n\n // Clear the stored value associated to a data source\n clearDataSourceValue = '[NgssmDataActionType] clearDataSourceValue',\n\n // Store the value for a given data source\n setDataSourceValue = '[NgssmDataActionType] setDataSourceValue',\n\n // Call the loading method to get the value for an additional property of the data source\n loadDataSourceAdditionalPropertyValue = '[NgssmDataActionType] loadDataSourceAdditionalPropertyValue',\n\n // Store the value for an additional property of the data source\n setDataSourceAdditionalPropertyValue = '[NgssmDataActionType] setDataSourceAdditionalPropertyValue'\n}\n","import { Action } from 'ngssm-store';\n\nexport class NgssmDataSourceValueAction implements Action {\n constructor(\n public readonly type: string,\n public readonly key: string\n ) {}\n}\n","import { NgssmDataSourceValueAction } from './ngssm-data-source-value.action';\nimport { NgssmDataActionType } from './ngssm-data-action-type';\nimport { NgssmLoadDataSourceOptions } from '../model';\n\nexport class NgssmLoadDataSourceValueAction<TParameter = unknown> extends NgssmDataSourceValueAction {\n constructor(\n key: string,\n public readonly options?: NgssmLoadDataSourceOptions<TParameter>\n ) {\n super(NgssmDataActionType.loadDataSourceValue, key);\n }\n}\n","import { NgssmDataSourceValueAction } from './ngssm-data-source-value.action';\nimport { NgssmDataActionType } from './ngssm-data-action-type';\nimport { NgssmDataSourceValueStatus } from '../model';\n\nexport class NgssmSetDataSourceValueAction<TData = unknown> extends NgssmDataSourceValueAction {\n constructor(\n key: string,\n public readonly status: NgssmDataSourceValueStatus,\n public readonly value?: TData\n ) {\n super(NgssmDataActionType.setDataSourceValue, key);\n }\n}\n","import { Action } from 'ngssm-store';\n\nimport { NgssmDataActionType } from './ngssm-data-action-type';\nimport { NgssmDataSource } from '../model';\n\nexport class NgssmRegisterDataSourcesAction implements Action {\n public readonly type: string = NgssmDataActionType.registerDataSources;\n\n constructor(public readonly dataSources: NgssmDataSource[]) {}\n}\n","import { NgssmDataSourceValueAction } from './ngssm-data-source-value.action';\nimport { NgssmDataActionType } from './ngssm-data-action-type';\n\nexport class NgssmClearDataSourceValueAction extends NgssmDataSourceValueAction {\n constructor(\n key: string,\n public readonly clearParameter = false\n ) {\n super(NgssmDataActionType.clearDataSourceValue, key);\n }\n}\n","import { NgssmDataActionType } from './ngssm-data-action-type';\nimport { NgssmDataSourceValueAction } from './ngssm-data-source-value.action';\n\nexport class NgssmSetDataSourceParameterAction<TParameter = unknown> extends NgssmDataSourceValueAction {\n constructor(\n key: string,\n public readonly parameter?: TParameter,\n public readonly parameterIsValid?: boolean\n ) {\n super(NgssmDataActionType.setDataSourceParameter, key);\n }\n}\n","import { NgssmDataSourceValueAction } from './ngssm-data-source-value.action';\nimport { NgssmDataActionType } from './ngssm-data-action-type';\n\nexport class NgssmLoadDataSourceAdditionalPropertyValueAction extends NgssmDataSourceValueAction {\n constructor(\n key: string,\n public readonly property: string,\n public readonly forceReload?: boolean\n ) {\n super(NgssmDataActionType.loadDataSourceAdditionalPropertyValue, key);\n }\n}\n","import { NgssmDataSourceValueAction } from './ngssm-data-source-value.action';\nimport { NgssmDataSourceValueStatus } from '../model';\nimport { NgssmDataActionType } from './ngssm-data-action-type';\n\nexport class NgssmSetDataSourceAdditionalPropertyValueAction<TProperty = unknown> extends NgssmDataSourceValueAction {\n constructor(\n key: string,\n public readonly property: string,\n public readonly status: NgssmDataSourceValueStatus,\n public readonly value?: TProperty\n ) {\n super(NgssmDataActionType.setDataSourceAdditionalPropertyValue, key);\n }\n}\n","import { Action } from 'ngssm-store';\n\nimport { NgssmDataActionType } from './ngssm-data-action-type';\nimport { NgssmDataSource } from '../model';\n\nexport class NgssmRegisterDataSourceAction implements Action {\n public readonly type: string = NgssmDataActionType.registerDataSource;\n\n constructor(public readonly dataSource: NgssmDataSource) {}\n}\n","import { Action } from 'ngssm-store';\nimport { NgssmDataActionType } from './ngssm-data-action-type';\n\nexport class NgssmUnregisterDataSourceAction implements Action {\n public readonly type: string = NgssmDataActionType.unregisterDataSource;\n\n constructor(public readonly dataSourceKey: string) {}\n}\n","import { NgssmDataActionType } from './ngssm-data-action-type';\nimport { NgssmDataSourceValueAction } from './ngssm-data-source-value.action';\n\nexport class NgssmUpdateDataSourceParameterAction<TParameter = unknown> extends NgssmDataSourceValueAction {\n constructor(\n key: string,\n public readonly parameter: Partial<TParameter>\n ) {\n super(NgssmDataActionType.updateDataSourceParameter, key);\n }\n}\n","import { NgssmDataSourceValueAction } from './ngssm-data-source-value.action';\nimport { NgssmDataActionType } from './ngssm-data-action-type';\n\nexport class NgssmSetDataSourceParameterValidityAction extends NgssmDataSourceValueAction {\n constructor(\n key: string,\n public readonly isValid: boolean\n ) {\n super(NgssmDataActionType.setDataSourceParameterValidity, key);\n }\n}\n","import { EnvironmentProviders, InjectionToken, inject, makeEnvironmentProviders } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { State, Store } from 'ngssm-store';\nimport { NgssmLoadDataSourceValueAction } from '../actions';\n\n// Type definition for a function that loads data\nexport type NgssmDataLoading<TData = unknown, TParameter = unknown> = (\n state: State,\n dataSourceKey: string,\n parameter?: TParameter\n) => Observable<TData>;\n\n// Type definition for a function that loads additional properties\nexport type NgssmAdditionalPropertyLoading<TData = unknown> = (\n state: State,\n dataSourceKey: string,\n additionalProperty: string\n) => Observable<TData>;\n\n// Interface defining the structure of a data source\nexport interface NgssmDataSource<TData = unknown, TParameter = unknown, TAdditionProperty = unknown> {\n key: string; // Unique identifier for the data source\n dataLifetimeInSeconds?: number; // Optional lifetime for cached data\n dataLoadingFunc: NgssmDataLoading<TData, TParameter>; // Function to load data\n additionalPropertyLoadingFunc?: NgssmAdditionalPropertyLoading<TAdditionProperty>; // Optional function to load additional properties\n initialParameter?: TParameter; // Optional initial parameter for the data source\n initialParameterInvalid?: boolean; // Flag indicating if the initial parameter is invalid\n}\n\n// Injection token for registering data sources\nexport const NGSSM_DATA_SOURCE = new InjectionToken<NgssmDataSource>('NGSSM_DATA_SOURCE');\n\n// Optional parameters when registering a data source\nexport interface NgssmDataSourceProvideOptions<TParameter = unknown, TAdditionProperty = unknown> {\n dataLifetimeInSeconds?: number; // Optional data lifetime\n initialParameter?: TParameter; // Optional initial parameter\n initialParameterInvalid?: boolean; // Optional flag for invalid initial parameter\n additionalPropertyLoadingFunc?: NgssmAdditionalPropertyLoading<TAdditionProperty>; // Optional function to load additional properties\n}\n\n// Function to provide a data source as an environment provider\nexport const provideNgssmDataSource = <TData = unknown, TParameter = unknown, TAdditionProperty = unknown>(\n key: string, // Unique key for the data source\n loadingFunc: NgssmDataLoading<TData, TParameter>, // Function to load data\n options?: NgssmDataSourceProvideOptions<TParameter, TAdditionProperty> // Optional configuration options\n): EnvironmentProviders => {\n return makeEnvironmentProviders([\n {\n provide: NGSSM_DATA_SOURCE,\n useFactory: () => {\n const dataSource: NgssmDataSource<TData, TParameter> = {\n key,\n dataLifetimeInSeconds: options?.dataLifetimeInSeconds,\n dataLoadingFunc: loadingFunc,\n additionalPropertyLoadingFunc: options?.additionalPropertyLoadingFunc\n };\n\n if (options?.initialParameter) {\n dataSource.initialParameter = options?.initialParameter;\n }\n\n if (options?.initialParameterInvalid) {\n dataSource.initialParameterInvalid = options?.initialParameterInvalid;\n }\n\n return dataSource;\n },\n multi: true\n }\n ]);\n};\n\n// Function to dispatch an action to load a data source value\nexport const ngssmLoadDataSourceValue = (key: string, forceReload = false): (() => boolean) => {\n return () => {\n inject(Store).dispatchAction(new NgssmLoadDataSourceValueAction(key, { forceReload }));\n return true;\n };\n};\n","import { DateTime } from 'luxon';\n\nexport enum NgssmDataSourceValueStatus {\n none = 'none',\n notRegistered = 'notRegistered',\n loading = 'loading',\n loaded = 'loaded',\n error = 'error'\n}\n\nexport interface NgssmDataSourceAdditionalPropertyValue<TProperty = unknown> {\n status: NgssmDataSourceValueStatus;\n value?: TProperty;\n lastLoadingDate?: DateTime;\n}\n\nexport interface NgssmDataSourceValue<TData = unknown, TParameter = unknown> {\n status: NgssmDataSourceValueStatus;\n value?: TData;\n parameter?: TParameter;\n lastLoadingDate?: DateTime;\n dataLifetimeInSeconds?: number;\n additionalProperties: Record<string, NgssmDataSourceAdditionalPropertyValue>;\n parameterIsValid?: boolean;\n\n // Parameter has been updated but not value\n valueOutdated?: boolean;\n}\n\nexport type NgssmDataSourceValueAutoReloadType = 'Off' | '1min' | '5min' | '15min';\nexport const getNgssmDataSourceValueAutoReloadTypes = (): { label: string; value: NgssmDataSourceValueAutoReloadType }[] => [\n { label: 'Off', value: 'Off' },\n { label: 'Every minute', value: '1min' },\n { label: 'Every 5 minutes', value: '5min' },\n { label: 'Every 15 minutes', value: '15min' }\n];\n","import update, { Spec } from 'immutability-helper';\n\nimport { NgSsmFeatureState, State } from 'ngssm-store';\nimport { NgssmDataSource, NgssmDataSourceValue } from '../model';\n\nexport const selectNgssmDataState = (state: State): NgssmDataState => state[NgssmDataStateSpecification.featureStateKey] as NgssmDataState;\n\nexport const updateNgssmDataState = (state: State, command: Spec<NgssmDataState, never>): State =>\n update(state, {\n [NgssmDataStateSpecification.featureStateKey]: command\n });\n\nexport interface NgssmDataState {\n dataSourceValues: Record<string, NgssmDataSourceValue>;\n dataSources: Record<string, NgssmDataSource>;\n}\n\n@NgSsmFeatureState({\n featureStateKey: NgssmDataStateSpecification.featureStateKey,\n initialState: NgssmDataStateSpecification.initialState\n})\nexport class NgssmDataStateSpecification {\n public static readonly featureStateKey = 'ngssm-data-state';\n public static readonly initialState: NgssmDataState = {\n dataSourceValues: {},\n dataSources: {}\n };\n}\n","import { State } from 'ngssm-store';\nimport { NgssmDataSourceAdditionalPropertyValue, NgssmDataSourceValue, NgssmDataSourceValueStatus } from '../model';\nimport { selectNgssmDataState } from './ngssm-data.state';\n\nexport const selectNgssmDataSourceValue = <TDataType = unknown, TParameter = unknown>(\n state: State,\n key: string\n): NgssmDataSourceValue<TDataType, TParameter> => {\n return (selectNgssmDataState(state).dataSourceValues[key] ?? {\n status: NgssmDataSourceValueStatus.notRegistered\n }) as NgssmDataSourceValue<TDataType, TParameter>;\n};\n\nexport const selectNgssmDataSourceAdditionalPropertyValue = <TProperty = unknown>(\n state: State,\n key: string,\n property: string\n): NgssmDataSourceAdditionalPropertyValue<TProperty> => {\n return (selectNgssmDataState(state).dataSourceValues[key]?.additionalProperties[property] ?? {\n status: NgssmDataSourceValueStatus.notRegistered\n }) as NgssmDataSourceAdditionalPropertyValue<TProperty>;\n};\n","import { Injectable } from '@angular/core';\n\nimport { Reducer, State, Action } from 'ngssm-store';\n\nimport {\n NgssmDataActionType,\n NgssmRegisterDataSourceAction,\n NgssmRegisterDataSourcesAction,\n NgssmUnregisterDataSourceAction\n} from '../actions';\nimport { NgssmDataSource, NgssmDataSourceValue, NgssmDataSourceValueStatus } from '../model';\nimport { selectNgssmDataState, updateNgssmDataState } from '../state';\n\n@Injectable()\nexport class DataSourcesRegistrationReducer implements Reducer {\n public readonly processedActions: string[] = [\n NgssmDataActionType.registerDataSources,\n NgssmDataActionType.registerDataSource,\n NgssmDataActionType.unregisterDataSource\n ];\n\n public updateState(state: State, action: Action): State {\n switch (action.type) {\n case NgssmDataActionType.registerDataSources: {\n const registerDataSourcesAction = action as NgssmRegisterDataSourcesAction;\n const dataSourceValues: Record<string, NgssmDataSourceValue> = {};\n const dataSources: Record<string, NgssmDataSource> = {};\n registerDataSourcesAction.dataSources.forEach((dataSource) => {\n if (selectNgssmDataState(state).dataSources[dataSource.key]) {\n return;\n }\n\n dataSourceValues[dataSource.key] = {\n status: NgssmDataSourceValueStatus.none,\n additionalProperties: {}\n };\n\n if (dataSource.dataLifetimeInSeconds) {\n dataSourceValues[dataSource.key].dataLifetimeInSeconds = dataSource.dataLifetimeInSeconds;\n }\n\n if (dataSource.initialParameter) {\n dataSourceValues[dataSource.key].parameter = dataSource.initialParameter;\n }\n\n if (dataSource.initialParameterInvalid) {\n dataSourceValues[dataSource.key].parameterIsValid = false;\n }\n\n dataSources[dataSource.key] = dataSource;\n });\n\n return updateNgssmDataState(state, {\n dataSourceValues: { $merge: dataSourceValues },\n dataSources: { $merge: dataSources }\n });\n }\n\n case NgssmDataActionType.registerDataSource: {\n const registerDataSourceAction = action as NgssmRegisterDataSourceAction;\n return this.updateState(state, new NgssmRegisterDataSourcesAction([registerDataSourceAction.dataSource]));\n }\n\n case NgssmDataActionType.unregisterDataSource: {\n const unregisterDataSource = action as NgssmUnregisterDataSourceAction;\n return updateNgssmDataState(state, {\n dataSourceValues: { $unset: [unregisterDataSource.dataSourceKey] },\n dataSources: { $unset: [unregisterDataSource.dataSourceKey] }\n });\n }\n }\n\n return state;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DateTime } from 'luxon';\nimport update from 'immutability-helper';\n\nimport { Reducer, State, Action } from 'ngssm-store';\n\nimport {\n NgssmClearDataSourceValueAction,\n NgssmDataActionType,\n NgssmLoadDataSourceAdditionalPropertyValueAction,\n NgssmLoadDataSourceValueAction,\n NgssmSetDataSourceAdditionalPropertyValueAction,\n NgssmSetDataSourceParameterAction,\n NgssmSetDataSourceParameterValidityAction,\n NgssmSetDataSourceValueAction,\n NgssmUpdateDataSourceParameterAction\n} from '../actions';\nimport { selectNgssmDataSourceValue, selectNgssmDataState, updateNgssmDataState } from '../state';\nimport { NgssmDataSourceValueStatus } from '../model';\n\n@Injectable()\nexport class DataSourceValueReducer implements Reducer {\n public readonly processedActions: string[] = [\n NgssmDataActionType.loadDataSourceValue,\n NgssmDataActionType.setDataSourceValue,\n NgssmDataActionType.clearDataSourceValue,\n NgssmDataActionType.setDataSourceParameter,\n NgssmDataActionType.loadDataSourceAdditionalPropertyValue,\n NgssmDataActionType.setDataSourceAdditionalPropertyValue,\n NgssmDataActionType.updateDataSourceParameter,\n NgssmDataActionType.setDataSourceParameterValidity\n ];\n\n public updateState(state: State, action: Action): State {\n switch (action.type) {\n case NgssmDataActionType.loadDataSourceValue: {\n const loadDataSourceValue = action as NgssmLoadDataSourceValueAction;\n const dataSourceValue = selectNgssmDataState(state).dataSourceValues[loadDataSourceValue.key];\n if (!dataSourceValue) {\n break;\n }\n\n let shouldReload = false;\n\n let currentState = state;\n if (loadDataSourceValue.options?.parameter) {\n shouldReload = true;\n currentState = updateNgssmDataState(state, {\n dataSourceValues: {\n [loadDataSourceValue.key]: {\n parameter: { $set: loadDataSourceValue.options?.parameter.value }\n }\n }\n });\n }\n\n if (dataSourceValue.status === NgssmDataSourceValueStatus.loaded) {\n if (\n loadDataSourceValue.options?.forceReload === true ||\n !dataSourceValue.dataLifetimeInSeconds ||\n !dataSourceValue.lastLoadingDate\n ) {\n shouldReload = true;\n } else {\n const dataLifetime = DateTime.now().diff(dataSourceValue.lastLoadingDate, 'second');\n if ((dataLifetime.toObject().seconds ?? 0) > dataSourceValue.dataLifetimeInSeconds) {\n shouldReload = true;\n }\n }\n } else {\n shouldReload = true;\n }\n\n if (dataSourceValue.parameterIsValid === false) {\n shouldReload = false;\n }\n\n if (shouldReload) {\n if (loadDataSourceValue.options?.keepAdditionalProperties !== true) {\n currentState = updateNgssmDataState(currentState, {\n dataSourceValues: {\n [loadDataSourceValue.key]: {\n additionalProperties: { $set: {} }\n }\n }\n });\n }\n\n if (loadDataSourceValue.options?.resetValue === true) {\n currentState = updateNgssmDataState(currentState, {\n dataSourceValues: {\n [loadDataSourceValue.key]: {\n value: { $set: undefined }\n }\n }\n });\n }\n\n return updateNgssmDataState(currentState, {\n dataSourceValues: {\n [loadDataSourceValue.key]: {\n status: { $set: NgssmDataSourceValueStatus.loading },\n valueOutdated: { $set: false }\n }\n }\n });\n }\n\n break;\n }\n\n case NgssmDataActionType.setDataSourceValue: {\n const ngssmSetDataSourceValueAction = action as NgssmSetDataSourceValueAction;\n const dataSourceValue = selectNgssmDataState(state).dataSourceValues[ngssmSetDataSourceValueAction.key];\n if (!dataSourceValue) {\n break;\n }\n\n return updateNgssmDataState(state, {\n dataSourceValues: {\n [ngssmSetDataSourceValueAction.key]: {\n status: { $set: ngssmSetDataSourceValueAction.status },\n value: { $set: ngssmSetDataSourceValueAction.value },\n lastLoadingDate: { $set: DateTime.now() }\n }\n }\n });\n }\n\n case NgssmDataActionType.clearDataSourceValue: {\n const ngssmClearDataSourceValueAction = action as NgssmClearDataSourceValueAction;\n let currentState = state;\n if (ngssmClearDataSourceValueAction.clearParameter) {\n currentState = updateNgssmDataState(state, {\n dataSourceValues: {\n [ngssmClearDataSourceValueAction.key]: {\n parameter: { $set: undefined },\n parameterIsValid: { $set: undefined }\n }\n }\n });\n }\n\n return updateNgssmDataState(currentState, {\n dataSourceValues: {\n [ngssmClearDataSourceValueAction.key]: {\n status: { $set: NgssmDataSourceValueStatus.none },\n value: { $set: undefined },\n lastLoadingDate: { $set: undefined },\n additionalProperties: { $set: {} }\n }\n }\n });\n }\n\n case NgssmDataActionType.setDataSourceParameter: {\n const ngssmSetDataSourceParameterAction = action as NgssmSetDataSourceParameterAction;\n return updateNgssmDataState(state, {\n dataSourceValues: {\n [ngssmSetDataSourceParameterAction.key]: {\n parameter: { $set: ngssmSetDataSourceParameterAction.parameter },\n parameterIsValid: { $set: ngssmSetDataSourceParameterAction.parameterIsValid },\n valueOutdated: { $set: true }\n }\n }\n });\n }\n\n case NgssmDataActionType.updateDataSourceParameter: {\n const ngssmUpdateDataSourceParameterAction = action as NgssmUpdateDataSourceParameterAction;\n const newParameter = update<object, never>(\n selectNgssmDataSourceValue(state, ngssmUpdateDataSourceParameterAction.key)?.parameter as object,\n {\n $merge: ngssmUpdateDataSourceParameterAction.parameter\n }\n );\n return updateNgssmDataState(state, {\n dataSourceValues: {\n [ngssmUpdateDataSourceParameterAction.key]: {\n parameter: { $set: newParameter },\n valueOutdated: { $set: true }\n }\n }\n });\n }\n\n case NgssmDataActionType.setDataSourceParameterValidity: {\n const ngssmSetDataSourceParameterValidityAction = action as NgssmSetDataSourceParameterValidityAction;\n return updateNgssmDataState(state, {\n dataSourceValues: {\n [ngssmSetDataSourceParameterValidityAction.key]: {\n parameterIsValid: { $set: ngssmSetDataSourceParameterValidityAction.isValid }\n }\n }\n });\n }\n\n case NgssmDataActionType.loadDataSourceAdditionalPropertyValue: {\n const ngssmLoadDataSourceAdditionalPropertyValueAction = action as NgssmLoadDataSourceAdditionalPropertyValueAction;\n const dataSourcePropertyValue =\n selectNgssmDataState(state).dataSourceValues[ngssmLoadDataSourceAdditionalPropertyValueAction.key]?.additionalProperties[\n ngssmLoadDataSourceAdditionalPropertyValueAction.property\n ];\n\n if (\n dataSourcePropertyValue?.status === NgssmDataSourceValueStatus.loaded &&\n ngssmLoadDataSourceAdditionalPropertyValueAction.forceReload !== true\n ) {\n break;\n }\n\n if (!dataSourcePropertyValue) {\n return updateNgssmDataState(state, {\n dataSourceValues: {\n [ngssmLoadDataSourceAdditionalPropertyValueAction.key]: {\n additionalProperties: {\n [ngssmLoadDataSourceAdditionalPropertyValueAction.property]: {\n $set: {\n status: NgssmDataSourceValueStatus.loading\n }\n }\n }\n }\n }\n });\n }\n\n return updateNgssmDataState(state, {\n dataSourceValues: {\n [ngssmLoadDataSourceAdditionalPropertyValueAction.key]: {\n additionalProperties: {\n [ngssmLoadDataSourceAdditionalPropertyValueAction.property]: {\n status: { $set: NgssmDataSourceValueStatus.loading }\n }\n }\n }\n }\n });\n }\n\n case NgssmDataActionType.setDataSourceAdditionalPropertyValue: {\n const ngssmSetDataSourceAdditionalPropertyValueAction = action as NgssmSetDataSourceAdditionalPropertyValueAction;\n return updateNgssmDataState(state, {\n dataSourceValues: {\n [ngssmSetDataSourceAdditionalPropertyValueAction.key]: {\n additionalProperties: {\n [ngssmSetDataSourceAdditionalPropertyValueAction.property]: {\n $set: {\n status: ngssmSetDataSourceAdditionalPropertyValueAction.status,\n value: ngssmSetDataSourceAdditionalPropertyValueAction.value,\n lastLoadingDate: DateTime.now()\n }\n }\n }\n }\n }\n });\n }\n }\n\n return state;\n }\n}\n","import { EnvironmentInjector, Injectable, runInInjectionContext } from '@angular/core';\n\nimport { Effect, State, Action, Logger, ActionDispatcher } from 'ngssm-store';\n\nimport {\n NgssmDataActionType,\n NgssmDataSourceValueAction,\n NgssmLoadDataSourceAdditionalPropertyValueAction,\n NgssmSetDataSourceAdditionalPropertyValueAction,\n NgssmSetDataSourceValueAction\n} from '../actions';\nimport { selectNgssmDataState } from '../state';\nimport { NgssmDataSourceValueStatus } from '../model';\n\n@Injectable()\nexport class DataLoadingEffect implements Effect {\n public readonly processedActions: string[] = [\n NgssmDataActionType.loadDataSourceValue,\n NgssmDataActionType.loadDataSourceAdditionalPropertyValue\n ];\n\n constructor(\n private logger: Logger,\n private injector: EnvironmentInjector\n ) {}\n\n public processAction(actiondispatcher: ActionDispatcher, state: State, action: Action): void {\n const key = (action as NgssmDataSourceValueAction).key;\n const dataSource = selectNgssmDataState(state).dataSources[key];\n if (!dataSource) {\n this.logger.error(`No data source setup for key '${key}'`);\n return;\n }\n\n const dataSourceValue = selectNgssmDataState(state).dataSourceValues[key];\n\n switch (action.type) {\n case NgssmDataActionType.loadDataSourceValue: {\n if (dataSourceValue?.status !== NgssmDataSourceValueStatus.loading) {\n this.logger.information(\n `Data source value for '${key}' is not in '${NgssmDataSourceValueStatus.loading}' status: '${dataSourceValue?.status}'`\n );\n return;\n }\n\n runInInjectionContext(this.injector, () => {\n dataSource.dataLoadingFunc(state, key, dataSourceValue.parameter).subscribe({\n next: (value) => actiondispatcher.dispatchAction(new NgssmSetDataSourceValueAction(key, NgssmDataSourceValueStatus.loaded, value)),\n error: (error) => {\n this.logger.error(`Unable to load data for '${key}'`, error);\n actiondispatcher.dispatchAction(new NgssmSetDataSourceValueAction(key, NgssmDataSourceValueStatus.error));\n }\n });\n });\n\n break;\n }\n\n case NgssmDataActionType.loadDataSourceAdditionalPropertyValue: {\n const ngssmLoadDataSourceAdditionalPropertyValueAction = action as NgssmLoadDataSourceAdditionalPropertyValueAction;\n const property = ngssmLoadDataSourceAdditionalPropertyValueAction.property;\n if (dataSourceValue.additionalProperties[property]?.status !== NgssmDataSourceValueStatus.loading) {\n this.logger.information(\n `Data source additional property value for '${key}' and property '${property}' is not in '${NgssmDataSourceValueStatus.loading}' status: '${dataSourceValue?.status}'`\n );\n return;\n }\n\n runInInjectionContext(this.injector, () => {\n dataSource.additionalPropertyLoadingFunc?.(state, key, property).subscribe({\n next: (value) =>\n actiondispatcher.dispatchAction(\n new NgssmSetDataSourceAdditionalPropertyValueAction(key, property, NgssmDataSourceValueStatus.loaded, value)\n ),\n error: (error) => {\n this.logger.error(`Unable to load data for '${key}' and property '${property}'`, error);\n actiondispatcher.dispatchAction(new NgssmSetDataSourceAdditionalPropertyValueAction(key, property, NgssmDataSourceValueStatus.error));\n }\n });\n });\n\n break;\n }\n }\n }\n}\n","import { EnvironmentProviders, Inject, Injectable, Optional, makeEnvironmentProviders, inject, provideAppInitializer } from '@angular/core';\n\nimport { Store, provideEffects, provideReducers } from 'ngssm-store';\n\nimport { NGSSM_DATA_SOURCE, NgssmDataSource } from './model';\nimport { DataSourceValueReducer, DataSourcesRegistrationReducer } from './reducers';\nimport { DataLoadingEffect } from './effects';\nimport { NgssmRegisterDataSourcesAction } from './actions';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgssmDataSourceCollection {\n constructor(@Inject(NGSSM_DATA_SOURCE) @Optional() public dataSources: NgssmDataSource[]) {}\n}\n\nconst initDataSourceValues = () => {\n const store = inject(Store);\n const dataSourceCollection = inject(NgssmDataSourceCollection);\n const dataSources = dataSourceCollection.dataSources ?? [];\n if (dataSources.length > 0) {\n store.dispatchAction(new NgssmRegisterDataSourcesAction(dataSources));\n }\n};\n\nexport const provideNgssmData = (): EnvironmentProviders => {\n return makeEnvironmentProviders([\n provideAppInitializer(initDataSourceValues),\n provideReducers(DataSourcesRegistrationReducer, DataSourceValueReducer),\n provideEffects(DataLoadingEffect)\n ]);\n};\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { State } from 'ngssm-store';\n\nimport { NgssmDataSourceValueStatus } from '../model';\nimport { selectNgssmDataSourceValue } from '../state';\n\n@Pipe({\n name: 'isNgssmDataSourceValueStatus',\n standalone: true\n})\nexport class IsNgssmDataSourceValueStatusPipe implements PipeTransform {\n public transform(value: State, ...args: string[]): boolean {\n const key = args[0];\n const expectedStatuses = args.slice(1).map((a) => a as NgssmDataSourceValueStatus);\n const itemStatus = selectNgssmDataSourceValue(value, key).status;\n return expectedStatuses.includes(itemStatus);\n }\n}\n","import { Component, ChangeDetectionStrategy, Input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatFormFieldModule } from '@angular/material/form-field';\n\nimport { NgSsmComponent, Store } from 'ngssm-store';\n\nimport { getNgssmDataSourceValueAutoReloadTypes, NgssmDataSourceValueAutoReloadType } from '../../model';\n\n@Component({\n selector: 'ngssm-auto-reload',\n imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, MatSelectModule],\n templateUrl: './ngssm-auto-reload.component.html',\n styleUrls: [],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NgssmAutoReloadComponent extends NgSsmComponent {\n private timerId: number | undefined;\n\n public readonly reloadTypes = getNgssmDataSourceValueAutoReloadTypes();\n public readonly reloadTypeControl = new FormControl<NgssmDataSourceValueAutoReloadType>('Off');\n\n @Input() autoReloadAction: () => void = () => {\n // nothing by default\n };\n\n constructor(store: Store) {\n super(store);\n\n this.reloadTypeControl.valueChanges.subscribe((v) => {\n if (v === 'Off' && this.timerId) {\n clearInterval(this.timerId);\n this.timerId = undefined;\n return;\n }\n\n let period = 60000;\n switch (v) {\n case '5min':\n period = 5 * period;\n break;\n\n case '15min':\n period = 15 * period;\n break;\n }\n\n this.timerId = setInterval(this.autoReloadAction, period) as unknown as number;\n });\n\n this.unsubscribeAll$.subscribe(() => {\n if (this.timerId) {\n clearInterval(this.timerId);\n this.timerId = undefined;\n }\n });\n }\n}\n","<mat-form-field>\n <mat-label>Select auto reload period</mat-label>\n <mat-select [formControl]=\"reloadTypeControl\">\n @for (option of reloadTypes; track option.value){\n <mat-option [value]=\"option.value\">\n {{option.label}}\n </mat-option>\n }\n </mat-select>\n</mat-form-field>","import { Component, ChangeDetectionStrategy, signal, input, effect, inject } from '@angular/core';\nimport { NgClass } from '@angular/common';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\nimport { MatButton, MatIconButton } from '@angular/material/button';\nimport { MatIcon } from '@angular/material/icon';\n\nimport { DateTime } from 'luxon';\n\nimport { createSignal, Store } from 'ngssm-store';\n\nimport { selectNgssmDataState } from '../../state';\nimport { NgssmDataSourceValue, NgssmDataSourceValueStatus } from '../../model';\nimport { NgssmLoadDataSourceValueAction } from '../../actions';\nimport { NgssmAutoReloadComponent } from '../ngssm-auto-reload/ngssm-auto-reload.component';\n\n@Component({\n selector: 'ngssm-data-reload-button',\n imports: [NgClass, MatButton, MatIconButton, MatTooltip, MatIcon, MatProgressSpinner, NgssmAutoReloadComponent],\n templateUrl: './ngssm-data-reload-button.component.html',\n styleUrls: [],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NgssmDataReloadButtonComponent {\n private readonly store = inject(Store);\n\n private readonly dataSourceValues = createSignal<Record<string, NgssmDataSourceValue>>(\n (state) => selectNgssmDataState(state).dataSourceValues\n );\n\n public readonly loadInProgress = signal<boolean>(false);\n public readonly buttonDisabled = signal<boolean>(true);\n public readonly tooltipMessage = signal<string>('');\n public readonly color = signal<string>('primary');\n public readonly reloadAction = () => this.reload();\n\n public label = input<string | undefined>(undefined);\n public keepAdditionalProperties = input(false);\n public buttonIcon = input<string>('fa-solid fa-rotate-right');\n public autoReloadEnabled = input(false);\n public dataSourceKeys = input<string[]>([]);\n\n constructor() {\n effect(() => {\n const values = this.dataSourceValues();\n const keys = this.dataSourceKeys();\n this.loadInProgress.set(keys.findIndex((v) => values[v]?.status === NgssmDataSourceValueStatus.loading) !== -1);\n let timestamp: DateTime | undefined;\n keys.forEach((key) => {\n const keyTimestamp = values[key]?.lastLoadingDate;\n if (keyTimestamp) {\n if (!timestamp || timestamp > keyTimestamp) {\n timestamp = keyTimestamp;\n }\n }\n });\n\n let tooltiMessage = 'Reload data.';\n if (timestamp) {\n tooltiMessage = [tooltiMessage, `Loaded at ${timestamp.toHTTP()}`].join('\\n');\n }\n this.tooltipMessage.set(tooltiMessage);\n\n if (this.loadInProgress()) {\n this.buttonDisabled.set(true);\n return;\n }\n\n const someHasAnInvalidParameter = keys.findIndex((key) => values[key]?.parameterIsValid === false) !== -1;\n if (someHasAnInvalidParameter) {\n this.buttonDisabled.set(true);\n return;\n }\n\n this.buttonDisabled.set(keys.findIndex((v) => !!values[v]) === -1);\n\n const someHasAnOutdatedValue = keys.findIndex((key) => values[key]?.valueOutdated === true) !== -1;\n this.color.set(someHasAnOutdatedValue ? 'accent' : 'primary');\n });\n }\n\n public reload(): void {\n const isDisabled = this.buttonDisabled();\n if (isDisabled) {\n return;\n }\n\n this.dataSourceKeys().forEach((key) =>\n this.store.dispatchAction(\n new NgssmLoadDataSourceValueAction(key, { forceReload: true, keepAdditionalProperties: this.keepAdditionalProperties() })\n )\n );\n }\n}\n","<div class=\"flex-row-center\">\n @if (label(); as buttonLabel) {\n <button\n mat-stroked-button\n [color]=\"color()\"\n (click)=\"reload()\"\n [matTooltip]=\"tooltipMessage()\"\n [disabled]=\"buttonDisabled() === true\"\n id=\"reloadButton\">\n <div class=\"flex-row-center\">\n @if (loadInProgress()) {\n <mat-spinner [diameter]=\"24\" id=\"loadingSpinner\"></mat-spinner>\n } @else {\n <mat-icon [ngClass]=\"buttonIcon()\"></mat-icon>\n }\n\n <span style=\"width:0.5rem\"></span>\n\n {{ buttonLabel }}\n </div>\n </button>\n } @else {\n <button\n mat-icon-button\n [color]=\"color()\"\n (click)=\"reload()\"\n [matTooltip]=\"tooltipMessage()\"\n [disabled]=\"buttonDisabled() === true\"\n id=\"reloadButton\">\n @if (loadInProgress()) {\n <mat-spinner [diameter]=\"24\" id=\"loadingSpinner\"></mat-spinner>\n } @else {\n <mat-icon [ngClass]=\"buttonIcon()\"></mat-icon>\n }\n </button>\n }\n\n @if (autoReloadEnabled()) {\n <ngssm-auto-reload class=\"with-margin-left-8\" [autoReloadAction]=\"reloadAction\"></ngssm-auto-reload>\n }\n</div>\n","import { Directive, inject, Input, OnDestroy } from '@angular/core';\n\nimport { ACTION_DISPATCHER, ActionDispatcher } from 'ngssm-store';\n\nimport { NgssmDataSource } from '../model';\nimport { NgssmRegisterDataSourceAction, NgssmUnregisterDataSourceAction } from '../actions';\n\n@Directive({\n selector: '[ngssmScopedDataSource]',\n standalone: true\n})\nexport class NgssmScopedDataSourceDirective implements OnDestroy {\n private readonly actionDispatcher: ActionDispatcher = inject(ACTION_DISPATCHER);\n private _dataSource: NgssmDataSource | undefined;\n\n @Input() set ngssmScopedDataSource(value: NgssmDataSource) {\n if (this._dataSource) {\n throw new Error('Data source is already set.');\n }\n this._dataSource = value;\n this.actionDispatcher.dispatchAction(new NgssmRegisterDataSourceAction(this._dataSource));\n }\n\n public ngOnDestroy(): void {\n const key = this._dataSource?.key;\n if (key) {\n this.actionDispatcher.dispatchAction(new NgssmUnregisterDataSourceAction(key));\n }\n }\n}\n","/*\n * Public API Surface of ngssm-data\n */\n\nexport * from './lib/ngssm-data/public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;IAAY;AAAZ,CAAA,UAAY,mBAAmB,EAAA;;AAE7B,IAAA,mBAAA,CAAA,qBAAA,CAAA,GAAA,2CAAiE;;;AAIjE,IAAA,mBAAA,CAAA,oBAAA,CAAA,GAAA,0CAA+D;AAC/D,IAAA,mBAAA,CAAA,sBAAA,CAAA,GAAA,4CAAmE;;AAGnE,IAAA,mBAAA,CAAA,qBAAA,CAAA,GAAA,2CAAiE;;AAGjE,IAAA,mBAAA,CAAA,wBAAA,CAAA,GAAA,8CAAuE;;AAGvE,IAAA,mBAAA,CAAA,2BAAA,CAAA,GAAA,iDAA6E;;AAG7E,IAAA,mBAAA,CAAA,gCAAA,CAAA,GAAA,sDAAuF;;AAGvF,IAAA,mBAAA,CAAA,sBAAA,CAAA,GAAA,4CAAmE;;AAGnE,IAAA,mBAAA,CAAA,oBAAA,CAAA,GAAA,0CAA+D;;AAG/D,IAAA,mBAAA,CAAA,uCAAA,CAAA,GAAA,6DAAqG;;AAGrG,IAAA,mBAAA,CAAA,sCAAA,CAAA,GAAA,4DAAmG;AACrG,CAAC,EAhCW,mBAAmB,KAAnB,mBAAmB,GAgC9B,EAAA,CAAA,CAAA;;MC9BY,0BAA0B,CAAA;IACrC,WACkB,CAAA,IAAY,EACZ,GAAW,EAAA;QADX,IAAI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A,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,yBAAyB;AACnC,oBAAA,UAAU,EAAE;AACb,iBAAA;8BAKc,qBAAqB,EAAA,CAAA;sBAAjC;;;ACfH;;AAEG;;ACFH;;AAEG;;;;"}
|
package/lib/ngssm-data/components/ngssm-data-reload-button/ngssm-data-reload-button.component.d.ts
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import { NgSsmComponent, Store } from 'ngssm-store';
|
|
2
1
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class NgssmDataReloadButtonComponent
|
|
4
|
-
private readonly
|
|
5
|
-
private
|
|
2
|
+
export declare class NgssmDataReloadButtonComponent {
|
|
3
|
+
private readonly store;
|
|
4
|
+
private readonly dataSourceValues;
|
|
6
5
|
readonly loadInProgress: import("@angular/core").WritableSignal<boolean>;
|
|
7
6
|
readonly buttonDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
8
7
|
readonly tooltipMessage: import("@angular/core").WritableSignal<string>;
|
|
9
|
-
readonly icon: import("@angular/core").WritableSignal<string>;
|
|
10
8
|
readonly color: import("@angular/core").WritableSignal<string>;
|
|
11
|
-
readonly withAutoReload: import("@angular/core").WritableSignal<boolean>;
|
|
12
9
|
readonly reloadAction: () => void;
|
|
13
|
-
|
|
14
|
-
keepAdditionalProperties: boolean
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
set label(value: string | undefined);
|
|
10
|
+
label: import("@angular/core").InputSignal<string | undefined>;
|
|
11
|
+
keepAdditionalProperties: import("@angular/core").InputSignal<boolean>;
|
|
12
|
+
buttonIcon: import("@angular/core").InputSignal<string>;
|
|
13
|
+
autoReloadEnabled: import("@angular/core").InputSignal<boolean>;
|
|
14
|
+
dataSourceKeys: import("@angular/core").InputSignal<string[]>;
|
|
15
|
+
constructor();
|
|
20
16
|
reload(): void;
|
|
21
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgssmDataReloadButtonComponent, never>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgssmDataReloadButtonComponent, "ngssm-data-reload-button", never, { "
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgssmDataReloadButtonComponent, "ngssm-data-reload-button", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "keepAdditionalProperties": { "alias": "keepAdditionalProperties"; "required": false; "isSignal": true; }; "buttonIcon": { "alias": "buttonIcon"; "required": false; "isSignal": true; }; "autoReloadEnabled": { "alias": "autoReloadEnabled"; "required": false; "isSignal": true; }; "dataSourceKeys": { "alias": "dataSourceKeys"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
23
19
|
}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import { EnvironmentProviders, InjectionToken } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { State } from 'ngssm-store';
|
|
4
|
-
export type NgssmDataLoading<TData = unknown, TParameter = unknown> = (state: State,
|
|
5
|
-
export
|
|
4
|
+
export type NgssmDataLoading<TData = unknown, TParameter = unknown> = (state: State, dataSourceKey: string, parameter?: TParameter) => Observable<TData>;
|
|
5
|
+
export type NgssmAdditionalPropertyLoading<TData = unknown> = (state: State, dataSourceKey: string, additionalProperty: string) => Observable<TData>;
|
|
6
|
+
export interface NgssmDataSource<TData = unknown, TParameter = unknown, TAdditionProperty = unknown> {
|
|
6
7
|
key: string;
|
|
7
8
|
dataLifetimeInSeconds?: number;
|
|
8
9
|
dataLoadingFunc: NgssmDataLoading<TData, TParameter>;
|
|
10
|
+
additionalPropertyLoadingFunc?: NgssmAdditionalPropertyLoading<TAdditionProperty>;
|
|
9
11
|
initialParameter?: TParameter;
|
|
10
12
|
initialParameterInvalid?: boolean;
|
|
11
13
|
}
|
|
12
|
-
export declare const NGSSM_DATA_SOURCE: InjectionToken<NgssmDataSource<unknown, unknown>>;
|
|
13
|
-
export
|
|
14
|
+
export declare const NGSSM_DATA_SOURCE: InjectionToken<NgssmDataSource<unknown, unknown, unknown>>;
|
|
15
|
+
export interface NgssmDataSourceProvideOptions<TParameter = unknown, TAdditionProperty = unknown> {
|
|
16
|
+
dataLifetimeInSeconds?: number;
|
|
17
|
+
initialParameter?: TParameter;
|
|
18
|
+
initialParameterInvalid?: boolean;
|
|
19
|
+
additionalPropertyLoadingFunc?: NgssmAdditionalPropertyLoading<TAdditionProperty>;
|
|
20
|
+
}
|
|
21
|
+
export declare const provideNgssmDataSource: <TData = unknown, TParameter = unknown, TAdditionProperty = unknown>(key: string, // Unique key for the data source
|
|
22
|
+
loadingFunc: NgssmDataLoading<TData, TParameter>, // Function to load data
|
|
23
|
+
options?: NgssmDataSourceProvideOptions<TParameter, TAdditionProperty>) => EnvironmentProviders;
|
|
14
24
|
export declare const ngssmLoadDataSourceValue: (key: string, forceReload?: boolean) => (() => boolean);
|
package/package.json
CHANGED