@sumaris-net/ngx-components 2.2.3 → 2.2.5

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.
Files changed (35) hide show
  1. package/doc/changelog.md +7 -0
  2. package/esm2020/src/app/core/form/form.utils.mjs +1 -2
  3. package/esm2020/src/app/core/menu/menu.component.mjs +14 -7
  4. package/esm2020/src/app/core/table/table.class.mjs +3 -3
  5. package/esm2020/src/app/shared/dates.mjs +2 -2
  6. package/fesm2015/sumaris-net.ngx-components.mjs +14 -9
  7. package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
  8. package/fesm2020/sumaris-net.ngx-components.mjs +14 -9
  9. package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/README.md +5 -6
  12. package/src/app/core/form/form.utils.d.ts +0 -1
  13. package/src/app/core/table/table.class.d.ts +3 -1
  14. package/plugins/clovelced-plugin-audiomanagement/README.md +0 -66
  15. package/plugins/cordova-plugin-camera/README.md +0 -703
  16. package/plugins/cordova-plugin-device/README.md +0 -309
  17. package/plugins/cordova-plugin-file/README.md +0 -848
  18. package/plugins/cordova-plugin-file-transfer/README.md +0 -598
  19. package/plugins/cordova-plugin-file-transfer/doc/de/README.md +0 -311
  20. package/plugins/cordova-plugin-file-transfer/doc/es/README.md +0 -311
  21. package/plugins/cordova-plugin-file-transfer/doc/fr/README.md +0 -270
  22. package/plugins/cordova-plugin-file-transfer/doc/it/README.md +0 -311
  23. package/plugins/cordova-plugin-file-transfer/doc/ja/README.md +0 -311
  24. package/plugins/cordova-plugin-file-transfer/doc/ko/README.md +0 -311
  25. package/plugins/cordova-plugin-file-transfer/doc/pl/README.md +0 -311
  26. package/plugins/cordova-plugin-file-transfer/doc/zh/README.md +0 -311
  27. package/plugins/cordova-plugin-ionic-keyboard/README.md +0 -220
  28. package/plugins/cordova-plugin-ionic-webview/README.md +0 -181
  29. package/plugins/cordova-plugin-media-capture/README.md +0 -626
  30. package/plugins/cordova-plugin-splashscreen/README.md +0 -387
  31. package/plugins/cordova-plugin-statusbar/README.md +0 -341
  32. package/plugins/cordova-plugin-telerik-imagepicker/README.md +0 -155
  33. package/plugins/cordova-plugin-whitelist/README.md +0 -185
  34. package/plugins/cordova-sqlite-storage/README.md +0 -1848
  35. package/plugins/integrator-cordova-plugin-downloader/README.md +0 -49
@@ -2610,7 +2610,7 @@ class DateUtils {
2610
2610
  static isSame(date1, date2, granularity) {
2611
2611
  const d1 = fromDateISOString(date1);
2612
2612
  const d2 = fromDateISOString(date2);
2613
- return (!d1 && !d2) || d1.isSame(d2, granularity);
2613
+ return (!d1 && !d2) || (d1 && d1.isSame(d2, granularity));
2614
2614
  }
2615
2615
  /**
2616
2616
  * Create a copy of a date, without time fields (always return a new Moment object, or undefined).
@@ -4530,7 +4530,6 @@ class FormArrayHelper {
4530
4530
  /**
4531
4531
  * @param value
4532
4532
  * @param options
4533
- * @deprecated Use push() instead
4534
4533
  */
4535
4534
  add(value, options) {
4536
4535
  return addValueInArray(this._formArray, this.createControl, this.equals, this.isEmpty, value, options);
@@ -21375,11 +21374,17 @@ class MenuComponent {
21375
21374
  .pipe(distinctUntilChanged())
21376
21375
  .subscribe((value) => value ? this.open() : this.close());
21377
21376
  // Update component when refresh is need (=login events or config changed)
21378
- this._subscription.add(merge(merge(this.accountService.onLogin, this.accountService.onLogout)
21377
+ this._subscription.add(merge(merge(this.accountService.onLogin
21379
21378
  .pipe(
21379
+ // DEBUG
21380
+ //tap(account => console.debug('[menu] Receiving login event', account)),
21381
+ distinctUntilChanged((a1, a2) => !DateUtils.isSame(a1?.updateDate, a2?.updateDate))), this.configService.config
21382
+ .pipe(tap(config => this._config = config)))
21383
+ .pipe(
21384
+ // Add debounce to avoid to trigger twice, at startup
21385
+ debounceTime(250),
21380
21386
  // Wait account service ready (can be restarted)
21381
- mergeMap(() => this.accountService.ready()), map(() => this.accountService.isLogin()), distinctUntilChanged()), this.configService.config
21382
- .pipe(tap(config => this._config = config), mergeMap(() => this.accountService.ready()), map(() => this.accountService.isLogin())))
21387
+ mergeMap(() => this.accountService.ready()), map(() => this.accountService.isLogin())), this.accountService.onLogout)
21383
21388
  .subscribe(login => {
21384
21389
  if (login) {
21385
21390
  this.onLogin(this.accountService.account);
@@ -21390,7 +21395,7 @@ class MenuComponent {
21390
21395
  }));
21391
21396
  }
21392
21397
  async onLogin(account) {
21393
- console.info('[menu] Update (login)');
21398
+ console.info('[menu] Update (on login)');
21394
21399
  this.accountAvatar = account.avatar;
21395
21400
  this.accountName = account.displayName;
21396
21401
  this.accountEmail = account.email;
@@ -21406,7 +21411,7 @@ class MenuComponent {
21406
21411
  console.debug('[menu] Logout');
21407
21412
  }
21408
21413
  else {
21409
- console.debug('[menu] Update (logout)');
21414
+ console.debug('[menu] Update (on logout)');
21410
21415
  }
21411
21416
  this.isLogin = false;
21412
21417
  this.accountAvatar = null;
@@ -26156,8 +26161,8 @@ class AppTable {
26156
26161
  rows.forEach(row => this.selection.select(row));
26157
26162
  }
26158
26163
  }
26159
- deleteSelection(event) {
26160
- return this.deleteRows(event, this.selection.selected);
26164
+ deleteSelection(event, opts) {
26165
+ return this.deleteRows(event, this.selection.selected, opts);
26161
26166
  }
26162
26167
  /**
26163
26168
  *