@sumaris-net/ngx-components 1.9.9 → 1.10.0

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 (42) hide show
  1. package/bundles/sumaris-net.ngx-components.umd.js +88 -15
  2. package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
  3. package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
  4. package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
  5. package/esm2015/public_api.js +2 -2
  6. package/esm2015/src/app/core/form/editor.class.js +2 -2
  7. package/esm2015/src/app/core/home/home.js +2 -2
  8. package/esm2015/src/app/core/install/install-upgrade-card.component.js +2 -2
  9. package/esm2015/src/app/core/services/account.service.js +2 -2
  10. package/esm2015/src/app/core/services/config.service.js +2 -2
  11. package/esm2015/src/app/core/services/network.service.js +5 -5
  12. package/esm2015/src/app/core/services/platform.service.js +3 -4
  13. package/esm2015/src/app/core/services/testing/referential-filter.model.js +23 -0
  14. package/esm2015/src/app/core/services/testing/referential.validator.js +44 -0
  15. package/esm2015/src/app/core/table/table.class.js +2 -2
  16. package/esm2015/src/app/shared/shared.testing.module.js +9 -3
  17. package/esm2015/src/app/shared/toast/toast.testing.js +39 -0
  18. package/esm2015/src/app/shared/toast/toast.testing.module.js +33 -0
  19. package/esm2015/src/app/shared/toast/toasts.js +119 -0
  20. package/esm2015/src/app/social/services/user-event.service.js +2 -2
  21. package/esm2015/sumaris-net.ngx-components.js +9 -7
  22. package/fesm2015/sumaris-net.ngx-components.js +76 -10
  23. package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
  24. package/package.json +1 -1
  25. package/public_api.d.ts +1 -1
  26. package/src/app/core/form/editor.class.d.ts +1 -1
  27. package/src/app/core/home/home.d.ts +1 -1
  28. package/src/app/core/services/account.service.d.ts +1 -1
  29. package/src/app/core/services/config.service.d.ts +1 -1
  30. package/src/app/core/services/network.service.d.ts +1 -1
  31. package/src/app/core/services/platform.service.d.ts +1 -1
  32. package/src/app/core/services/testing/referential-filter.model.d.ts +9 -0
  33. package/src/app/core/services/testing/referential.validator.d.ts +19 -0
  34. package/src/app/core/table/table.class.d.ts +1 -1
  35. package/src/app/shared/shared.testing.module.d.ts +2 -0
  36. package/src/app/shared/toast/toast.testing.d.ts +14 -0
  37. package/src/app/shared/toast/toast.testing.module.d.ts +2 -0
  38. package/src/app/shared/{toasts.d.ts → toast/toasts.d.ts} +0 -0
  39. package/src/app/social/services/user-event.service.d.ts +1 -1
  40. package/sumaris-net.ngx-components.d.ts +8 -6
  41. package/sumaris-net.ngx-components.metadata.json +1 -1
  42. package/esm2015/src/app/shared/toasts.js +0 -119
@@ -12277,7 +12277,7 @@
12277
12277
  this.onNetworkStatusChanges.next(currentConnectionType);
12278
12278
  // Offline mode: alert the user
12279
12279
  if (currentConnectionType === 'none' && (!opts || opts.showToast !== false)) {
12280
- this.showToast({ message: 'NETWORK.INFO.OFFLINE_HELP' });
12280
+ this.showToast({ message: 'NETWORK.INFO.OFFLINE_HELP', type: 'warning' });
12281
12281
  }
12282
12282
  }
12283
12283
  }
@@ -12534,11 +12534,11 @@
12534
12534
  // Force offline mode
12535
12535
  this._forceOffline = true;
12536
12536
  // Alert the user
12537
- this.showToast({ message: 'NETWORK.INFO.OFFLINE_HELP' });
12537
+ this.showToast({ message: 'NETWORK.INFO.OFFLINE_HELP', type: 'warning' });
12538
12538
  }
12539
12539
  else {
12540
12540
  // Alert the user
12541
- this.showToast({ message: 'NETWORK.INFO.OFFLINE' });
12541
+ this.showToast({ message: 'NETWORK.INFO.OFFLINE', type: 'warning' });
12542
12542
  }
12543
12543
  // Stop the network service
12544
12544
  this.stop();
@@ -17678,8 +17678,7 @@
17678
17678
  case 3:
17679
17679
  now = Date.now();
17680
17680
  console.info("[platform] Starting storage migration...");
17681
- return [4 /*yield*/, this.showToast({ message: 'INFO.DATA_MIGRATION_STARTED',
17682
- duration: 30000 })];
17681
+ return [4 /*yield*/, this.showToast({ message: 'INFO.DATA_MIGRATION_STARTED', type: 'info', duration: 30000 })];
17683
17682
  case 4:
17684
17683
  toast_1 = _b.sent();
17685
17684
  _b.label = 5;
@@ -19807,7 +19806,7 @@
19807
19806
  },] }
19808
19807
  ];
19809
19808
 
19810
- var routes$1 = [
19809
+ var routes$2 = [
19811
19810
  {
19812
19811
  path: '',
19813
19812
  pathMatch: 'full',
@@ -19862,7 +19861,7 @@
19862
19861
  i1.ReactiveFormsModule,
19863
19862
  SharedMaterialModule,
19864
19863
  i1$2.TranslateModule.forChild(),
19865
- i3.RouterModule.forChild(routes$1)
19864
+ i3.RouterModule.forChild(routes$2)
19866
19865
  ],
19867
19866
  declarations: [
19868
19867
  MaterialTestingPage,
@@ -19888,6 +19887,75 @@
19888
19887
  },] }
19889
19888
  ];
19890
19889
 
19890
+ var ToastTestingPage = /** @class */ (function () {
19891
+ function ToastTestingPage(toastController, translate) {
19892
+ this.toastController = toastController;
19893
+ this.translate = translate;
19894
+ this.defaultOptions = {
19895
+ showCloseButton: false
19896
+ };
19897
+ }
19898
+ ToastTestingPage.prototype.showToast = function (opts) {
19899
+ return Toasts.show(this.toastController, this.translate, Object.assign(Object.assign(Object.assign({}, this.defaultOptions), { message: 'This is a message' }), opts));
19900
+ };
19901
+ ToastTestingPage.prototype.showInfo = function (opts) {
19902
+ return this.showToast(Object.assign({ type: 'info', message: 'This is a info text !' }, opts));
19903
+ };
19904
+ ToastTestingPage.prototype.showWarning = function (opts) {
19905
+ return this.showToast(Object.assign({ type: 'warning', message: 'This is a warning text !' }, opts));
19906
+ };
19907
+ ToastTestingPage.prototype.showError = function (opts) {
19908
+ return this.showToast(Object.assign({ type: 'error', message: 'This is a error text !' }, opts));
19909
+ };
19910
+ ToastTestingPage.prototype.toggleCloseButton = function () {
19911
+ this.defaultOptions.showCloseButton = !this.defaultOptions.showCloseButton;
19912
+ };
19913
+ return ToastTestingPage;
19914
+ }());
19915
+ ToastTestingPage.decorators = [
19916
+ { type: i0.Component, args: [{
19917
+ selector: 'toast-testing',
19918
+ template: "<ion-toolbar color=\"primary\">\n <ion-title>Toasts</ion-title>\n</ion-toolbar>\n\n<ion-content class=\"ion-padding\">\n\n <p>Toast examples:</p>\n\n <ion-button (click)=\"showToast()\" color=\"dark\">\n default\n </ion-button>\n\n <ion-button (click)=\"showInfo({duration: 100000})\" color=\"secondary\">\n info\n </ion-button>\n\n <ion-button (click)=\"showWarning()\" color=\"accent\">\n warning\n </ion-button>\n\n <ion-button (click)=\"showError()\" color=\"danger\">\n error\n </ion-button>\n\n <br/>\n\n\n <ion-list>\n\n\n <ion-item>\n <ion-checkbox slot=\"start\" [value]=\"defaultOptions.showCloseButton\" (ionChange)=\"toggleCloseButton()\"></ion-checkbox>\n <ion-label>Close button ?</ion-label>\n </ion-item>\n </ion-list>\n\n\n</ion-content>\n"
19919
+ },] }
19920
+ ];
19921
+ ToastTestingPage.ctorParameters = function () { return [
19922
+ { type: i1$5.ToastController },
19923
+ { type: i1$2.TranslateService }
19924
+ ]; };
19925
+
19926
+ var routes$1 = [
19927
+ {
19928
+ path: 'toast',
19929
+ pathMatch: 'full',
19930
+ component: ToastTestingPage
19931
+ }
19932
+ ];
19933
+ var ToastTestingModule = /** @class */ (function () {
19934
+ function ToastTestingModule() {
19935
+ }
19936
+ return ToastTestingModule;
19937
+ }());
19938
+ ToastTestingModule.decorators = [
19939
+ { type: i0.NgModule, args: [{
19940
+ imports: [
19941
+ i1$4.CommonModule,
19942
+ i1$5.IonicModule,
19943
+ i1$2.TranslateModule.forChild(),
19944
+ i3.RouterModule.forChild(routes$1)
19945
+ ],
19946
+ declarations: [
19947
+ ToastTestingPage
19948
+ ],
19949
+ exports: [
19950
+ i3.RouterModule,
19951
+ ToastTestingPage
19952
+ ]
19953
+ },] }
19954
+ ];
19955
+
19956
+ var SHARED_TESTING_PAGES = [
19957
+ { label: 'Toast', page: '/testing/shared/toast' }
19958
+ ];
19891
19959
  var SharedTestingModule = /** @class */ (function () {
19892
19960
  function SharedTestingModule() {
19893
19961
  }
@@ -19898,10 +19966,12 @@
19898
19966
  imports: [
19899
19967
  i1$4.CommonModule,
19900
19968
  i1$2.TranslateModule.forChild(),
19901
- MaterialTestingModule
19969
+ MaterialTestingModule,
19970
+ ToastTestingModule
19902
19971
  ],
19903
19972
  exports: [
19904
- MaterialTestingModule
19973
+ MaterialTestingModule,
19974
+ ToastTestingModule
19905
19975
  ]
19906
19976
  },] }
19907
19977
  ];
@@ -29378,6 +29448,7 @@
29378
29448
  exports.SETTINGS_SORTED_COLUMN = SETTINGS_SORTED_COLUMN;
29379
29449
  exports.SETTINGS_STORAGE_KEY = SETTINGS_STORAGE_KEY;
29380
29450
  exports.SETTINGS_TRANSIENT_PROPERTIES = SETTINGS_TRANSIENT_PROPERTIES;
29451
+ exports.SHARED_TESTING_PAGES = SHARED_TESTING_PAGES;
29381
29452
  exports.SPACE_PLACEHOLDER_CHAR = SPACE_PLACEHOLDER_CHAR;
29382
29453
  exports.SelectPeerModal = SelectPeerModal;
29383
29454
  exports.SettingsPage = SettingsPage;
@@ -29568,12 +29639,14 @@
29568
29639
  exports["ɵd"] = MatBadgeIconDirective;
29569
29640
  exports["ɵe"] = isFocusableElement;
29570
29641
  exports["ɵf"] = MatBadgeIconTestPage;
29571
- exports["ɵg"] = RegisterForm;
29572
- exports["ɵh"] = AccountValidatorService;
29573
- exports["ɵi"] = RegisterModal;
29574
- exports["ɵj"] = UserSettingsValidatorService;
29575
- exports["ɵk"] = LocalSettingsValidatorService;
29576
- exports["ɵl"] = AppIconComponent;
29642
+ exports["ɵg"] = ToastTestingModule;
29643
+ exports["ɵh"] = ToastTestingPage;
29644
+ exports["ɵi"] = RegisterForm;
29645
+ exports["ɵj"] = AccountValidatorService;
29646
+ exports["ɵk"] = RegisterModal;
29647
+ exports["ɵl"] = UserSettingsValidatorService;
29648
+ exports["ɵm"] = LocalSettingsValidatorService;
29649
+ exports["ɵn"] = AppIconComponent;
29577
29650
 
29578
29651
  Object.defineProperty(exports, '__esModule', { value: true });
29579
29652