ngx-dev-toolbar 3.1.0 → 3.2.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/README.md CHANGED
@@ -32,22 +32,25 @@
32
32
  npm install ngx-dev-toolbar
33
33
  ```
34
34
 
35
- ### 2. Initialize in main.ts
35
+ ### 2. Add to app.config.ts
36
36
 
37
37
  ```typescript
38
- import { bootstrapApplication } from '@angular/platform-browser';
39
- import { isDevMode } from '@angular/core';
40
-
41
- async function bootstrap() {
42
- const appRef = await bootstrapApplication(AppComponent, appConfig);
43
-
44
- if (isDevMode()) {
45
- const { initToolbar } = await import('ngx-dev-toolbar');
46
- initToolbar(appRef);
47
- }
48
- }
38
+ import { ApplicationConfig, isDevMode } from '@angular/core';
39
+ import { provideToolbar } from 'ngx-dev-toolbar';
40
+
41
+ export const appConfig: ApplicationConfig = {
42
+ providers: [
43
+ provideRouter(appRoutes),
44
+ provideToolbar({
45
+ enabled: isDevMode(),
46
+ }),
47
+ ],
48
+ };
49
+ ```
49
50
 
50
- bootstrap();
51
+ ```typescript
52
+ // main.ts
53
+ bootstrapApplication(AppComponent, appConfig);
51
54
  ```
52
55
 
53
56
  That's it! No template changes needed. The toolbar automatically attaches to the DOM.
@@ -154,15 +157,14 @@ export class AppComponent {
154
157
  Customize which tools are visible:
155
158
 
156
159
  ```typescript
157
- initToolbar(appRef, {
158
- config: {
159
- showFeatureFlagsTool: true,
160
- showPermissionsTool: true,
161
- showLanguageTool: true,
162
- showAppFeaturesTool: true,
163
- showPresetsTool: true,
164
- }
165
- });
160
+ provideToolbar({
161
+ enabled: isDevMode(),
162
+ showFeatureFlagsTool: true,
163
+ showPermissionsTool: true,
164
+ showLanguageTool: true,
165
+ showAppFeaturesTool: true,
166
+ showPresetsTool: true,
167
+ })
166
168
  ```
167
169
 
168
170
  ### Keyboard Shortcuts
@@ -12,14 +12,16 @@ export declare class ToolbarSelectComponent {
12
12
  ariaLabel: import("@angular/core").InputSignal<string>;
13
13
  label: import("@angular/core").InputSignal<string>;
14
14
  size: import("@angular/core").InputSignal<"small" | "medium">;
15
+ placeholder: import("@angular/core").InputSignal<string>;
15
16
  readonly theme: import("@angular/core").Signal<"light" | "dark">;
16
17
  protected readonly selectMenuId: string;
17
18
  isOpen: import("@angular/core").WritableSignal<boolean>;
19
+ isPlaceholder: import("@angular/core").Signal<boolean>;
18
20
  selectedLabel: import("@angular/core").Signal<string>;
19
21
  positions: ConnectedPosition[];
20
22
  toggle(): void;
21
23
  close(): void;
22
24
  selectOption(option: SelectOption): void;
23
25
  static ɵfac: i0.ɵɵFactoryDeclaration<ToolbarSelectComponent, never>;
24
- static ɵcmp: i0.ɵɵComponentDeclaration<ToolbarSelectComponent, "ngt-select", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": true; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<ToolbarSelectComponent, "ngt-select", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": true; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
25
27
  }