tuain-ng-forms-lib 15.1.13 → 15.1.15

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.
@@ -460,7 +460,7 @@ class LibTableComponent extends ElementComponent {
460
460
  tableGlobalAction(actionCode) { this.table?.notifyGlobalAction(actionCode); }
461
461
  tableSelectionAction(actionCode) { this.table?.notifySelectionAction(actionCode); }
462
462
  tableActionSelected(actionEvent) { this.table?.notifyInlineAction(actionEvent); }
463
- tableSelectionToggle(recordId) { console.log('tableSelectionToggle 1'); this.table?.notifyRecordSelection(recordId); }
463
+ tableSelectionToggle(recordId) { this.table?.notifyRecordSelection(recordId); }
464
464
  toggleSelectAll() { return (this.table?.allSelected) ? this.table?.unSelectAll() : this.table?.selectAll(); }
465
465
  globalFilterCompleted() { this.changePage(1); }
466
466
  changePage(requestedPage) { this.table?.changePage(requestedPage); }
@@ -1580,15 +1580,11 @@ class RecordTable extends FormElement {
1580
1580
  this._inlineActionTrigger.next(tableEvent);
1581
1581
  }
1582
1582
  notifyRecordSelection(recordId) {
1583
- console.log('notifyRecordSelection 1');
1584
1583
  const record = this.getTableRecord(recordId);
1585
- console.log('notifyRecordSelection 2');
1586
1584
  if (!record) {
1587
1585
  return;
1588
1586
  }
1589
- console.log('notifyRecordSelection 3');
1590
1587
  record.toggleSelect();
1591
- console.log('notifyRecordSelection 4');
1592
1588
  this.requestedPage = this.currentPage ?? 1;
1593
1589
  const tableEvent = {
1594
1590
  tableCode: this.tableCode,
@@ -1598,7 +1594,6 @@ class RecordTable extends FormElement {
1598
1594
  recordData: record.recordData
1599
1595
  }
1600
1596
  };
1601
- console.log(`notifyRecordSelection 5 ${JSON.stringify(tableEvent, null, 2)}`);
1602
1597
  this.recordSelectionTrigger.next(tableEvent);
1603
1598
  }
1604
1599
  notifySelectionAction(actionCode) {
@@ -3003,7 +2998,6 @@ class BasicFormComponent extends FormStructureAndData {
3003
2998
  table.inlineActionTrigger.subscribe(event => this.startTableAction(event));
3004
2999
  table.globalActionTrigger.subscribe(event => this.startTableGlobalAction(event));
3005
3000
  table.recordSelectionTrigger.subscribe(event => {
3006
- console.log(`recordSelectionTrigger subscribe ${JSON.stringify(event, null, 2)}`);
3007
3001
  this.startTableRecordSelection(event);
3008
3002
  });
3009
3003
  table.selectionActionTrigger.subscribe(event => this.startTableSelectionAction(event));
@@ -3710,16 +3704,12 @@ class BasicFormComponent extends FormStructureAndData {
3710
3704
  }
3711
3705
  }
3712
3706
  async startTableRecordSelection(tableActionEvent) {
3713
- console.log(`startTableRecordSelection ${JSON.stringify(tableActionEvent, null, 2)}`);
3714
3707
  this.notifyFormActivity();
3715
- console.log(`startTableRecordSelection 2`);
3716
3708
  const { tableCode, actionDetail } = tableActionEvent;
3717
3709
  const tableObject = this.getTable(tableCode);
3718
- console.log(`startTableRecordSelection 3`);
3719
3710
  if (!tableObject) {
3720
3711
  return;
3721
3712
  }
3722
- console.log(`startTableRecordSelection 4`);
3723
3713
  this.resetError();
3724
3714
  const { recordId, recordData } = actionDetail;
3725
3715
  const tableSelectionDetail = {
@@ -3728,30 +3718,23 @@ class BasicFormComponent extends FormStructureAndData {
3728
3718
  recordId,
3729
3719
  recordData
3730
3720
  };
3731
- console.log(`startTableRecordSelection 5`);
3732
3721
  const tableEventHandlers = this._tableSelectionsStart[tableCode];
3733
- console.log(`startTableRecordSelection 6 ${tableEventHandlers?.length}`);
3734
3722
  if (tableEventHandlers) {
3735
3723
  const clientActionPromises = [];
3736
3724
  for (const tableSelectionMethod of tableEventHandlers) {
3737
3725
  const { callback, properties } = tableSelectionMethod;
3738
- console.log(`startTableRecordSelection 7`);
3739
- console.log(callback);
3740
3726
  const clientActionPromise = callback(tableSelectionDetail);
3741
3727
  clientActionPromises.push(clientActionPromise);
3742
3728
  }
3743
3729
  const clientActionResults = await Promise.all(clientActionPromises);
3744
3730
  const continueAction = clientActionResults.reduce((total, curr) => (total && (curr !== false)), true);
3745
- console.log(`startTableRecordSelection 8 ${continueAction}`);
3746
3731
  if (!continueAction) {
3747
3732
  return;
3748
3733
  }
3749
3734
  }
3750
- console.log(`startTableRecordSelection 9`);
3751
3735
  this.startTableServerRecordSelection(tableSelectionDetail);
3752
3736
  }
3753
3737
  async startTableServerRecordSelection(tableSelectionDetail) {
3754
- console.log(`startTableServerRecordSelection 1 ${JSON.stringify(tableSelectionDetail, null, 2)}`);
3755
3738
  const { tableObject, tableCode, recordId, recordData } = tableSelectionDetail;
3756
3739
  if (!tableObject) {
3757
3740
  return;
@@ -3767,17 +3750,14 @@ class BasicFormComponent extends FormStructureAndData {
3767
3750
  tableRecordId: recordId,
3768
3751
  tableRecordData: recordData
3769
3752
  };
3770
- console.log(`startTableServerRecordSelection 2 ${JSON.stringify(actionSubject, null, 2)}`);
3771
3753
  actionResult = await this
3772
3754
  .requestFormAction(formActions.tableAction, actionSubject);
3773
3755
  serverError = !!this.errorOccured();
3774
3756
  }
3775
- console.log(`startTableServerRecordSelection 3`);
3776
3757
  await this.finishTableRecordSelection(tableSelectionDetail, actionResult, serverError);
3777
3758
  if (serverError) {
3778
3759
  this.displayTableServerError();
3779
3760
  }
3780
- console.log(`startTableServerRecordSelection 4`);
3781
3761
  tableObject.freeWaiting();
3782
3762
  }
3783
3763
  async finishTableRecordSelection(tableSelectionDetail, actionResult, serverError = false) {
@@ -3990,7 +3970,6 @@ class BasicFormComponent extends FormStructureAndData {
3990
3970
  }
3991
3971
  notifyFormActivity() {
3992
3972
  if (this._notifyFormActivity) {
3993
- console.log(`notifyFormActivity ${this.name}`);
3994
3973
  this._eventEmiter.next('formActivity', { code: this.formCode });
3995
3974
  }
3996
3975
  }