@testgorilla/tgo-ui 5.1.2 → 5.2.0
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/components/ai-caveat/ai-caveat.component.d.ts +36 -0
- package/components/ai-caveat/ai-caveat.component.module.d.ts +10 -0
- package/components/ai-caveat/index.d.ts +5 -0
- package/components/ai-caveat/public-api.d.ts +3 -0
- package/components/ai-feedback/ai-feedback.component.d.ts +49 -12
- package/components/ai-feedback/ai-feedback.model.d.ts +19 -1
- package/components/ai-feedback/ai-feedback.module.d.ts +10 -4
- package/components/icon/icon.model.d.ts +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs +79 -0
- package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs.map +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs +240 -30
- package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-core.mjs +6 -1
- package/fesm2022/testgorilla-tgo-ui-components-core.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-icon.mjs +2 -2
- package/fesm2022/testgorilla-tgo-ui-components-icon.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui.mjs.map +1 -1
- package/package.json +32 -28
- package/public-api.d.ts +1 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* AI Caveat Component
|
|
5
|
+
*
|
|
6
|
+
* A standardized, reusable UI component to be displayed beneath all AI-generated content.
|
|
7
|
+
* The purpose is to promote responsible AI usage by informing users that content should be
|
|
8
|
+
* verified for accuracy, thereby reducing risk and managing user expectations regarding AI reliability.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <ui-ai-caveat></ui-ai-caveat>
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <ui-ai-caveat [applicationTheme]="'dark'"></ui-ai-caveat>
|
|
15
|
+
*/
|
|
16
|
+
export declare class AiCaveatComponent {
|
|
17
|
+
private readonly defaultAppTheme;
|
|
18
|
+
/**
|
|
19
|
+
* Defines the application theme
|
|
20
|
+
*
|
|
21
|
+
* @type {ApplicationTheme}
|
|
22
|
+
* @default 'light'
|
|
23
|
+
* @memberof AiCaveatComponent
|
|
24
|
+
*/
|
|
25
|
+
applicationTheme: ApplicationTheme;
|
|
26
|
+
/**
|
|
27
|
+
* The translation key for the disclaimer text
|
|
28
|
+
*
|
|
29
|
+
* @readonly
|
|
30
|
+
* @memberof AiCaveatComponent
|
|
31
|
+
*/
|
|
32
|
+
readonly disclaimerKey = "AI_CAVEAT.DISCLAIMER";
|
|
33
|
+
constructor(defaultAppTheme: ApplicationTheme);
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AiCaveatComponent, [{ optional: true; }]>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AiCaveatComponent, "ui-ai-caveat", never, { "applicationTheme": { "alias": "applicationTheme"; "required": false; }; }, {}, never, never, false, never>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./ai-caveat.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@testgorilla/tgo-ui/components/icon";
|
|
5
|
+
import * as i4 from "@testgorilla/tgo-ui/components/core";
|
|
6
|
+
export declare class AiCaveatComponentModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AiCaveatComponentModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AiCaveatComponentModule, [typeof i1.AiCaveatComponent], [typeof i2.CommonModule, typeof i3.IconComponentModule, typeof i4.UiTranslatePipe], [typeof i1.AiCaveatComponent]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AiCaveatComponentModule>;
|
|
10
|
+
}
|
|
@@ -1,15 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { AiFeedbackPanelType, AiFeedbackConfig, AiFeedbackData, AiFeedbackVariant } from './ai-feedback.model';
|
|
4
|
+
import { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class AiFeedbackComponent {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
export declare class AiFeedbackComponent implements OnInit {
|
|
7
|
+
positiveConfig: import("@angular/core").InputSignal<AiFeedbackConfig | undefined>;
|
|
8
|
+
negativeConfig: import("@angular/core").InputSignal<AiFeedbackConfig | undefined>;
|
|
9
|
+
skipPanelForPositive: import("@angular/core").InputSignal<boolean>;
|
|
10
|
+
applicationTheme: import("@angular/core").InputSignal<ApplicationTheme>;
|
|
11
|
+
variant: import("@angular/core").InputSignal<AiFeedbackVariant>;
|
|
12
|
+
isRatingDisabled: import("@angular/core").InputSignal<boolean>;
|
|
13
|
+
enableAutoEmit: import("@angular/core").InputSignal<boolean>;
|
|
14
|
+
isPositiveFeedback: import("@angular/core").ModelSignal<boolean | null>;
|
|
15
|
+
selectionChange: import("@angular/core").OutputEmitterRef<boolean | null>;
|
|
16
|
+
feedbackSubmitted: import("@angular/core").OutputEmitterRef<AiFeedbackData>;
|
|
17
|
+
feedbackCancelled: import("@angular/core").OutputEmitterRef<AiFeedbackData>;
|
|
18
|
+
feedbackChanged: import("@angular/core").OutputEmitterRef<AiFeedbackData>;
|
|
19
|
+
protected readonly isMobile$: import("rxjs").Observable<boolean>;
|
|
20
|
+
private destroyRef;
|
|
21
|
+
isMobile: import("@angular/core").Signal<boolean>;
|
|
22
|
+
showPanel: import("@angular/core").WritableSignal<boolean>;
|
|
23
|
+
panelType: import("@angular/core").WritableSignal<AiFeedbackPanelType | null>;
|
|
24
|
+
selectedOptions: import("@angular/core").WritableSignal<string[]>;
|
|
25
|
+
otherTextControl: FormControl<string | null>;
|
|
26
|
+
otherTextValue: import("@angular/core").WritableSignal<string>;
|
|
27
|
+
private selectedOptionsSubject;
|
|
28
|
+
private otherTextSubject;
|
|
29
|
+
readonly translationContext = "AI_FEEDBACK.";
|
|
30
|
+
readonly AiFeedbackPanelType: typeof AiFeedbackPanelType;
|
|
31
|
+
private readonly defaultPositiveTitle;
|
|
32
|
+
private readonly defaultNegativeTitle;
|
|
33
|
+
private readonly OTHER_OPTION_ID;
|
|
34
|
+
shouldAutoEmit: import("@angular/core").Signal<boolean>;
|
|
35
|
+
ngOnInit(): void;
|
|
36
|
+
getDefaultPanelTitleTranslation(panelType: AiFeedbackPanelType | null): string;
|
|
37
|
+
activeConfig: import("@angular/core").Signal<AiFeedbackConfig | null | undefined>;
|
|
38
|
+
arrowPosition: import("@angular/core").Signal<"left" | "right">;
|
|
39
|
+
isSubmitDisabled: import("@angular/core").Signal<boolean>;
|
|
40
|
+
private ensureOtherOption;
|
|
41
|
+
private buildFeedbackData;
|
|
42
|
+
private resetPanelState;
|
|
43
|
+
private shouldShowPanelForVariant;
|
|
44
|
+
onSelectionChange(isPositive: boolean): void;
|
|
45
|
+
toggleOption(optionId: string): void;
|
|
46
|
+
isOptionSelected(optionId: string): boolean;
|
|
47
|
+
showOtherField(): boolean;
|
|
48
|
+
onSubmit(): void;
|
|
49
|
+
closePanel(): void;
|
|
13
50
|
static ɵfac: i0.ɵɵFactoryDeclaration<AiFeedbackComponent, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AiFeedbackComponent, "ui-ai-feedback", never, { "
|
|
51
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AiFeedbackComponent, "ui-ai-feedback", never, { "positiveConfig": { "alias": "positiveConfig"; "required": false; "isSignal": true; }; "negativeConfig": { "alias": "negativeConfig"; "required": false; "isSignal": true; }; "skipPanelForPositive": { "alias": "skipPanelForPositive"; "required": false; "isSignal": true; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "isRatingDisabled": { "alias": "isRatingDisabled"; "required": false; "isSignal": true; }; "enableAutoEmit": { "alias": "enableAutoEmit"; "required": false; "isSignal": true; }; "isPositiveFeedback": { "alias": "isPositiveFeedback"; "required": false; "isSignal": true; }; }, { "isPositiveFeedback": "isPositiveFeedbackChange"; "selectionChange": "selectionChange"; "feedbackSubmitted": "feedbackSubmitted"; "feedbackCancelled": "feedbackCancelled"; "feedbackChanged": "feedbackChanged"; }, never, never, false, never>;
|
|
15
52
|
}
|
|
@@ -1 +1,19 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare enum AiFeedbackPanelType {
|
|
2
|
+
POSITIVE = "positive",
|
|
3
|
+
NEGATIVE = "negative"
|
|
4
|
+
}
|
|
5
|
+
export type AiFeedbackVariant = 'default' | 'panel' | 'input-only';
|
|
6
|
+
export interface AiFeedbackOption {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}
|
|
10
|
+
export interface AiFeedbackConfig {
|
|
11
|
+
title: string;
|
|
12
|
+
options?: AiFeedbackOption[];
|
|
13
|
+
otherPlaceholder?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface AiFeedbackData {
|
|
16
|
+
isPositiveFeedback: boolean | null;
|
|
17
|
+
selectedOptions?: string[];
|
|
18
|
+
otherText?: string;
|
|
19
|
+
}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./ai-feedback.component";
|
|
3
|
-
import * as i2 from "@
|
|
4
|
-
import * as i3 from "@
|
|
5
|
-
import * as i4 from "@
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/forms";
|
|
5
|
+
import * as i4 from "@testgorilla/tgo-ui/components/button";
|
|
6
|
+
import * as i5 from "@testgorilla/tgo-ui/components/card";
|
|
7
|
+
import * as i6 from "@testgorilla/tgo-ui/components/tag";
|
|
8
|
+
import * as i7 from "@testgorilla/tgo-ui/components/field";
|
|
9
|
+
import * as i8 from "@testgorilla/tgo-ui/components/ai-caveat";
|
|
10
|
+
import * as i9 from "@testgorilla/tgo-ui/components/icon";
|
|
11
|
+
import * as i10 from "@testgorilla/tgo-ui/components/core";
|
|
6
12
|
export declare class AiFeedbackModule {
|
|
7
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<AiFeedbackModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AiFeedbackModule, [typeof i1.AiFeedbackComponent], [typeof i2.
|
|
14
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AiFeedbackModule, [typeof i1.AiFeedbackComponent], [typeof i2.CommonModule, typeof i2.AsyncPipe, typeof i3.ReactiveFormsModule, typeof i4.ButtonComponentModule, typeof i5.CardComponentModule, typeof i6.TagComponentModule, typeof i7.FieldComponentModule, typeof i8.AiCaveatComponentModule, typeof i9.IconComponentModule, typeof i10.UiTranslatePipe, typeof i10.MemoizeFuncPipe], [typeof i1.AiFeedbackComponent]>;
|
|
9
15
|
static ɵinj: i0.ɵɵInjectorDeclaration<AiFeedbackModule>;
|
|
10
16
|
}
|
|
@@ -3,5 +3,5 @@ type TgoIcons = typeof tgoIcons[number];
|
|
|
3
3
|
type TgoRebrandIcons = typeof tgoRebrandIcons[number];
|
|
4
4
|
export type IconSize = '16' | '24' | '40' | '80';
|
|
5
5
|
export type IconName = TgoRebrandIcons | TgoIcons | '';
|
|
6
|
-
export type IconColor = 'teal' | 'petrol' | 'dark' | 'white' | 'black' | 'inherit' | 'rebrand-black' | 'red' | '
|
|
6
|
+
export type IconColor = 'teal' | 'petrol' | 'dark' | 'white' | 'black' | 'inherit' | 'rebrand-black' | 'red' | 'gray' | 'orange' | 'gray' | string;
|
|
7
7
|
export {};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Input, Optional, Inject, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@testgorilla/tgo-ui/components/icon';
|
|
4
|
+
import { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';
|
|
5
|
+
import * as i2 from '@angular/common';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import * as i3 from '@testgorilla/tgo-ui/components/core';
|
|
8
|
+
import { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* AI Caveat Component
|
|
12
|
+
*
|
|
13
|
+
* A standardized, reusable UI component to be displayed beneath all AI-generated content.
|
|
14
|
+
* The purpose is to promote responsible AI usage by informing users that content should be
|
|
15
|
+
* verified for accuracy, thereby reducing risk and managing user expectations regarding AI reliability.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* <ui-ai-caveat></ui-ai-caveat>
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <ui-ai-caveat [applicationTheme]="'dark'"></ui-ai-caveat>
|
|
22
|
+
*/
|
|
23
|
+
class AiCaveatComponent {
|
|
24
|
+
constructor(defaultAppTheme) {
|
|
25
|
+
this.defaultAppTheme = defaultAppTheme;
|
|
26
|
+
/**
|
|
27
|
+
* Defines the application theme
|
|
28
|
+
*
|
|
29
|
+
* @type {ApplicationTheme}
|
|
30
|
+
* @default 'light'
|
|
31
|
+
* @memberof AiCaveatComponent
|
|
32
|
+
*/
|
|
33
|
+
this.applicationTheme = 'light';
|
|
34
|
+
/**
|
|
35
|
+
* The translation key for the disclaimer text
|
|
36
|
+
*
|
|
37
|
+
* @readonly
|
|
38
|
+
* @memberof AiCaveatComponent
|
|
39
|
+
*/
|
|
40
|
+
this.disclaimerKey = 'AI_CAVEAT.DISCLAIMER';
|
|
41
|
+
if (defaultAppTheme) {
|
|
42
|
+
this.applicationTheme = defaultAppTheme;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AiCaveatComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
46
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: AiCaveatComponent, isStandalone: false, selector: "ui-ai-caveat", inputs: { applicationTheme: "applicationTheme" }, ngImport: i0, template: "<div class=\"ai-caveat-container\" role=\"status\" aria-live=\"polite\">\n <ui-icon\n [name]=\"'Info-in-line'\"\n [size]=\"'16'\"\n color=\"gray\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-icon>\n <span class=\"ai-caveat-text\">{{ disclaimerKey | uiTranslate | async }}</span>\n</div>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{display:block}.ai-caveat-container{display:flex;align-items:center;gap:8px;padding:0}.ai-caveat-text{color:#666}\n"], dependencies: [{ kind: "component", type: i1.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.UiTranslatePipe, name: "uiTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
47
|
+
}
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AiCaveatComponent, decorators: [{
|
|
49
|
+
type: Component,
|
|
50
|
+
args: [{ selector: 'ui-ai-caveat', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"ai-caveat-container\" role=\"status\" aria-live=\"polite\">\n <ui-icon\n [name]=\"'Info-in-line'\"\n [size]=\"'16'\"\n color=\"gray\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-icon>\n <span class=\"ai-caveat-text\">{{ disclaimerKey | uiTranslate | async }}</span>\n</div>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{display:block}.ai-caveat-container{display:flex;align-items:center;gap:8px;padding:0}.ai-caveat-text{color:#666}\n"] }]
|
|
51
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
52
|
+
type: Optional
|
|
53
|
+
}, {
|
|
54
|
+
type: Inject,
|
|
55
|
+
args: ['CANOPYUI_DEFAULT_APPLICATION_THEME']
|
|
56
|
+
}] }], propDecorators: { applicationTheme: [{
|
|
57
|
+
type: Input
|
|
58
|
+
}] } });
|
|
59
|
+
|
|
60
|
+
class AiCaveatComponentModule {
|
|
61
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AiCaveatComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
62
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: AiCaveatComponentModule, declarations: [AiCaveatComponent], imports: [CommonModule, IconComponentModule, UiTranslatePipe], exports: [AiCaveatComponent] }); }
|
|
63
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AiCaveatComponentModule, imports: [CommonModule, IconComponentModule] }); }
|
|
64
|
+
}
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AiCaveatComponentModule, decorators: [{
|
|
66
|
+
type: NgModule,
|
|
67
|
+
args: [{
|
|
68
|
+
declarations: [AiCaveatComponent],
|
|
69
|
+
imports: [CommonModule, IconComponentModule, UiTranslatePipe],
|
|
70
|
+
exports: [AiCaveatComponent],
|
|
71
|
+
}]
|
|
72
|
+
}] });
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Generated bundle index. Do not edit.
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
export { AiCaveatComponent, AiCaveatComponentModule };
|
|
79
|
+
//# sourceMappingURL=testgorilla-tgo-ui-components-ai-caveat.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testgorilla-tgo-ui-components-ai-caveat.mjs","sources":["../../../components/ai-caveat/ai-caveat.component.ts","../../../components/ai-caveat/ai-caveat.component.html","../../../components/ai-caveat/ai-caveat.component.module.ts","../../../components/ai-caveat/testgorilla-tgo-ui-components-ai-caveat.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Inject, Input, Optional } from '@angular/core';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\n\n/**\n * AI Caveat Component\n *\n * A standardized, reusable UI component to be displayed beneath all AI-generated content.\n * The purpose is to promote responsible AI usage by informing users that content should be\n * verified for accuracy, thereby reducing risk and managing user expectations regarding AI reliability.\n *\n * @example\n * <ui-ai-caveat></ui-ai-caveat>\n *\n * @example\n * <ui-ai-caveat [applicationTheme]=\"'dark'\"></ui-ai-caveat>\n */\n@Component({\n selector: 'ui-ai-caveat',\n templateUrl: './ai-caveat.component.html',\n styleUrls: ['./ai-caveat.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class AiCaveatComponent {\n /**\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @default 'light'\n * @memberof AiCaveatComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * The translation key for the disclaimer text\n *\n * @readonly\n * @memberof AiCaveatComponent\n */\n readonly disclaimerKey = 'AI_CAVEAT.DISCLAIMER';\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n}\n","<div class=\"ai-caveat-container\" role=\"status\" aria-live=\"polite\">\n <ui-icon\n [name]=\"'Info-in-line'\"\n [size]=\"'16'\"\n color=\"gray\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-icon>\n <span class=\"ai-caveat-text\">{{ disclaimerKey | uiTranslate | async }}</span>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { AiCaveatComponent } from './ai-caveat.component';\n\n@NgModule({\n declarations: [AiCaveatComponent],\n imports: [CommonModule, IconComponentModule, UiTranslatePipe],\n exports: [AiCaveatComponent],\n})\nexport class AiCaveatComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAGA;;;;;;;;;;;;AAYG;MAQU,iBAAiB,CAAA;AAkB5B,IAAA,WAAA,CAC6E,eAAiC,EAAA;QAAjC,IAAe,CAAA,eAAA,GAAf,eAAe;AAlB5F;;;;;;AAMG;QACM,IAAgB,CAAA,gBAAA,GAAqB,OAAO;AAErD;;;;;AAKG;QACM,IAAa,CAAA,aAAA,GAAG,sBAAsB;QAK7C,IAAI,eAAe,EAAE;AACnB,YAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe;;;AAtBhC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,kBAmBN,oCAAoC,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAnB/C,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,iBAAiB,2HCvB9B,uTASA,EAAA,MAAA,EAAA,CAAA,6uEAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,OAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,kBAAA,EAAA,iBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,IAAA,EAAA,aAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FDca,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,EAGP,eAAA,EAAA,uBAAuB,CAAC,MAAM,cACnC,KAAK,EAAA,QAAA,EAAA,uTAAA,EAAA,MAAA,EAAA,CAAA,6uEAAA,CAAA,EAAA;;0BAqBd;;0BAAY,MAAM;2BAAC,oCAAoC;yCAXjD,gBAAgB,EAAA,CAAA;sBAAxB;;;MEpBU,uBAAuB,CAAA;+GAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAvB,uBAAuB,EAAA,YAAA,EAAA,CAJnB,iBAAiB,CACtB,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,mBAAmB,EAAE,eAAe,CAAA,EAAA,OAAA,EAAA,CAClD,iBAAiB,CAAA,EAAA,CAAA,CAAA;gHAEhB,uBAAuB,EAAA,OAAA,EAAA,CAHxB,YAAY,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;;4FAGhC,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBALnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,eAAe,CAAC;oBAC7D,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC7B,iBAAA;;;ACVD;;AAEG;;;;"}
|