@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.
- package/fesm2022/cccteam-ccc-lib-ccc-resource.mjs +6 -6
- package/fesm2022/cccteam-ccc-lib-ccc-resource.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-types.mjs +11 -17
- package/fesm2022/cccteam-ccc-lib-types.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-ui-alert.mjs +2 -2
- package/fesm2022/cccteam-ccc-lib-ui-alert.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-ui-idle-service.mjs +4 -4
- package/fesm2022/cccteam-ccc-lib-ui-idle-service.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-ui-interceptor.mjs +2 -2
- package/fesm2022/cccteam-ccc-lib-ui-interceptor.mjs.map +1 -1
- package/package.json +1 -1
- package/types/cccteam-ccc-lib-types.d.ts +5 -4
|
@@ -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,
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2711
|
+
type: AlertType.ERROR,
|
|
2712
2712
|
});
|
|
2713
2713
|
return;
|
|
2714
2714
|
}
|