valtech-components 2.0.323 → 2.0.325
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/esm2022/lib/services/content-loader.service.mjs +89 -28
- package/fesm2022/valtech-components.mjs +87 -26
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/article/article.component.d.ts +2 -2
- package/lib/services/content-loader.service.d.ts +26 -9
- package/package.json +1 -1
|
@@ -31,7 +31,7 @@ export declare class ArticleComponent implements OnInit {
|
|
|
31
31
|
getVideoElement(element: ArticleElement): ArticleVideoElement;
|
|
32
32
|
getCustomElement(element: ArticleElement): ArticleCustomElement;
|
|
33
33
|
getQuoteTextProps(element: ArticleElement): {
|
|
34
|
-
size: "
|
|
34
|
+
size: "small" | "medium" | "large" | "xlarge";
|
|
35
35
|
color: import("@ionic/core").Color;
|
|
36
36
|
content?: string;
|
|
37
37
|
bold: boolean;
|
|
@@ -44,7 +44,7 @@ export declare class ArticleComponent implements OnInit {
|
|
|
44
44
|
allowPartialBold?: boolean;
|
|
45
45
|
};
|
|
46
46
|
getHighlightTextProps(element: ArticleElement): {
|
|
47
|
-
size: "
|
|
47
|
+
size: "small" | "medium" | "large" | "xlarge";
|
|
48
48
|
color: import("@ionic/core").Color;
|
|
49
49
|
content?: string;
|
|
50
50
|
bold: boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Provider } from './lang-provider/content';
|
|
2
2
|
import { LanguagesContent } from './lang-provider/types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
5
|
* ContentLoader Service - Dynamic content loading system.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* REFACTORED: Now uses ValtechConfigService properly instead of hacking LangService.
|
|
8
|
+
* This provides a clean, maintainable way to register content dynamically.
|
|
9
9
|
*
|
|
10
10
|
* @example Basic usage:
|
|
11
11
|
* ```typescript
|
|
@@ -15,17 +15,17 @@ import * as i0 from "@angular/core";
|
|
|
15
15
|
* en: { title: 'My User Page', welcome: 'Welcome {{name}}' }
|
|
16
16
|
* };
|
|
17
17
|
*
|
|
18
|
-
* // In component
|
|
18
|
+
* // In component
|
|
19
19
|
* import { UserPageContent } from './user-page.content';
|
|
20
|
-
*
|
|
20
|
+
* registerContent('UserPage', UserPageContent);
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
export declare class ContentLoaderService {
|
|
24
|
-
private
|
|
24
|
+
private valtechConfig;
|
|
25
25
|
private registeredContent;
|
|
26
|
-
constructor(langService: LangService);
|
|
27
26
|
/**
|
|
28
27
|
* Register content for a specific component/page class.
|
|
28
|
+
* ✅ CLEAN: Uses proper ValtechConfigService API instead of hacking LangService
|
|
29
29
|
*/
|
|
30
30
|
registerContent(className: string, content: LanguagesContent): void;
|
|
31
31
|
/**
|
|
@@ -53,10 +53,15 @@ export declare class ContentLoaderService {
|
|
|
53
53
|
*/
|
|
54
54
|
clearAllContent(): void;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Get current content provider state.
|
|
57
|
+
* Useful for debugging.
|
|
58
|
+
*/
|
|
59
|
+
getContentProvider(): Provider | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* ✅ CLEAN: Add content to provider using proper API
|
|
57
62
|
* @private
|
|
58
63
|
*/
|
|
59
|
-
private
|
|
64
|
+
private addContentToProvider;
|
|
60
65
|
static ɵfac: i0.ɵɵFactoryDeclaration<ContentLoaderService, never>;
|
|
61
66
|
static ɵprov: i0.ɵɵInjectableDeclaration<ContentLoaderService>;
|
|
62
67
|
}
|
|
@@ -73,9 +78,21 @@ export interface ContentModule {
|
|
|
73
78
|
export declare function createContentModule(className: string, content: LanguagesContent): ContentModule;
|
|
74
79
|
/**
|
|
75
80
|
* Simple function to register content directly.
|
|
81
|
+
* ✅ IMPROVED: Cleaner global registry management
|
|
76
82
|
*/
|
|
77
83
|
export declare function registerContent(className: string, content: LanguagesContent): void;
|
|
78
84
|
/**
|
|
79
85
|
* Load all content from the global registry.
|
|
86
|
+
* ✅ IMPROVED: Better error handling and logging
|
|
80
87
|
*/
|
|
81
88
|
export declare function loadRegisteredContent(contentLoader: ContentLoaderService): void;
|
|
89
|
+
/**
|
|
90
|
+
* ✅ NEW: Debugging helper
|
|
91
|
+
* Get current global registry state
|
|
92
|
+
*/
|
|
93
|
+
export declare function getRegisteredContentQueue(): ContentModule[];
|
|
94
|
+
/**
|
|
95
|
+
* ✅ NEW: Debugging helper
|
|
96
|
+
* Clear the global registry without loading
|
|
97
|
+
*/
|
|
98
|
+
export declare function clearRegisteredContentQueue(): void;
|