valtech-components 2.0.322 → 2.0.323

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.
@@ -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: "small" | "medium" | "large" | "xlarge";
34
+ size: "medium" | "small" | "large" | "xlarge";
35
35
  color: import("@ionic/core").Color;
36
36
  content?: string;
37
37
  bold: boolean;
@@ -41,9 +41,10 @@ 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
- size: "small" | "medium" | "large" | "xlarge";
47
+ size: "medium" | "small" | "large" | "xlarge";
47
48
  color: import("@ionic/core").Color;
48
49
  content?: string;
49
50
  bold: boolean;
@@ -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): {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "2.0.322",
3
+ "version": "2.0.323",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.0.0",
6
6
  "@angular/core": "^18.0.0",