valtech-components 2.0.328 → 2.0.330

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.
@@ -0,0 +1,24 @@
1
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { ToastController } from '@ionic/angular';
3
+ import 'prismjs/components/prism-css';
4
+ import 'prismjs/components/prism-javascript';
5
+ import 'prismjs/components/prism-markup';
6
+ import 'prismjs/components/prism-typescript';
7
+ import { CodeDisplayMetadata } from './types';
8
+ import * as i0 from "@angular/core";
9
+ export declare class CodeDisplayComponent implements AfterViewInit, OnChanges {
10
+ private cdr;
11
+ codeElement: ElementRef<HTMLElement>;
12
+ props: CodeDisplayMetadata;
13
+ toast: ToastController;
14
+ selectedTab: number;
15
+ constructor(cdr: ChangeDetectorRef);
16
+ ngOnChanges(changes: SimpleChanges): void;
17
+ ngAfterViewInit(): void;
18
+ selectTab(i: number): void;
19
+ private highlightCode;
20
+ copyToClipboard(): Promise<void>;
21
+ presentToast(message: string): Promise<void>;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<CodeDisplayComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<CodeDisplayComponent, "val-code-display", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
24
+ }
@@ -0,0 +1,10 @@
1
+ export type CodeTab = {
2
+ label: string;
3
+ code: string;
4
+ language: string;
5
+ };
6
+ export type CodeDisplayMetadata = {
7
+ code: string;
8
+ language: string;
9
+ tabs: CodeTab[];
10
+ };
@@ -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;
@@ -44,7 +44,7 @@ export declare class ArticleComponent implements OnInit {
44
44
  allowPartialBold?: boolean;
45
45
  };
46
46
  getHighlightTextProps(element: ArticleElement): {
47
- size: "small" | "medium" | "large" | "xlarge";
47
+ size: "medium" | "small" | "large" | "xlarge";
48
48
  color: import("@ionic/core").Color;
49
49
  content?: string;
50
50
  bold: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "2.0.328",
3
+ "version": "2.0.330",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.0.0",
6
6
  "@angular/core": "^18.0.0",
@@ -8,7 +8,8 @@
8
8
  "ionicons": "^7.2.1",
9
9
  "rxjs": "~7.8.0",
10
10
  "prismjs": "^1.30.0",
11
- "swiper": "^11.2.8"
11
+ "swiper": "^11.2.8",
12
+ "@capacitor/clipboard": "^6.0.1"
12
13
  },
13
14
  "dependencies": {
14
15
  "@capacitor/browser": "^6.0.3",
package/public-api.d.ts CHANGED
@@ -63,6 +63,8 @@ export * from './lib/components/molecules/select-search/select-search.component'
63
63
  export * from './lib/components/molecules/text-input/text-input.component';
64
64
  export * from './lib/components/molecules/title-block/title-block.component';
65
65
  export * from './lib/components/molecules/title-block/types';
66
+ export * from './lib/components/molecules/code-display/code-display.component';
67
+ export * from './lib/components/molecules/code-display/types';
66
68
  export * from './lib/components/organisms/article/article.component';
67
69
  export * from './lib/components/organisms/article/types';
68
70
  export * from './lib/components/organisms/banner/banner.component';