cat-qw-lib 0.4.1 → 0.4.2

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.
@@ -1096,11 +1096,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImpor
1096
1096
  class BaseListComponent {
1097
1097
  service;
1098
1098
  builder;
1099
+ refreshTable = false;
1099
1100
  table;
1100
1101
  constructor(service, builder) {
1101
1102
  this.service = service;
1102
1103
  this.builder = builder;
1103
1104
  }
1105
+ ngOnChanges() {
1106
+ this.handleRefreshTable();
1107
+ }
1104
1108
  init() {
1105
1109
  this.service.getAll().subscribe((res) => {
1106
1110
  this.table = this.builder.buildTable(res);
@@ -1109,13 +1113,18 @@ class BaseListComponent {
1109
1113
  }
1110
1114
  afterTableBuild() {
1111
1115
  }
1116
+ handleRefreshTable() {
1117
+ this.init();
1118
+ }
1112
1119
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseListComponent, deps: [{ token: BaseService }, { token: TableBuilder }], target: i0.ɵɵFactoryTarget.Component });
1113
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: BaseListComponent, isStandalone: true, selector: "lib-base-list", ngImport: i0, template: "<p>base-list works!</p>\r\n", styles: [""] });
1120
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.4", type: BaseListComponent, isStandalone: true, selector: "lib-base-list", inputs: { refreshTable: "refreshTable" }, usesOnChanges: true, ngImport: i0, template: "<p>base-list works!</p>\r\n", styles: [""] });
1114
1121
  }
1115
1122
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: BaseListComponent, decorators: [{
1116
1123
  type: Component,
1117
1124
  args: [{ selector: 'lib-base-list', template: "<p>base-list works!</p>\r\n" }]
1118
- }], ctorParameters: () => [{ type: BaseService }, { type: TableBuilder }] });
1125
+ }], ctorParameters: () => [{ type: BaseService }, { type: TableBuilder }], propDecorators: { refreshTable: [{
1126
+ type: Input
1127
+ }] } });
1119
1128
 
1120
1129
  /**
1121
1130
  * DropdownComponent
@@ -1622,7 +1631,7 @@ class BaseFormComponent {
1622
1631
  init() {
1623
1632
  this.service.initList();
1624
1633
  this.baseStore?.setRecordChange(SHARED.EMPTY);
1625
- let id = '677fab064fcbea6b1687404c';
1634
+ let id = this.activatedRoute ? this.activatedRoute.snapshot.params[SHARED.ID] : '';
1626
1635
  if ((id !== SHARED.ZERO.toString()) && id) {
1627
1636
  this.service.getById(id).subscribe((res) => {
1628
1637
  this.record = res;