@cccteam/ccc-lib 0.0.27 → 0.0.29

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.
@@ -7,7 +7,7 @@ import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule, MatDialogActions, MatDi
7
7
  import * as i9 from '@angular/router';
8
8
  import { Router, ActivatedRoute, RouterModule } from '@angular/router';
9
9
  import { FormStateService } from '@cccteam/ccc-lib/ccc-resource-services';
10
- import { createResourceValidator, defaultEmptyFieldValue, API_URL, METHOD_META, AlertLevel, RESOURCE_META, validatorsPresent, rpcConfigDefaults } from '@cccteam/ccc-lib/types';
10
+ import { createResourceValidator, defaultEmptyFieldValue, API_URL, METHOD_META, AlertType, RESOURCE_META, validatorsPresent, rpcConfigDefaults } from '@cccteam/ccc-lib/types';
11
11
  import { NotificationService } from '@cccteam/ccc-lib/ui-notification-service';
12
12
  import { tap, of, filter } from 'rxjs';
13
13
  import * as i3 from '@angular/forms';
@@ -360,7 +360,7 @@ class ResourceStore {
360
360
  return this.patchMultiple(String(route), operations).pipe(tap(() => {
361
361
  this.notifications.addGlobalNotification({
362
362
  message: `${resource} updated successfully`,
363
- level: AlertLevel.SUCCESS,
363
+ type: AlertType.SUCCESS,
364
364
  duration: 5000,
365
365
  link: '',
366
366
  });
@@ -370,7 +370,7 @@ class ResourceStore {
370
370
  return this.patchMultiple(String(route), [operation]).pipe(tap(() => {
371
371
  this.notifications.addGlobalNotification({
372
372
  message: `${resource} created successfully`,
373
- level: AlertLevel.SUCCESS,
373
+ type: AlertType.SUCCESS,
374
374
  duration: 5000,
375
375
  link: '',
376
376
  });
@@ -447,7 +447,7 @@ class ResourceStore {
447
447
  return this.http.post(this.routes.method(this.apiUrl, methodData.route), body).pipe(tap(() => {
448
448
  this.notifications.addGlobalNotification({
449
449
  message: rpcConfig.successMessage ? rpcConfig.successMessage : `${rpcConfig.method} called successfully`,
450
- level: AlertLevel.SUCCESS,
450
+ type: AlertType.SUCCESS,
451
451
  duration: 5000,
452
452
  link: '',
453
453
  });
@@ -1562,7 +1562,7 @@ class RpcButtonComponent {
1562
1562
  this.notifications.addGlobalNotification({
1563
1563
  message: 'Value not found for field: ' + value.field,
1564
1564
  link: '',
1565
- level: AlertLevel.ERROR,
1565
+ type: AlertType.ERROR,
1566
1566
  });
1567
1567
  canSubmitRPC = false;
1568
1568
  return;
@@ -2708,7 +2708,7 @@ class ResourceViewComponent {
2708
2708
  this.notifications.addGlobalNotification({
2709
2709
  message: 'You have unsaved changes.',
2710
2710
  link: '',
2711
- level: AlertLevel.ERROR,
2711
+ type: AlertType.ERROR,
2712
2712
  });
2713
2713
  return;
2714
2714
  }