@c8y/ngx-components 1024.13.0 → 1024.14.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/c8y-ngx-components-widgets-implementations-asset-table.mjs +18 -7
- package/fesm2022/c8y-ngx-components-widgets-implementations-asset-table.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-scada.mjs +8 -4
- package/fesm2022/c8y-ngx-components-widgets-implementations-scada.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/locales/de.po +43 -48
- package/locales/es.po +42 -47
- package/locales/fr.po +44 -49
- package/locales/ja_JP.po +38 -42
- package/locales/ko.po +41 -46
- package/locales/nl.po +43 -48
- package/locales/pl.po +41 -46
- package/locales/pt_BR.po +43 -48
- package/locales/zh_CN.po +40 -45
- package/locales/zh_TW.po +43 -48
- package/package.json +1 -1
- package/types/c8y-ngx-components-widgets-implementations-scada.d.ts +2 -1
- package/types/c8y-ngx-components-widgets-implementations-scada.d.ts.map +1 -1
- package/types/c8y-ngx-components.d.ts +5 -0
- package/types/c8y-ngx-components.d.ts.map +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, inject, DestroyRef, input, computed, ChangeDetectionStrategy, Component, viewChild, signal, ElementRef, output, effect } from '@angular/core';
|
|
2
|
+
import { Injectable, inject, DestroyRef, input, computed, ChangeDetectionStrategy, Component, ChangeDetectorRef, viewChild, signal, ElementRef, output, effect } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed, toSignal, toObservable } from '@angular/core/rxjs-interop';
|
|
4
4
|
import * as i2 from '@c8y/ngx-components';
|
|
5
5
|
import { IconDirective, C8yTranslatePipe, AlertService, DropAreaComponent, FormGroupComponent, ListGroupModule, ModalModule, FormsModule as FormsModule$1, DashboardChildComponent, DynamicComponentAlertAggregator, DismissAlertStrategy, DynamicComponentAlert, ManagedObjectRealtimeService } from '@c8y/ngx-components';
|
|
@@ -1040,6 +1040,7 @@ class ScadaWidgetSvgSelectorComponent {
|
|
|
1040
1040
|
this.aiService = inject(AIService);
|
|
1041
1041
|
this.formBuilder = inject(FormBuilder);
|
|
1042
1042
|
this.destroyRef = inject(DestroyRef);
|
|
1043
|
+
this.cdRef = inject(ChangeDetectorRef);
|
|
1043
1044
|
this.formGroup = this.formBuilder.group({
|
|
1044
1045
|
source: this.formBuilder.nonNullable.control('file'),
|
|
1045
1046
|
svgCode: this.formBuilder.nonNullable.control('', []),
|
|
@@ -1195,21 +1196,24 @@ class ScadaWidgetSvgSelectorComponent {
|
|
|
1195
1196
|
});
|
|
1196
1197
|
}
|
|
1197
1198
|
async onSvgFileDropped(event) {
|
|
1198
|
-
|
|
1199
|
+
// Captured once: switching the Source radio away from "file" mid-upload destroys #dropArea.
|
|
1200
|
+
const dropArea = this.dropArea();
|
|
1201
|
+
dropArea.loading = true;
|
|
1199
1202
|
try {
|
|
1200
1203
|
const svgFile = event[0].file;
|
|
1201
1204
|
const config = await firstValueFrom(this.scadaConfigService.config$);
|
|
1202
1205
|
const updatedConfig = await this.scadaConfigService.updateConfigWithSvgFile(config, svgFile);
|
|
1203
1206
|
this.scadaConfigService.save(updatedConfig);
|
|
1204
1207
|
this.sectionComponent.section.expanded = false;
|
|
1205
|
-
|
|
1208
|
+
dropArea.files = null;
|
|
1206
1209
|
this.alertService.success(gettext('SVG file uploaded.'));
|
|
1207
1210
|
}
|
|
1208
1211
|
catch (e) {
|
|
1209
1212
|
this.alertService.danger(gettext('Could not upload the selected SVG file.'), e?.message || e);
|
|
1210
1213
|
}
|
|
1211
1214
|
finally {
|
|
1212
|
-
|
|
1215
|
+
dropArea.loading = false;
|
|
1216
|
+
this.cdRef.markForCheck();
|
|
1213
1217
|
}
|
|
1214
1218
|
}
|
|
1215
1219
|
async applySvgCode() {
|