cat-qw-lib 0.41.2 → 0.41.4
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 +11 -10
- package/fesm2022/cat-qw-lib.mjs.map +1 -1
- package/lib/admin/action-admin/components/admin-action-form/admin-action-form.component.d.ts +1 -0
- package/lib/shared/_base/base-form/base-form.component.d.ts +3 -5
- package/package.json +1 -1
- package/src/assets/config/api.config.json +21 -0
package/fesm2022/cat-qw-lib.mjs
CHANGED
|
@@ -23,7 +23,7 @@ import * as i3$2 from 'primeng/checkbox';
|
|
|
23
23
|
import { CheckboxModule } from 'primeng/checkbox';
|
|
24
24
|
import { EntityStore, StoreConfig, QueryEntity } from '@datorama/akita';
|
|
25
25
|
import { __decorate } from 'tslib';
|
|
26
|
-
import { BehaviorSubject, Subject, takeUntil, firstValueFrom, of, tap as tap$1, map, debounceTime, distinctUntilChanged, catchError, Subscription } from 'rxjs';
|
|
26
|
+
import { BehaviorSubject, Subject, takeUntil, firstValueFrom, of, tap as tap$1, map, debounceTime, distinctUntilChanged, filter, catchError, Subscription } from 'rxjs';
|
|
27
27
|
import { DragDropModule } from 'primeng/dragdrop';
|
|
28
28
|
import * as i5 from 'primeng/confirmdialog';
|
|
29
29
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
|
@@ -37,7 +37,7 @@ import { tap } from 'rxjs/operators';
|
|
|
37
37
|
import * as i1$1 from '@angular/common/http';
|
|
38
38
|
import { HttpClientModule } from '@angular/common/http';
|
|
39
39
|
import * as i3$4 from '@angular/router';
|
|
40
|
-
import { RouterModule } from '@angular/router';
|
|
40
|
+
import { RouterModule, NavigationStart } from '@angular/router';
|
|
41
41
|
import * as i2$2 from 'primeng/inputtextarea';
|
|
42
42
|
import { InputTextareaModule } from 'primeng/inputtextarea';
|
|
43
43
|
import * as i5$2 from 'primeng/calendar';
|
|
@@ -1240,7 +1240,6 @@ class BaseFormComponent {
|
|
|
1240
1240
|
onFormNavigate = new EventEmitter();
|
|
1241
1241
|
onCancel = new EventEmitter();
|
|
1242
1242
|
originalRecord;
|
|
1243
|
-
onLeavingRouteFn;
|
|
1244
1243
|
constructor(service, validatorService, router, activatedRoute, baseStore, baseQuery) {
|
|
1245
1244
|
this.service = service;
|
|
1246
1245
|
this.validatorService = validatorService;
|
|
@@ -1257,10 +1256,6 @@ class BaseFormComponent {
|
|
|
1257
1256
|
get currentState() {
|
|
1258
1257
|
return this.baseQuery?.getValue();
|
|
1259
1258
|
}
|
|
1260
|
-
ngOnChanges() {
|
|
1261
|
-
let leave = this.onLeavingRouteFn();
|
|
1262
|
-
console.log(leave);
|
|
1263
|
-
}
|
|
1264
1259
|
init() {
|
|
1265
1260
|
this.service.initList();
|
|
1266
1261
|
this.baseStore?.setRecordChange(SHARED.EMPTY);
|
|
@@ -1378,7 +1373,7 @@ class BaseFormComponent {
|
|
|
1378
1373
|
this.destroy$.complete();
|
|
1379
1374
|
}
|
|
1380
1375
|
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 }], target: i0.ɵɵFactoryTarget.Component });
|
|
1381
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: BaseFormComponent, isStandalone: true, selector: "base-form",
|
|
1376
|
+
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: [""] });
|
|
1382
1377
|
}
|
|
1383
1378
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseFormComponent, decorators: [{
|
|
1384
1379
|
type: Component,
|
|
@@ -1389,8 +1384,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
|
|
|
1389
1384
|
type: Output
|
|
1390
1385
|
}], onCancel: [{
|
|
1391
1386
|
type: Output
|
|
1392
|
-
}], onLeavingRouteFn: [{
|
|
1393
|
-
type: Input
|
|
1394
1387
|
}] } });
|
|
1395
1388
|
|
|
1396
1389
|
class DateParserService {
|
|
@@ -3256,8 +3249,16 @@ class AdminActionFormComponent extends BaseFormComponent {
|
|
|
3256
3249
|
}
|
|
3257
3250
|
ngOnInit() {
|
|
3258
3251
|
this.init();
|
|
3252
|
+
this.router?.events
|
|
3253
|
+
.pipe(filter(event => event instanceof NavigationStart))
|
|
3254
|
+
.subscribe((event) => {
|
|
3255
|
+
this.onLeavingRoute(event.url);
|
|
3256
|
+
});
|
|
3259
3257
|
this.baseStore.setIsApiValidated(null);
|
|
3260
3258
|
}
|
|
3259
|
+
onLeavingRoute(url) {
|
|
3260
|
+
console.log(url);
|
|
3261
|
+
}
|
|
3261
3262
|
handleValidateAction() {
|
|
3262
3263
|
const payload = { path: this.record.apiDocsUrl };
|
|
3263
3264
|
this.adminActionService.handleValidateAction(ROUTES.VALIDATE_ACTIONS, this.record.apiConfigId, payload)
|