valtech-components 2.0.321 → 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.
- package/esm2022/lib/components/atoms/image/image.component.mjs +7 -3
- package/esm2022/lib/components/atoms/text/text.component.mjs +71 -3
- package/esm2022/lib/components/atoms/text/types.mjs +1 -1
- package/esm2022/public-api.mjs +1 -4
- package/fesm2022/valtech-components.mjs +76 -7
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/atoms/text/text.component.d.ts +27 -1
- package/lib/components/atoms/text/types.d.ts +1 -0
- package/lib/components/organisms/article/article.component.d.ts +4 -2
- package/package.json +1 -1
|
@@ -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>;
|
|
@@ -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: "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: "
|
|
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): {
|