ngx-dev-toolbar 1.0.0-beta.1 → 1.0.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 (116) hide show
  1. package/README.md +254 -4
  2. package/eslint.config.cjs +47 -0
  3. package/ng-package.json +7 -0
  4. package/package.json +8 -23
  5. package/project.json +37 -0
  6. package/src/components/button/button.component.scss +49 -0
  7. package/src/components/button/button.component.ts +36 -0
  8. package/src/components/card/card.component.scss +18 -0
  9. package/src/components/card/card.component.ts +30 -0
  10. package/src/components/clickable-card/clickable-card.component.scss +39 -0
  11. package/src/components/clickable-card/clickable-card.component.ts +34 -0
  12. package/src/components/icons/angular-icon.component.ts +35 -0
  13. package/src/components/icons/bug-icon.component.ts +23 -0
  14. package/src/components/icons/code-icon.component.ts +24 -0
  15. package/src/components/icons/database-icon.component.ts +27 -0
  16. package/src/components/icons/discord-icon.component.ts +23 -0
  17. package/src/components/icons/docs-icon.component.ts +23 -0
  18. package/src/components/icons/export-icon.component.ts +23 -0
  19. package/src/components/icons/gauge-icon.component.ts +27 -0
  20. package/src/components/icons/gear-icon.component.ts +27 -0
  21. package/src/components/icons/git-branch-icon.component.ts +27 -0
  22. package/src/components/icons/icon.component.ts +129 -0
  23. package/src/components/icons/icon.models.ts +27 -0
  24. package/src/components/icons/import-icon.component.ts +23 -0
  25. package/src/components/icons/layout-icon.component.ts +24 -0
  26. package/src/components/icons/lightbulb-icon.component.ts +23 -0
  27. package/src/components/icons/lighting-icon.component.ts +24 -0
  28. package/src/components/icons/moon-icon.component.ts +27 -0
  29. package/src/components/icons/network-icon.component.ts +27 -0
  30. package/src/components/icons/puzzle-icon.component.ts +27 -0
  31. package/src/components/icons/refresh-icon.component.ts +27 -0
  32. package/src/components/icons/star-icon.component.ts +27 -0
  33. package/src/components/icons/sun-icon.component.ts +27 -0
  34. package/src/components/icons/terminal-icon.component.ts +27 -0
  35. package/src/components/icons/toggle-left-icon.component.ts +27 -0
  36. package/src/components/icons/translate-icon.component.ts +23 -0
  37. package/src/components/icons/trash-icon.component.ts +23 -0
  38. package/src/components/icons/users-icon.component.ts +27 -0
  39. package/src/components/input/input.component.ts +67 -0
  40. package/src/components/link-button/link-button.component.scss +36 -0
  41. package/src/components/link-button/link-button.component.ts +29 -0
  42. package/src/components/select/select.component.scss +162 -0
  43. package/src/components/select/select.component.ts +127 -0
  44. package/src/components/tool-button/tool-button.component.scss +67 -0
  45. package/src/components/tool-button/tool-button.component.ts +126 -0
  46. package/src/components/toolbar-tool/toolbar-tool.component.scss +9 -0
  47. package/src/components/toolbar-tool/toolbar-tool.component.ts +169 -0
  48. package/src/components/toolbar-tool/toolbar-tool.models.ts +33 -0
  49. package/src/components/window/window.component.scss +95 -0
  50. package/src/components/window/window.component.ts +69 -0
  51. package/src/dev-toolbar-state.service.ts +89 -0
  52. package/src/dev-toolbar.component.scss +22 -0
  53. package/src/dev-toolbar.component.ts +105 -0
  54. package/src/index.ts +10 -0
  55. package/src/models/dev-tools.interface.ts +19 -0
  56. package/src/styles.scss +342 -0
  57. package/src/test-setup.ts +12 -0
  58. package/src/tools/feature-flags-tool/feature-flags-internal.service.ts +96 -0
  59. package/src/tools/feature-flags-tool/feature-flags-tool.component.ts +261 -0
  60. package/src/tools/feature-flags-tool/feature-flags.models.ts +10 -0
  61. package/src/tools/feature-flags-tool/feature-flags.service.ts +28 -0
  62. package/src/tools/home-tool/home-tool.component.scss +67 -0
  63. package/src/tools/home-tool/home-tool.component.ts +197 -0
  64. package/{tools/settings-tool/settings.models.d.ts → src/tools/home-tool/settings.models.ts} +1 -1
  65. package/src/tools/home-tool/settings.service.spec.ts +59 -0
  66. package/src/tools/home-tool/settings.service.ts +21 -0
  67. package/src/tools/language-tool/language-internal.service.ts +51 -0
  68. package/src/tools/language-tool/language-tool.component.scss +7 -0
  69. package/src/tools/language-tool/language-tool.component.ts +71 -0
  70. package/src/tools/language-tool/language.models.ts +4 -0
  71. package/src/tools/language-tool/language.service.ts +26 -0
  72. package/src/utils/storage.service.spec.ts +179 -0
  73. package/src/utils/storage.service.ts +80 -0
  74. package/tsconfig.json +28 -0
  75. package/tsconfig.lib.json +28 -0
  76. package/tsconfig.lib.prod.json +9 -0
  77. package/tsconfig.spec.json +29 -0
  78. package/vite.config.mts +27 -0
  79. package/components/button/button.component.d.ts +0 -12
  80. package/components/icons/angular-icon.component.d.ts +0 -5
  81. package/components/icons/bug-icon.component.d.ts +0 -6
  82. package/components/icons/code-icon.component.d.ts +0 -6
  83. package/components/icons/database-icon.component.d.ts +0 -6
  84. package/components/icons/gauge-icon.component.d.ts +0 -6
  85. package/components/icons/gear-icon.component.d.ts +0 -6
  86. package/components/icons/git-branch-icon.component.d.ts +0 -6
  87. package/components/icons/icon.component.d.ts +0 -9
  88. package/components/icons/icon.models.d.ts +0 -1
  89. package/components/icons/layout-icon.component.d.ts +0 -6
  90. package/components/icons/lighting-icon.component.d.ts +0 -6
  91. package/components/icons/moon-icon.component.d.ts +0 -6
  92. package/components/icons/network-icon.component.d.ts +0 -6
  93. package/components/icons/puzzle-icon.component.d.ts +0 -6
  94. package/components/icons/refresh-icon.component.d.ts +0 -6
  95. package/components/icons/star-icon.component.d.ts +0 -6
  96. package/components/icons/sun-icon.component.d.ts +0 -6
  97. package/components/icons/terminal-icon.component.d.ts +0 -6
  98. package/components/icons/toggle-left-icon.component.d.ts +0 -6
  99. package/components/icons/users-icon.component.d.ts +0 -6
  100. package/components/input/input.component.d.ts +0 -10
  101. package/components/select/select.component.d.ts +0 -14
  102. package/components/tool-button/tool-button.component.d.ts +0 -23
  103. package/components/toolbar-tool/toolbar-tool.component.d.ts +0 -28
  104. package/components/window/window.component.d.ts +0 -16
  105. package/components/window/window.models.d.ts +0 -20
  106. package/dev-toolbar-state.service.d.ts +0 -18
  107. package/dev-toolbar.component.d.ts +0 -17
  108. package/fesm2022/ngx-dev-toolbar.mjs +0 -2073
  109. package/fesm2022/ngx-dev-toolbar.mjs.map +0 -1
  110. package/index.d.ts +0 -3
  111. package/tools/feature-flags-tool/feature-flags-tool.component.d.ts +0 -33
  112. package/tools/feature-flags-tool/feature-flags.models.d.ts +0 -9
  113. package/tools/feature-flags-tool/feature-flags.service.d.ts +0 -35
  114. package/tools/settings-tool/settings-tool.component.d.ts +0 -15
  115. package/tools/settings-tool/settings.service.d.ts +0 -10
  116. package/utils/storage.service.d.ts +0 -9
@@ -0,0 +1,7 @@
1
+ .language-select {
2
+ display: flex;
3
+ flex-direction: row;
4
+ gap: 0.5rem;
5
+ align-items: center;
6
+ justify-content: space-between;
7
+ }
@@ -0,0 +1,71 @@
1
+ import { Component, inject, signal } from '@angular/core';
2
+ import { toSignal } from '@angular/core/rxjs-interop';
3
+ import { firstValueFrom, map } from 'rxjs';
4
+ import { DevToolbarSelectComponent } from '../../components/select/select.component';
5
+ import { DevToolbarToolComponent } from '../../components/toolbar-tool/toolbar-tool.component';
6
+ import { DevToolbarWindowOptions } from '../../components/toolbar-tool/toolbar-tool.models';
7
+ import { DevToolbarInternalLanguageService } from './language-internal.service';
8
+ import { Language } from './language.models';
9
+
10
+ @Component({
11
+ selector: 'ndt-language-tool',
12
+ standalone: true,
13
+ imports: [DevToolbarToolComponent, DevToolbarSelectComponent],
14
+ styleUrls: ['./language-tool.component.scss'],
15
+ template: `
16
+ <ndt-toolbar-tool title="Languages" icon="translate" [options]="options">
17
+ <div class="language-select">
18
+ <label for="language-select">Language</label>
19
+ <ndt-select
20
+ id="language-select"
21
+ [value]="activeLanguage()"
22
+ [options]="languageOptions()"
23
+ [size]="'medium'"
24
+ (valueChange)="onLanguageChange($event ?? '')"
25
+ />
26
+ </div>
27
+ </ndt-toolbar-tool>
28
+ `,
29
+ })
30
+ export class DevToolbarLanguageToolComponent {
31
+ private readonly languageService = inject(DevToolbarInternalLanguageService);
32
+
33
+ protected readonly options = {
34
+ title: 'Languages',
35
+ description: 'Set the language for your current session',
36
+ size: 'small',
37
+ id: 'ndt-language',
38
+ isBeta: true,
39
+ isClosable: true,
40
+ } as DevToolbarWindowOptions;
41
+
42
+ activeLanguage = signal<string>('not-forced');
43
+
44
+ languageOptions = toSignal(
45
+ this.languageService.getAppLanguages().pipe(
46
+ map((languages) => [
47
+ { value: 'not-forced', label: 'Not Forced' },
48
+ ...languages.map(({ id: value, name: label }) => ({
49
+ value,
50
+ label,
51
+ })),
52
+ ])
53
+ ),
54
+ { initialValue: [] }
55
+ );
56
+
57
+ async onLanguageChange(language: string): Promise<void> {
58
+ if (language === 'not-forced' || !language) {
59
+ this.languageService.removeForcedLanguage();
60
+ return;
61
+ }
62
+
63
+ const languages = await firstValueFrom(
64
+ this.languageService.getAppLanguages()
65
+ );
66
+ const selectedLanguage = languages.find(({ id }) => id === language);
67
+ if (selectedLanguage) {
68
+ this.languageService.setForcedLanguage(selectedLanguage as Language);
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,4 @@
1
+ export interface Language {
2
+ id: string;
3
+ name: string;
4
+ }
@@ -0,0 +1,26 @@
1
+ import { inject, Injectable } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { DevToolsService } from '../../models/dev-tools.interface';
4
+ import { DevToolbarInternalLanguageService } from './language-internal.service';
5
+ import { Language } from './language.models';
6
+
7
+ @Injectable({ providedIn: 'root' })
8
+ export class DevToolbarLanguageService implements DevToolsService<Language> {
9
+ private internalService = inject(DevToolbarInternalLanguageService);
10
+
11
+ /**
12
+ * Sets the available languages that will be displayed in the tool on the dev toolbar
13
+ * @param languages The languages to be displayed
14
+ */
15
+ setAvailableOptions(languages: Language[]): void {
16
+ this.internalService.setAppLanguages(languages);
17
+ }
18
+
19
+ /**
20
+ * Gets the languages that were forced/modified through the tool on the dev toolbar
21
+ * @returns Observable of forced languages array
22
+ */
23
+ getForcedValues(): Observable<Language[]> {
24
+ return this.internalService.getForcedLanguage();
25
+ }
26
+ }
@@ -0,0 +1,179 @@
1
+ import { TestBed } from '@angular/core/testing';
2
+ import { DevToolsStorageService } from './storage.service';
3
+
4
+ describe('DevToolsStorageService', () => {
5
+ let service: DevToolsStorageService;
6
+ let storageMock: { [key: string]: string };
7
+
8
+ beforeAll(() => {
9
+ storageMock = {};
10
+ const mockLocalStorage = {
11
+ getItem: (key: string): string | null => storageMock[key] || null,
12
+ setItem: (key: string, value: string): void => {
13
+ storageMock[key] = value;
14
+ },
15
+ removeItem: (key: string): void => {
16
+ delete storageMock[key];
17
+ },
18
+ clear: (): void => {
19
+ storageMock = {};
20
+ },
21
+ length: 0,
22
+ key: (): string => '',
23
+ };
24
+
25
+ Object.defineProperty(window, 'localStorage', {
26
+ value: mockLocalStorage,
27
+ });
28
+ });
29
+
30
+ beforeEach(() => {
31
+ storageMock = {};
32
+ TestBed.configureTestingModule({
33
+ providers: [DevToolsStorageService],
34
+ });
35
+ service = TestBed.inject(DevToolsStorageService);
36
+ });
37
+
38
+ describe('set', () => {
39
+ it('should store value in localStorage with prefix', () => {
40
+ const key = 'testKey';
41
+ const value = { test: 'value' };
42
+
43
+ service.set(key, value);
44
+
45
+ const storedValue = JSON.parse(
46
+ storageMock['AngularDevTools.testKey'] ?? '{}'
47
+ );
48
+ expect(storedValue).toEqual(value);
49
+ });
50
+
51
+ it('should add key to tool keys', () => {
52
+ const key = 'testKey';
53
+ const value = { test: 'value' };
54
+
55
+ service.set(key, value);
56
+
57
+ const toolKeys = JSON.parse(storageMock['AngularDevTools.keys'] ?? '[]');
58
+ expect(toolKeys).toContain('AngularDevTools.testKey');
59
+ });
60
+ });
61
+
62
+ describe('get', () => {
63
+ it('should retrieve stored value', () => {
64
+ const key = 'testKey';
65
+ const value = { test: 'value' };
66
+ service.set(key, value);
67
+
68
+ const result = service.get<{ test: string }>(key);
69
+
70
+ expect(result).toEqual(value);
71
+ });
72
+
73
+ it('should return null for non-existent key', () => {
74
+ const key = 'nonExistentKey';
75
+
76
+ const result = service.get(key);
77
+
78
+ expect(result).toBeNull();
79
+ });
80
+ });
81
+
82
+ describe('remove', () => {
83
+ it('should remove value from localStorage', () => {
84
+ const key = 'testKey';
85
+ const value = { test: 'value' };
86
+ service.set(key, value);
87
+
88
+ service.remove(key);
89
+
90
+ expect(storageMock['ndt-testKey']).toBeUndefined();
91
+ });
92
+
93
+ it('should keep other values in localStorage', () => {
94
+ const key1 = 'key1';
95
+ const key2 = 'key2';
96
+ service.set(key1, { value: 1 });
97
+ service.set(key2, { value: 2 });
98
+
99
+ service.remove(key1);
100
+
101
+ expect(service.get(key2)).toEqual({ value: 2 });
102
+ });
103
+ });
104
+
105
+ describe('getAllSettings', () => {
106
+ it('should return all stored settings', () => {
107
+ const settings = {
108
+ key1: { value: 1 },
109
+ key2: { value: 2 },
110
+ };
111
+ Object.entries(settings).forEach(([key, value]) => {
112
+ service.set(key, value);
113
+ });
114
+
115
+ const result = service.getAllSettings();
116
+
117
+ const settingsWithPrefix = {
118
+ 'AngularDevTools.key1': { value: 1 },
119
+ 'AngularDevTools.key2': { value: 2 },
120
+ };
121
+ expect(result).toEqual(settingsWithPrefix);
122
+ });
123
+ });
124
+
125
+ describe('setAllSettings', () => {
126
+ it('should store multiple settings at once', () => {
127
+ const settings = {
128
+ 'AngularDevTools.key1': { value: 1 },
129
+ 'AngularDevTools.key2': { value: 2 },
130
+ };
131
+
132
+ service.setAllSettings(settings);
133
+
134
+ const valueOne = service.get('AngularDevTools.key1');
135
+ const valueTwo = service.get('AngularDevTools.key2');
136
+ expect(valueOne).toEqual({ value: 1 });
137
+ expect(valueTwo).toEqual({ value: 2 });
138
+ });
139
+
140
+ it('should preserve existing keys not included in settings', () => {
141
+ service.set('key1', { value: 1 });
142
+ service.set('key2', { value: 2 });
143
+
144
+ service.setAllSettings({ key1: { value: 3 } });
145
+
146
+ expect(service.get('key2')).toEqual({ value: 2 });
147
+ });
148
+ });
149
+
150
+ describe('clearAllSettings', () => {
151
+ it('should remove all stored settings', () => {
152
+ service.set('featureFlagsTool', { value: 1 });
153
+ service.set('i18nTool2', { value: 2 });
154
+
155
+ service.clearAllSettings();
156
+
157
+ const allSettings = service.getAllSettings();
158
+ expect(allSettings).toEqual({});
159
+ });
160
+
161
+ it('should only clear tool settings', () => {
162
+ service.set('key1', { value: 1 });
163
+ storageMock['other-key'] = JSON.stringify({ value: 2 });
164
+
165
+ service.clearAllSettings();
166
+
167
+ expect(storageMock['other-key']).toBeDefined();
168
+ });
169
+
170
+ it('should remove tool keys', () => {
171
+ service.set('featureFlagsTool', { value: 1 });
172
+ service.set('i18nTool2', { value: 2 });
173
+
174
+ service.clearAllSettings();
175
+
176
+ expect(service.getToolKeys()).toEqual([]);
177
+ });
178
+ });
179
+ });
@@ -0,0 +1,80 @@
1
+ import { Injectable } from '@angular/core';
2
+
3
+ @Injectable({ providedIn: 'root' })
4
+ export class DevToolsStorageService {
5
+ private readonly PREFIX = 'AngularDevTools.';
6
+ private readonly TOOLS_KEY = `${this.PREFIX}keys`;
7
+ private readonly SETTINGS_KEY = `${this.PREFIX}settings`;
8
+
9
+ public set<T>(key: string, value: T): void {
10
+ const toolKey = this.getToolKey(key);
11
+ this.addToolKey(toolKey);
12
+ localStorage.setItem(toolKey, JSON.stringify(value));
13
+ }
14
+
15
+ public get<T>(key: string): T | null {
16
+ const toolKey = this.getToolKey(key);
17
+ const item = localStorage.getItem(toolKey);
18
+ return item ? JSON.parse(item) : null;
19
+ }
20
+
21
+ public remove(key: string): void {
22
+ const toolKey = this.getToolKey(key);
23
+ localStorage.removeItem(toolKey);
24
+ this.removeToolKey(toolKey);
25
+ }
26
+
27
+ public getAllSettings(): Record<string, unknown> {
28
+ const settings: Record<string, unknown> = {};
29
+
30
+ const keys = this.getToolKeys();
31
+ keys.forEach((key) => {
32
+ const value = this.get(key);
33
+ if (value !== null) {
34
+ settings[key] = value;
35
+ }
36
+ });
37
+
38
+ return settings;
39
+ }
40
+
41
+ public setAllSettings(settings: Record<string, unknown>): void {
42
+ Object.entries(settings).forEach(([key, value]) => {
43
+ this.set(key, value);
44
+ });
45
+ }
46
+
47
+ public clearAllSettings(): void {
48
+ const keys = this.getToolKeys();
49
+ keys.forEach((key) => {
50
+ this.remove(key);
51
+ });
52
+ }
53
+
54
+ public getToolKeys(): string[] {
55
+ return JSON.parse(localStorage.getItem(this.TOOLS_KEY) ?? '[]');
56
+ }
57
+
58
+ private addToolKey(key: string) {
59
+ const currentKeys = this.getToolKeys();
60
+ if (currentKeys.includes(key)) {
61
+ return;
62
+ }
63
+ currentKeys.push(key);
64
+ localStorage.setItem(this.TOOLS_KEY, JSON.stringify(currentKeys));
65
+ }
66
+
67
+ private removeToolKey(key: string): void {
68
+ const currentKeys = this.getToolKeys();
69
+ const index = currentKeys.indexOf(key);
70
+ if (index !== -1) {
71
+ currentKeys.splice(index, 1);
72
+ }
73
+ localStorage.setItem(this.TOOLS_KEY, JSON.stringify(currentKeys));
74
+ }
75
+
76
+ private getToolKey(key: string): string {
77
+ return key.includes(this.PREFIX) ? key : this.PREFIX + key;
78
+ }
79
+
80
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2022",
4
+ "forceConsistentCasingInFileNames": true,
5
+ "strict": true,
6
+ "noImplicitOverride": true,
7
+ "noPropertyAccessFromIndexSignature": true,
8
+ "noImplicitReturns": true,
9
+ "noFallthroughCasesInSwitch": true
10
+ },
11
+ "files": [],
12
+ "include": [],
13
+ "references": [
14
+ {
15
+ "path": "./tsconfig.lib.json"
16
+ },
17
+ {
18
+ "path": "./tsconfig.spec.json"
19
+ }
20
+ ],
21
+ "extends": "../../tsconfig.base.json",
22
+ "angularCompilerOptions": {
23
+ "enableI18nLegacyMessageIdFormat": false,
24
+ "strictInjectionParameters": true,
25
+ "strictInputAccessModifiers": true,
26
+ "strictTemplates": true
27
+ }
28
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../../dist/out-tsc",
5
+ "declaration": true,
6
+ "declarationMap": true,
7
+ "inlineSources": true,
8
+ "types": []
9
+ },
10
+ "exclude": [
11
+ "src/**/*.spec.ts",
12
+ "src/test-setup.ts",
13
+ "jest.config.ts",
14
+ "src/**/*.test.ts",
15
+ "vite.config.ts",
16
+ "vite.config.mts",
17
+ "vitest.config.ts",
18
+ "vitest.config.mts",
19
+ "src/**/*.test.tsx",
20
+ "src/**/*.spec.tsx",
21
+ "src/**/*.test.js",
22
+ "src/**/*.spec.js",
23
+ "src/**/*.test.jsx",
24
+ "src/**/*.spec.jsx",
25
+ "src/test-setup.ts"
26
+ ],
27
+ "include": ["src/**/*.ts"]
28
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "./tsconfig.lib.json",
3
+ "compilerOptions": {
4
+ "declarationMap": false
5
+ },
6
+ "angularCompilerOptions": {
7
+ "compilationMode": "partial"
8
+ }
9
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "../../dist/out-tsc",
5
+ "types": [
6
+ "vitest/globals",
7
+ "vitest/importMeta",
8
+ "vite/client",
9
+ "node",
10
+ "vitest"
11
+ ]
12
+ },
13
+ "include": [
14
+ "vite.config.ts",
15
+ "vite.config.mts",
16
+ "vitest.config.ts",
17
+ "vitest.config.mts",
18
+ "src/**/*.test.ts",
19
+ "src/**/*.spec.ts",
20
+ "src/**/*.test.tsx",
21
+ "src/**/*.spec.tsx",
22
+ "src/**/*.test.js",
23
+ "src/**/*.spec.js",
24
+ "src/**/*.test.jsx",
25
+ "src/**/*.spec.jsx",
26
+ "src/**/*.d.ts"
27
+ ],
28
+ "files": ["src/test-setup.ts"]
29
+ }
@@ -0,0 +1,27 @@
1
+ /// <reference types='vitest' />
2
+ import { defineConfig } from 'vite';
3
+ import angular from '@analogjs/vite-plugin-angular';
4
+ import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
5
+ import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
6
+
7
+ export default defineConfig({
8
+ root: __dirname,
9
+ cacheDir: '../../node_modules/.vite/libs/ngx-dev-toolbar',
10
+ plugins: [angular(), nxViteTsPaths(), nxCopyAssetsPlugin(['*.md'])],
11
+ // Uncomment this if you are using workers.
12
+ // worker: {
13
+ // plugins: [ nxViteTsPaths() ],
14
+ // },
15
+ test: {
16
+ watch: false,
17
+ globals: true,
18
+ environment: 'jsdom',
19
+ include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
20
+ setupFiles: ['src/test-setup.ts'],
21
+ reporters: ['default'],
22
+ coverage: {
23
+ reportsDirectory: '../../coverage/libs/ngx-dev-toolbar',
24
+ provider: 'v8',
25
+ },
26
+ },
27
+ });
@@ -1,12 +0,0 @@
1
- import { IconName } from '../icons/icon.models';
2
- import * as i0 from "@angular/core";
3
- export declare class DevToolbarButtonComponent {
4
- readonly type: import("@angular/core").InputSignal<"button" | "submit" | "reset">;
5
- readonly variant: import("@angular/core").InputSignal<"default" | "icon">;
6
- readonly icon: import("@angular/core").InputSignal<IconName | undefined>;
7
- readonly label: import("@angular/core").InputSignal<string | undefined>;
8
- readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
9
- readonly isActive: import("@angular/core").InputSignal<boolean>;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<DevToolbarButtonComponent, never>;
11
- static ɵcmp: i0.ɵɵComponentDeclaration<DevToolbarButtonComponent, "ndt-button", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "isActive": { "alias": "isActive"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
12
- }
@@ -1,5 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class AngularIconComponent {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<AngularIconComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<AngularIconComponent, "ndt-angular-icon", never, {}, {}, never, never, true, never>;
5
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class BugIconComponent {
3
- fill: import("@angular/core").InputSignal<string>;
4
- static ɵfac: i0.ɵɵFactoryDeclaration<BugIconComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<BugIconComponent, "ndt-bug-icon", never, { "fill": { "alias": "fill"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
6
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class CodeIconComponent {
3
- fill: import("@angular/core").InputSignal<string>;
4
- static ɵfac: i0.ɵɵFactoryDeclaration<CodeIconComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<CodeIconComponent, "ndt-code-icon", never, { "fill": { "alias": "fill"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
6
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class DatabaseIconComponent {
3
- fill: import("@angular/core").InputSignal<string>;
4
- static ɵfac: i0.ɵɵFactoryDeclaration<DatabaseIconComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<DatabaseIconComponent, "ndt-database-icon", never, { "fill": { "alias": "fill"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
6
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class GaugeIconComponent {
3
- fill: import("@angular/core").InputSignal<string>;
4
- static ɵfac: i0.ɵɵFactoryDeclaration<GaugeIconComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<GaugeIconComponent, "ndt-gauge-icon", never, { "fill": { "alias": "fill"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
6
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class GearIconComponent {
3
- fill: import("@angular/core").InputSignal<string>;
4
- static ɵfac: i0.ɵɵFactoryDeclaration<GearIconComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<GearIconComponent, "ndt-gear-icon", never, { "fill": { "alias": "fill"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
6
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class GitBranchIconComponent {
3
- fill: import("@angular/core").InputSignal<string>;
4
- static ɵfac: i0.ɵɵFactoryDeclaration<GitBranchIconComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<GitBranchIconComponent, "ndt-git-branch-icon", never, { "fill": { "alias": "fill"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
6
- }
@@ -1,9 +0,0 @@
1
- import { IconName } from './icon.models';
2
- import * as i0 from "@angular/core";
3
- export declare class DevToolbarIconComponent {
4
- private readonly stateService;
5
- name: import("@angular/core").InputSignal<IconName>;
6
- fill: import("@angular/core").Signal<"#FFFFFF" | "#000000">;
7
- static ɵfac: i0.ɵɵFactoryDeclaration<DevToolbarIconComponent, never>;
8
- static ɵcmp: i0.ɵɵComponentDeclaration<DevToolbarIconComponent, "ndt-icon", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
9
- }
@@ -1 +0,0 @@
1
- export type IconName = 'angular' | 'bug' | 'code' | 'database' | 'gauge' | 'gear' | 'git-branch' | 'layout' | 'lighting' | 'moon' | 'network' | 'puzzle' | 'refresh' | 'star' | 'sun' | 'terminal' | 'toggle-left' | 'user' | 'flag';
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class LayoutIconComponent {
3
- fill: import("@angular/core").InputSignal<string>;
4
- static ɵfac: i0.ɵɵFactoryDeclaration<LayoutIconComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<LayoutIconComponent, "ndt-layout-icon", never, { "fill": { "alias": "fill"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
6
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class LightingIconComponent {
3
- fill: import("@angular/core").InputSignal<string>;
4
- static ɵfac: i0.ɵɵFactoryDeclaration<LightingIconComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<LightingIconComponent, "ndt-lighting-icon", never, { "fill": { "alias": "fill"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
6
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class MoonIconComponent {
3
- fill: import("@angular/core").InputSignal<string>;
4
- static ɵfac: i0.ɵɵFactoryDeclaration<MoonIconComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<MoonIconComponent, "ndt-moon-icon", never, { "fill": { "alias": "fill"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
6
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class NetworkIconComponent {
3
- fill: import("@angular/core").InputSignal<string>;
4
- static ɵfac: i0.ɵɵFactoryDeclaration<NetworkIconComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<NetworkIconComponent, "ndt-network-icon", never, { "fill": { "alias": "fill"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
6
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class PuzzleIconComponent {
3
- fill: import("@angular/core").InputSignal<string>;
4
- static ɵfac: i0.ɵɵFactoryDeclaration<PuzzleIconComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<PuzzleIconComponent, "ndt-puzzle-icon", never, { "fill": { "alias": "fill"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
6
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class RefreshIconComponent {
3
- fill: import("@angular/core").InputSignal<string>;
4
- static ɵfac: i0.ɵɵFactoryDeclaration<RefreshIconComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<RefreshIconComponent, "ndt-refresh-icon", never, { "fill": { "alias": "fill"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
6
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class StarIconComponent {
3
- fill: import("@angular/core").InputSignal<string>;
4
- static ɵfac: i0.ɵɵFactoryDeclaration<StarIconComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<StarIconComponent, "ndt-star-icon", never, { "fill": { "alias": "fill"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
6
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class SunIconComponent {
3
- fill: import("@angular/core").InputSignal<string>;
4
- static ɵfac: i0.ɵɵFactoryDeclaration<SunIconComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<SunIconComponent, "ndt-sun-icon", never, { "fill": { "alias": "fill"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
6
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class TerminalIconComponent {
3
- fill: import("@angular/core").InputSignal<string>;
4
- static ɵfac: i0.ɵɵFactoryDeclaration<TerminalIconComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<TerminalIconComponent, "ndt-terminal-icon", never, { "fill": { "alias": "fill"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
6
- }