turbogui-angular 20.2.0 → 20.4.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.
- package/fesm2022/turbogui-angular.mjs +72 -18
- package/fesm2022/turbogui-angular.mjs.map +1 -1
- package/main/controller/dialog.service.d.ts +40 -13
- package/main/controller/dialog.service.d.ts.map +1 -1
- package/main/controller/router-base.service.d.ts +25 -0
- package/main/controller/router-base.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ import { MatDialog } from '@angular/material/dialog';
|
|
|
3
3
|
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
|
|
4
4
|
import { BusyStateBaseComponent } from '../view/components/busy-state-base/busy-state-base.component';
|
|
5
5
|
import { DialogBaseComponent } from '../view/components/dialog-base/dialog-base.component';
|
|
6
|
+
import { DialogErrorComponent } from '../../public_api';
|
|
6
7
|
import { SingletoneStrictClass } from '../model/classes/SingletoneStrictClass';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
/**
|
|
@@ -205,19 +206,14 @@ export declare class DialogService extends SingletoneStrictClass {
|
|
|
205
206
|
* Show a dialog with a calendar to let the user pick a date.
|
|
206
207
|
*
|
|
207
208
|
* @param properties An object containing the different visual and textual options that this dialog allows:
|
|
208
|
-
* - id:
|
|
209
|
-
* - width:
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
* -
|
|
213
|
-
*
|
|
214
|
-
* -
|
|
215
|
-
* -
|
|
216
|
-
* - modal: True (default) if selecting an option is mandatory to close the dialog, false if the dialog can be closed
|
|
217
|
-
* by the user clicking outside it
|
|
218
|
-
* - title: An optional dialog title
|
|
219
|
-
* - viewContainerRef: This is important to propagate providers from a parent component to this dialog. We must specify
|
|
220
|
-
* this reference to make sure the same services injected on the parent are available too at the child dialog
|
|
209
|
+
* - id: see addDialog() docs
|
|
210
|
+
* - width: see addDialog() docs
|
|
211
|
+
* - maxWidth: see addDialog() docs
|
|
212
|
+
* - height: see addDialog() docs
|
|
213
|
+
* - maxHeight: see addDialog() docs
|
|
214
|
+
* - modal: see addDialog() docs
|
|
215
|
+
* - title: see addDialog() docs
|
|
216
|
+
* - viewContainerRef: see addDialog() docs
|
|
221
217
|
*
|
|
222
218
|
* @returns A Promise that resolves to a Date() object selected by the user or null if no selection was made
|
|
223
219
|
*/
|
|
@@ -231,6 +227,37 @@ export declare class DialogService extends SingletoneStrictClass {
|
|
|
231
227
|
title?: string;
|
|
232
228
|
viewContainerRef: ViewContainerRef;
|
|
233
229
|
}): Promise<Date | null>;
|
|
230
|
+
/**
|
|
231
|
+
* Show a dialog with an error message and a single option button to close it.
|
|
232
|
+
*
|
|
233
|
+
* This method is a shortcut for addDialog() method using DialogErrorComponent as the dialog component class
|
|
234
|
+
*
|
|
235
|
+
* @param properties An object containing the different visual and textual options that this dialog allows:
|
|
236
|
+
* - title (mandatory): The dialog title
|
|
237
|
+
* - option (mandatory): The text to place on the single option button
|
|
238
|
+
* - description: An optional description text to show below the title
|
|
239
|
+
* - id: see addDialog() docs
|
|
240
|
+
* - width: see addDialog() docs
|
|
241
|
+
* - maxWidth: see addDialog() docs
|
|
242
|
+
* - height: see addDialog() docs
|
|
243
|
+
* - maxHeight: see addDialog() docs
|
|
244
|
+
* - modal: see addDialog() docs
|
|
245
|
+
* - dialogErrorComponentClass: A custom component class to use instead of the default DialogErrorComponent. This custom component must extend DialogErrorComponent
|
|
246
|
+
*
|
|
247
|
+
* @returns A Promise that resolves once the user selects the button with the option caption
|
|
248
|
+
*/
|
|
249
|
+
addErrorDialog(properties: {
|
|
250
|
+
title: string;
|
|
251
|
+
option: string;
|
|
252
|
+
description?: string;
|
|
253
|
+
id?: string;
|
|
254
|
+
width?: string;
|
|
255
|
+
maxWidth?: string;
|
|
256
|
+
height?: string;
|
|
257
|
+
maxHeight?: string;
|
|
258
|
+
modal?: boolean;
|
|
259
|
+
dialogErrorComponentClass?: Type<DialogErrorComponent>;
|
|
260
|
+
}): Promise<null>;
|
|
234
261
|
/**
|
|
235
262
|
* Force the removal of all the dialogs that are currently visible.
|
|
236
263
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.service.d.ts","sourceRoot":"","sources":["../../../../projects/turbogui-angular/src/main/controller/dialog.service.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAc,QAAQ,EAAE,cAAc,EAAa,gBAAgB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC/I,OAAO,EAAE,SAAS,EAAgB,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAC;AAEtG,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;
|
|
1
|
+
{"version":3,"file":"dialog.service.d.ts","sourceRoot":"","sources":["../../../../projects/turbogui-angular/src/main/controller/dialog.service.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAc,QAAQ,EAAE,cAAc,EAAa,gBAAgB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC/I,OAAO,EAAE,SAAS,EAAgB,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAC;AAEtG,OAAO,EAAE,mBAAmB,EAAE,MAAM,sDAAsD,CAAC;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;;AAG/E;;GAEG;AACH,qBAGa,aAAc,SAAQ,qBAAqB;IAgGxC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,SAAS;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;;;;;;;;OAkBG;IACG,cAAc,CAAC,UAAU,EAAE;QAAC,KAAK,EAAC,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,yBAAyB,CAAC,EAAC,IAAI,CAAC,oBAAoB,CAAC,CAAA;KAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IA0BxG;;;;OAIG;IACH,gBAAgB;IAkBhB;;OAEG;IAMH;;OAEG;IAMH;;OAEG;IAKH;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAU/B;;OAEG;IACH,OAAO,CAAC,sBAAsB;yCA7mBrB,aAAa;6CAAb,aAAa;CAioBzB"}
|
|
@@ -24,6 +24,14 @@ export declare abstract class RouterBaseService implements OnDestroy {
|
|
|
24
24
|
* This should only be done once, typically at application startup.
|
|
25
25
|
*/
|
|
26
26
|
private _isTitleManagerInitialized;
|
|
27
|
+
/**
|
|
28
|
+
* @see getCurrentRouteTitle
|
|
29
|
+
*/
|
|
30
|
+
private _currentRouteTitle;
|
|
31
|
+
/**
|
|
32
|
+
* @see getCurrentBrowserTitle
|
|
33
|
+
*/
|
|
34
|
+
private _currentBrowserTitle;
|
|
27
35
|
/**
|
|
28
36
|
* Subscription to router events. This is used to update the current route URL
|
|
29
37
|
*/
|
|
@@ -60,6 +68,16 @@ export declare abstract class RouterBaseService implements OnDestroy {
|
|
|
60
68
|
* Notice that the base URL is not included in the returned value.
|
|
61
69
|
*/
|
|
62
70
|
getCurrentRoute(): string;
|
|
71
|
+
/**
|
|
72
|
+
* The current route title, translated using the LocalesService.
|
|
73
|
+
* This is updated automatically after each navigation event if the title manager is initialized.
|
|
74
|
+
*/
|
|
75
|
+
getCurrentRouteTitle(): string;
|
|
76
|
+
/**
|
|
77
|
+
* The current browser title, which may include prefixes or suffixes.
|
|
78
|
+
* This is updated automatically after each navigation event if the title manager is initialized.
|
|
79
|
+
*/
|
|
80
|
+
getCurrentBrowserTitle(): string;
|
|
63
81
|
/**
|
|
64
82
|
* Gets the current value of the route absolute URL synchronously.
|
|
65
83
|
*
|
|
@@ -93,6 +111,7 @@ export declare abstract class RouterBaseService implements OnDestroy {
|
|
|
93
111
|
* { path: '', component: HomePageComponent,
|
|
94
112
|
* data: { titleKey: 'HOME', titleBundle: 'turbodepot/user-interface'} },
|
|
95
113
|
*
|
|
114
|
+
* @param localesService An instance of the LocalesService to be used for translations.
|
|
96
115
|
* @param prefix A text to be added before the computed title.
|
|
97
116
|
* @param sufix A text to be added after the computed title.
|
|
98
117
|
*/
|
|
@@ -111,6 +130,12 @@ export declare abstract class RouterBaseService implements OnDestroy {
|
|
|
111
130
|
* @param route The route to navigate to.
|
|
112
131
|
*/
|
|
113
132
|
navigateTo(route: string): void;
|
|
133
|
+
/**
|
|
134
|
+
* Automatically called when the service is destroyed.
|
|
135
|
+
* We use it to clean up subscriptions and other resources.
|
|
136
|
+
*
|
|
137
|
+
* Usially not necessary to call this manually.
|
|
138
|
+
*/
|
|
114
139
|
ngOnDestroy(): void;
|
|
115
140
|
static ɵfac: i0.ɵɵFactoryDeclaration<RouterBaseService, never>;
|
|
116
141
|
static ɵprov: i0.ɵɵInjectableDeclaration<RouterBaseService>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router-base.service.d.ts","sourceRoot":"","sources":["../../../../projects/turbogui-angular/src/main/controller/router-base.service.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAc,SAAS,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAiB,MAAM,iBAAiB,CAAC;AAGxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;;AAG5D;;;;GAIG;AACH,8BAGsB,iBAAkB,YAAW,SAAS;
|
|
1
|
+
{"version":3,"file":"router-base.service.d.ts","sourceRoot":"","sources":["../../../../projects/turbogui-angular/src/main/controller/router-base.service.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAc,SAAS,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAiB,MAAM,iBAAiB,CAAC;AAGxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;;AAG5D;;;;GAIG;AACH,8BAGsB,iBAAkB,YAAW,SAAS;IA4C5C,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY;IA1CzC;;;OAGG;IACH,OAAO,CAAC,0BAA0B,CAAS;IAG3C;;OAEG;IACH,OAAO,CAAC,kBAAkB,CAAQ;IAGlC;;OAEG;IACH,OAAO,CAAC,oBAAoB,CAAQ;IAGpC;;OAEG;IACH,OAAO,CAAC,mBAAmB,CAA2B;IAGtD;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgD;IAG9E;;;;;OAKG;IACH,OAAO,CAAC,eAAe,CAAqB;gBAGf,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,KAAK;IAOhD;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAM3B;;;;;;OAMG;IACH,cAAc,CAAC,KAAK,EAAC,MAAM;IAM3B;;;;OAIG;IACH,eAAe,IAAG,MAAM;IAMxB;;;OAGG;IACH,oBAAoB,IAAG,MAAM;IAM7B;;;OAGG;IACH,sBAAsB,IAAG,MAAM;IAM/B;;;;OAIG;IACH,uBAAuB;IAMvB;;;;;;;;;OASG;IACH,yBAAyB,CAAC,GAAG,EAAE,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