cat-qw-lib 0.43.6 → 0.43.8
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/cat-qw-lib.mjs
CHANGED
|
@@ -666,10 +666,8 @@ class BaseControlComponent {
|
|
|
666
666
|
}
|
|
667
667
|
});
|
|
668
668
|
if (this.formStateService) {
|
|
669
|
-
console.log("formchage");
|
|
670
669
|
this.formStateService.selectIsFormNavigating().subscribe((res) => {
|
|
671
670
|
if (res) {
|
|
672
|
-
console.log("navsjj", res);
|
|
673
671
|
this.checkUnsavedChanges();
|
|
674
672
|
}
|
|
675
673
|
});
|
|
@@ -710,7 +708,8 @@ class BaseControlComponent {
|
|
|
710
708
|
}
|
|
711
709
|
checkUnsavedChanges() {
|
|
712
710
|
const hasChanges = JSON.stringify(this.initialRecord) !== JSON.stringify(this.record);
|
|
713
|
-
if (this.formStateService) {
|
|
711
|
+
if (this.formStateService && hasChanges) {
|
|
712
|
+
console.log(hasChanges);
|
|
714
713
|
this.formStateService.setFormChanges(hasChanges);
|
|
715
714
|
}
|
|
716
715
|
}
|
|
@@ -1389,6 +1388,7 @@ class BaseFormComponent {
|
|
|
1389
1388
|
this.record = {};
|
|
1390
1389
|
this.baseStore?.setIsApiValidated(null);
|
|
1391
1390
|
if (this.formStateService) {
|
|
1391
|
+
console.log("baseForm");
|
|
1392
1392
|
this.formStateService.setFormChanges(false);
|
|
1393
1393
|
}
|
|
1394
1394
|
this.onFormNavigate.emit(response);
|
|
@@ -1407,6 +1407,7 @@ class BaseFormComponent {
|
|
|
1407
1407
|
this.record = {};
|
|
1408
1408
|
this.baseStore?.setIsApiValidated(null);
|
|
1409
1409
|
if (this.formStateService) {
|
|
1410
|
+
console.log("baseForm");
|
|
1410
1411
|
this.formStateService.setFormChanges(false);
|
|
1411
1412
|
}
|
|
1412
1413
|
this.onFormNavigate.emit(response);
|
|
@@ -1432,11 +1433,11 @@ class BaseFormComponent {
|
|
|
1432
1433
|
this.destroy$.complete();
|
|
1433
1434
|
}
|
|
1434
1435
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseFormComponent, deps: [{ token: BaseService }, { token: ValidatorService }, { token: i3$4.Router }, { token: i3$4.ActivatedRoute }, { token: BaseStore }, { token: BaseQuery }, { token: FormStateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1435
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: BaseFormComponent, isStandalone: true, selector: "base-form", outputs: { onSave: "onSave", onFormNavigate: "onFormNavigate", onCancel: "onCancel" }, providers: [ValidatorService], ngImport: i0, template: "<p>base-form works!</p>\r\n", styles: [""] });
|
|
1436
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: BaseFormComponent, isStandalone: true, selector: "base-form", outputs: { onSave: "onSave", onFormNavigate: "onFormNavigate", onCancel: "onCancel" }, providers: [ValidatorService, FormStateService], ngImport: i0, template: "<p>base-form works!</p>\r\n", styles: [""] });
|
|
1436
1437
|
}
|
|
1437
1438
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseFormComponent, decorators: [{
|
|
1438
1439
|
type: Component,
|
|
1439
|
-
args: [{ selector: 'base-form', providers: [ValidatorService], template: "<p>base-form works!</p>\r\n" }]
|
|
1440
|
+
args: [{ selector: 'base-form', providers: [ValidatorService, FormStateService], template: "<p>base-form works!</p>\r\n" }]
|
|
1440
1441
|
}], ctorParameters: () => [{ type: BaseService }, { type: ValidatorService }, { type: i3$4.Router }, { type: i3$4.ActivatedRoute }, { type: BaseStore }, { type: BaseQuery }, { type: FormStateService }], propDecorators: { onSave: [{
|
|
1441
1442
|
type: Output
|
|
1442
1443
|
}], onFormNavigate: [{
|