@provoly/hypervisor 1.4.12 → 1.4.14
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, Pipe, Component, Input, EventEmitter, Output, Inject, ElementRef, ViewChild, ViewContainerRef, model as model$1, ViewChildren, TemplateRef, ContentChildren, Directive, forwardRef, signal, computed, InjectionToken, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1$3 from '@provoly/dashboard';
|
|
4
|
-
import { FilterParamEncoder, DEFAULT_ICON_URL, SubscriptionnerDirective, PRY_DIALOG_DATA, PryDialogConfirmComponent, PryI18nModule, PryCoreModule, PrySinceDateModule, PryIconModule, PrySelectModule, PryDatePickerModule } from '@provoly/dashboard';
|
|
4
|
+
import { FilterParamEncoder, DEFAULT_ICON_URL, SubscriptionnerDirective, PRY_DIALOG_DATA, PryDialogConfirmComponent, PryI18nModule, PryCoreModule, PrySinceDateModule, PryIconModule, PrySelectModule, PryDatePickerModule, I18nPipe } from '@provoly/dashboard';
|
|
5
5
|
import * as i1$1 from '@ngrx/store';
|
|
6
6
|
import { createAction, props, createReducer, on, createFeatureSelector, createSelector, StoreModule } from '@ngrx/store';
|
|
7
7
|
import * as i2 from '@angular/cdk/overlay';
|
|
@@ -1648,11 +1648,22 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
1648
1648
|
if (this.equipmentSelectValue[index] === undefined) {
|
|
1649
1649
|
this.equipmentSelectValue[index] = '';
|
|
1650
1650
|
}
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1651
|
+
let search;
|
|
1652
|
+
if (typeof this.equipmentSelectValue[index] === 'string' &&
|
|
1653
|
+
this.equipmentSelectValue[index].length > 2) {
|
|
1654
|
+
const equipValue = this.equipmentSelectValue[index];
|
|
1655
|
+
const firstIndex = equipValue.indexOf('-');
|
|
1656
|
+
const lastIndex = equipValue.lastIndexOf('-');
|
|
1657
|
+
if (firstIndex !== -1 && lastIndex !== firstIndex) {
|
|
1658
|
+
search = equipValue.substring(0, lastIndex - 1);
|
|
1659
|
+
}
|
|
1660
|
+
else {
|
|
1661
|
+
search = equipValue;
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
else {
|
|
1665
|
+
search = this.equipmentSelectValue[index].name;
|
|
1666
|
+
}
|
|
1656
1667
|
return this.equipmentService.search(search).pipe(map$1((equipments) => equipments.map((equipment) => {
|
|
1657
1668
|
const regex = RegExp(`(${search})` ?? '(/-/-/)', 'gid');
|
|
1658
1669
|
const html = `${equipment.name} - ${this.i18nService.instant('@hvy.event.family.' + equipment.family)}`;
|
|
@@ -1932,7 +1943,7 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
1932
1943
|
this.onEquipmentSearch$.next(index);
|
|
1933
1944
|
if (typeof $event === 'object' || $event === '') {
|
|
1934
1945
|
const equipmentForEvent = $event !== '' ? $event : undefined;
|
|
1935
|
-
if (!equipmentForEvent || this._events[index].equipment?.name !== equipmentForEvent
|
|
1946
|
+
if ((!!this._events[index].equipment && !equipmentForEvent) || this._events[index].equipment?.name !== equipmentForEvent?.name) {
|
|
1936
1947
|
if (!this.eventModifications[index]) {
|
|
1937
1948
|
this.eventModifications[index] = {};
|
|
1938
1949
|
}
|
|
@@ -1952,6 +1963,14 @@ class EventDetailComponent extends SubscriptionnerDirective {
|
|
|
1952
1963
|
}
|
|
1953
1964
|
this.populateEquipment(equipmentForEvent, index);
|
|
1954
1965
|
}
|
|
1966
|
+
else if (!!$event && !this.equipmentsEvents[index]?.events) {
|
|
1967
|
+
const firstIndex = $event.indexOf('-');
|
|
1968
|
+
const lastIndex = $event.lastIndexOf('-');
|
|
1969
|
+
if (firstIndex !== -1 && lastIndex !== firstIndex) {
|
|
1970
|
+
const name = $event.substring(0, lastIndex - 1);
|
|
1971
|
+
this.populateEquipment({ name }, index);
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1955
1974
|
else {
|
|
1956
1975
|
this.populateEquipment(undefined, index);
|
|
1957
1976
|
this._outputModifications();
|
|
@@ -3617,7 +3636,7 @@ class PvyHypervisorModule {
|
|
|
3617
3636
|
LastEventsComponent,
|
|
3618
3637
|
HvyEventDetailsTooltipComponent,
|
|
3619
3638
|
HvyEventAddEventComponent] }); }
|
|
3620
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: PvyHypervisorModule, imports: [StoreModule.forFeature(hypFeatureKey, hypervisorReducer),
|
|
3639
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: PvyHypervisorModule, providers: [I18nPipe], imports: [StoreModule.forFeature(hypFeatureKey, hypervisorReducer),
|
|
3621
3640
|
StoreModule.forFeature(eventFeatureKey, eventReducer),
|
|
3622
3641
|
StoreModule.forFeature(eventSummaryFeatureKey, eventSummaryReducer),
|
|
3623
3642
|
StoreModule.forFeature(procedureFeatureKey, procedureReducer),
|
|
@@ -3665,7 +3684,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
3665
3684
|
FormsModule,
|
|
3666
3685
|
AsyncPipe
|
|
3667
3686
|
],
|
|
3668
|
-
exports: [...components]
|
|
3687
|
+
exports: [...components],
|
|
3688
|
+
providers: [I18nPipe]
|
|
3669
3689
|
}]
|
|
3670
3690
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
3671
3691
|
type: Inject,
|