valtech-components 2.0.322 → 2.0.324

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.
@@ -26,6 +26,7 @@ export declare class TextComponent implements OnInit, OnDestroy {
26
26
  * @property bold - Whether the text is bold
27
27
  * @property processLinks - Whether to automatically process and convert links in text (default: false)
28
28
  * @property linkConfig - Configuration for link processing (colors, target behavior, etc.)
29
+ * @property allowPartialBold - Whether to allow partial bold using <b> or <strong> tags (default: false)
29
30
  */
30
31
  props: TextMetadata;
31
32
  /**
@@ -42,6 +43,14 @@ export declare class TextComponent implements OnInit, OnDestroy {
42
43
  * Priority: static content > reactive content with interpolation > reactive content
43
44
  */
44
45
  private setupDisplayContent;
46
+ /**
47
+ * Process partial bold tags in the content.
48
+ * Converts <b> and <strong> tags to properly styled bold spans.
49
+ *
50
+ * @param content - The content string to process
51
+ * @returns Processed content with bold styling
52
+ */
53
+ processPartialBold(content: string | null): string;
45
54
  static ɵfac: i0.ɵɵFactoryDeclaration<TextComponent, never>;
46
55
  static ɵcmp: i0.ɵɵComponentDeclaration<TextComponent, "val-text", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
47
56
  }
@@ -67,5 +76,22 @@ export declare class TextComponent implements OnInit, OnDestroy {
67
76
  * })
68
77
  * };
69
78
  * ```
79
+ *
80
+ * @example With partial bold support:
81
+ * ```typescript
82
+ * // In component
83
+ * greetingProps: TextMetadata = {
84
+ * ...createTextProps({
85
+ * contentKey: 'greeting',
86
+ * contentClass: 'UserComponent',
87
+ * contentInterpolation: { name: '<b>Juan</b>' }
88
+ * }, {
89
+ * color: 'primary',
90
+ * size: 'medium',
91
+ * bold: false,
92
+ * allowPartialBold: true
93
+ * })
94
+ * };
95
+ * ```
70
96
  */
71
- export declare function createTextProps(contentConfig: TextContentConfig, styleConfig?: Partial<Pick<TextMetadata, 'color' | 'size' | 'bold'>>): Partial<TextMetadata>;
97
+ export declare function createTextProps(contentConfig: TextContentConfig, styleConfig?: Partial<Pick<TextMetadata, 'color' | 'size' | 'bold' | 'allowPartialBold'>>): Partial<TextMetadata>;
@@ -28,6 +28,7 @@ export interface TextMetadata {
28
28
  contentInterpolation?: Record<string, string | number>;
29
29
  processLinks?: boolean;
30
30
  linkConfig?: LinkProcessorConfig;
31
+ allowPartialBold?: boolean;
31
32
  }
32
33
  /**
33
34
  * Configuration for reactive content in val-text component.
@@ -41,6 +41,7 @@ export declare class ArticleComponent implements OnInit {
41
41
  contentInterpolation?: Record<string, string | number>;
42
42
  processLinks?: boolean;
43
43
  linkConfig?: import("valtech-components").LinkProcessorConfig;
44
+ allowPartialBold?: boolean;
44
45
  };
45
46
  getHighlightTextProps(element: ArticleElement): {
46
47
  size: "small" | "medium" | "large" | "xlarge";
@@ -53,6 +54,7 @@ export declare class ArticleComponent implements OnInit {
53
54
  contentInterpolation?: Record<string, string | number>;
54
55
  processLinks?: boolean;
55
56
  linkConfig?: import("valtech-components").LinkProcessorConfig;
57
+ allowPartialBold?: boolean;
56
58
  };
57
59
  getHighlightColor(element: ArticleElement): string;
58
60
  getButtonProps(element: ArticleElement): {
@@ -1,11 +1,11 @@
1
- import { LangService } from './lang-provider/lang-provider.service';
2
1
  import { LanguagesContent } from './lang-provider/types';
2
+ import { Provider } from './lang-provider/content';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
5
5
  * ContentLoader Service - Dynamic content loading system.
6
6
  *
7
- * Allows loading content from distributed .content.ts files throughout the project,
8
- * keeping content close to where it's used instead of centralizing everything in main.ts.
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 or main.ts
18
+ * // In component
19
19
  * import { UserPageContent } from './user-page.content';
20
- * contentLoader.registerContent('UserPage', UserPageContent);
20
+ * registerContent('UserPage', UserPageContent);
21
21
  * ```
22
22
  */
23
23
  export declare class ContentLoaderService {
24
- private langService;
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
- * Add content to the LangService content provider.
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 addContentToLangService;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "2.0.322",
3
+ "version": "2.0.324",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.0.0",
6
6
  "@angular/core": "^18.0.0",