oxpi-nglib 2.0.73 → 2.0.74
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,18 +1,26 @@
|
|
|
1
|
+
import { signal } from '@angular/core';
|
|
1
2
|
export class BusyState {
|
|
2
3
|
constructor() {
|
|
3
|
-
|
|
4
|
+
// Estado reativo: respaldado por signal para funcionar sob OnPush/zoneless.
|
|
5
|
+
// O getter 'isBusy' mantem a API antiga (busy.isBusy) sem mudar templates;
|
|
6
|
+
// ler o getter dentro de um template rastreia o signal e marca o componente
|
|
7
|
+
// para re-render quando muda. Em CD padrao (zone) continua funcionando igual.
|
|
8
|
+
this._isBusy = signal(false);
|
|
4
9
|
this.counter = 0;
|
|
5
10
|
}
|
|
11
|
+
get isBusy() {
|
|
12
|
+
return this._isBusy();
|
|
13
|
+
}
|
|
6
14
|
show() {
|
|
7
15
|
this.counter++;
|
|
8
|
-
this.
|
|
16
|
+
this._isBusy.set(true);
|
|
9
17
|
}
|
|
10
18
|
hide() {
|
|
11
19
|
this.counter--;
|
|
12
20
|
if (this.counter < 0)
|
|
13
21
|
this.counter = 0;
|
|
14
22
|
if (this.counter == 0)
|
|
15
|
-
this.
|
|
23
|
+
this._isBusy.set(false);
|
|
16
24
|
}
|
|
17
25
|
}
|
|
18
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
26
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVzeS1zdGF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL294cGktbmdsaWIvc3JjL2xpYi9tb2RlbHMvaW5mcmEvYnVzeS1zdGF0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRXZDLE1BQU0sT0F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udHJvIGRlIHVtIHRlbXBsYXRlIHJhc3RyZWlhIG8gc2lnbmFsIGUgbWFyY2EgbyBjb21wb25lbnRlXG4gICAgLy8gcGFyYSByZS1yZW5kZXIgcXVhbmRvIG11ZGEuIEVtIENEIHBhZHJhbyAoem9uZSkgY29udGludWEgZnVuY2lvbmFuZG8gaWd1YWwuXG4gICAgcHJpdmF0ZSBfaXNCdXN5ID0gc2lnbmFsKGZhbHNlKTtcbiAgICBwcml2YXRlIGNvdW50ZXI6IG51bWJlciA9IDA7XG5cbiAgICBnZXQgaXNCdXN5KCk6IGJvb2xlYW4ge1xuICAgICAgICByZXR1cm4gdGhpcy5faXNCdXN5KCk7XG4gICAgfVxuXG4gICAgc2hvdygpIHtcbiAgICAgICAgdGhpcy5jb3VudGVyKys7XG4gICAgICAgIHRoaXMuX2lzQnVzeS5zZXQodHJ1ZSk7XG4gICAgfVxuXG4gICAgaGlkZSgpIHtcbiAgICAgICAgdGhpcy5jb3VudGVyLS07XG4gICAgICAgIGlmICh0aGlzLmNvdW50ZXIgPCAwKVxuICAgICAgICAgICAgdGhpcy5jb3VudGVyID0gMDtcbiAgICAgICAgaWYgKHRoaXMuY291bnRlciA9PSAwKVxuICAgICAgICAgICAgdGhpcy5faXNCdXN5LnNldChmYWxzZSk7XG4gICAgfVxufVxuIl19
|
package/fesm2022/oxpi-nglib.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, EventEmitter, Component, Input, Inject, Optional, Output, HostListener, Pipe, NgModule } from '@angular/core';
|
|
2
|
+
import { Injectable, EventEmitter, Component, Input, Inject, Optional, Output, HostListener, Pipe, NgModule, signal } from '@angular/core';
|
|
3
3
|
import * as i3 from '@angular/material/dialog';
|
|
4
4
|
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
5
5
|
import * as i1 from '@angular/common/http';
|
|
@@ -2754,19 +2754,26 @@ function validaOperador(item, focus) {
|
|
|
2754
2754
|
|
|
2755
2755
|
class BusyState {
|
|
2756
2756
|
constructor() {
|
|
2757
|
-
|
|
2757
|
+
// Estado reativo: respaldado por signal para funcionar sob OnPush/zoneless.
|
|
2758
|
+
// O getter 'isBusy' mantem a API antiga (busy.isBusy) sem mudar templates;
|
|
2759
|
+
// ler o getter dentro de um template rastreia o signal e marca o componente
|
|
2760
|
+
// para re-render quando muda. Em CD padrao (zone) continua funcionando igual.
|
|
2761
|
+
this._isBusy = signal(false);
|
|
2758
2762
|
this.counter = 0;
|
|
2759
2763
|
}
|
|
2764
|
+
get isBusy() {
|
|
2765
|
+
return this._isBusy();
|
|
2766
|
+
}
|
|
2760
2767
|
show() {
|
|
2761
2768
|
this.counter++;
|
|
2762
|
-
this.
|
|
2769
|
+
this._isBusy.set(true);
|
|
2763
2770
|
}
|
|
2764
2771
|
hide() {
|
|
2765
2772
|
this.counter--;
|
|
2766
2773
|
if (this.counter < 0)
|
|
2767
2774
|
this.counter = 0;
|
|
2768
2775
|
if (this.counter == 0)
|
|
2769
|
-
this.
|
|
2776
|
+
this._isBusy.set(false);
|
|
2770
2777
|
}
|
|
2771
2778
|
}
|
|
2772
2779
|
|