osi-cards-lib 1.0.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.
Files changed (114) hide show
  1. package/README.md +763 -0
  2. package/esm2022/lib/components/ai-card-renderer/ai-card-renderer.component.mjs +911 -0
  3. package/esm2022/lib/components/card-preview/card-preview.component.mjs +74 -0
  4. package/esm2022/lib/components/card-skeleton/card-skeleton.component.mjs +24 -0
  5. package/esm2022/lib/components/masonry-grid/masonry-grid.component.mjs +330 -0
  6. package/esm2022/lib/components/section-renderer/section-renderer.component.mjs +166 -0
  7. package/esm2022/lib/components/sections/analytics-section/analytics-section.component.mjs +70 -0
  8. package/esm2022/lib/components/sections/base-section.component.mjs +335 -0
  9. package/esm2022/lib/components/sections/brand-colors-section/brand-colors-section.component.mjs +89 -0
  10. package/esm2022/lib/components/sections/chart-section/chart-section.component.mjs +92 -0
  11. package/esm2022/lib/components/sections/contact-card-section/contact-card-section.component.mjs +70 -0
  12. package/esm2022/lib/components/sections/event-section/event-section.component.mjs +32 -0
  13. package/esm2022/lib/components/sections/fallback-section/fallback-section.component.mjs +16 -0
  14. package/esm2022/lib/components/sections/financials-section/financials-section.component.mjs +53 -0
  15. package/esm2022/lib/components/sections/info-section.component.mjs +68 -0
  16. package/esm2022/lib/components/sections/list-section/list-section.component.mjs +36 -0
  17. package/esm2022/lib/components/sections/map-section/map-section.component.mjs +52 -0
  18. package/esm2022/lib/components/sections/network-card-section/network-card-section.component.mjs +41 -0
  19. package/esm2022/lib/components/sections/news-section/news-section.component.mjs +44 -0
  20. package/esm2022/lib/components/sections/overview-section/overview-section.component.mjs +47 -0
  21. package/esm2022/lib/components/sections/product-section/product-section.component.mjs +129 -0
  22. package/esm2022/lib/components/sections/quotation-section/quotation-section.component.mjs +39 -0
  23. package/esm2022/lib/components/sections/social-media-section/social-media-section.component.mjs +45 -0
  24. package/esm2022/lib/components/sections/solutions-section/solutions-section.component.mjs +29 -0
  25. package/esm2022/lib/components/sections/text-reference-section/text-reference-section.component.mjs +42 -0
  26. package/esm2022/lib/icons/index.mjs +2 -0
  27. package/esm2022/lib/icons/lucide-icons.module.mjs +91 -0
  28. package/esm2022/lib/models/card.model.mjs +111 -0
  29. package/esm2022/lib/models/index.mjs +2 -0
  30. package/esm2022/lib/services/icon.service.mjs +148 -0
  31. package/esm2022/lib/services/index.mjs +5 -0
  32. package/esm2022/lib/services/magnetic-tilt.service.mjs +224 -0
  33. package/esm2022/lib/services/section-normalization.service.mjs +243 -0
  34. package/esm2022/lib/services/section-utils.service.mjs +122 -0
  35. package/esm2022/lib/utils/card-diff.util.mjs +327 -0
  36. package/esm2022/lib/utils/index.mjs +3 -0
  37. package/esm2022/lib/utils/responsive.util.mjs +14 -0
  38. package/esm2022/osi-cards-lib.mjs +5 -0
  39. package/esm2022/public-api.mjs +57 -0
  40. package/fesm2022/osi-cards-lib.mjs +3960 -0
  41. package/index.d.ts +5 -0
  42. package/lib/components/ai-card-renderer/ai-card-renderer.component.d.ts +163 -0
  43. package/lib/components/card-preview/card-preview.component.d.ts +52 -0
  44. package/lib/components/card-skeleton/card-skeleton.component.d.ts +8 -0
  45. package/lib/components/masonry-grid/masonry-grid.component.d.ts +72 -0
  46. package/lib/components/section-renderer/section-renderer.component.d.ts +25 -0
  47. package/lib/components/sections/analytics-section/analytics-section.component.d.ts +32 -0
  48. package/lib/components/sections/base-section.component.d.ts +138 -0
  49. package/lib/components/sections/brand-colors-section/brand-colors-section.component.d.ts +28 -0
  50. package/lib/components/sections/chart-section/chart-section.component.d.ts +30 -0
  51. package/lib/components/sections/contact-card-section/contact-card-section.component.d.ts +35 -0
  52. package/lib/components/sections/event-section/event-section.component.d.ts +17 -0
  53. package/lib/components/sections/fallback-section/fallback-section.component.d.ts +7 -0
  54. package/lib/components/sections/financials-section/financials-section.component.d.ts +27 -0
  55. package/lib/components/sections/info-section.component.d.ts +33 -0
  56. package/lib/components/sections/list-section/list-section.component.d.ts +21 -0
  57. package/lib/components/sections/map-section/map-section.component.d.ts +22 -0
  58. package/lib/components/sections/network-card-section/network-card-section.component.d.ts +18 -0
  59. package/lib/components/sections/news-section/news-section.component.d.ts +16 -0
  60. package/lib/components/sections/overview-section/overview-section.component.d.ts +19 -0
  61. package/lib/components/sections/product-section/product-section.component.d.ts +57 -0
  62. package/lib/components/sections/quotation-section/quotation-section.component.d.ts +23 -0
  63. package/lib/components/sections/social-media-section/social-media-section.component.d.ts +11 -0
  64. package/lib/components/sections/solutions-section/solutions-section.component.d.ts +19 -0
  65. package/lib/components/sections/text-reference-section/text-reference-section.component.d.ts +25 -0
  66. package/lib/icons/index.d.ts +1 -0
  67. package/lib/icons/lucide-icons.module.d.ts +7 -0
  68. package/lib/models/card.model.d.ts +289 -0
  69. package/lib/models/index.d.ts +1 -0
  70. package/lib/services/icon.service.d.ts +9 -0
  71. package/lib/services/index.d.ts +4 -0
  72. package/lib/services/magnetic-tilt.service.d.ts +34 -0
  73. package/lib/services/section-normalization.service.d.ts +38 -0
  74. package/lib/services/section-utils.service.d.ts +46 -0
  75. package/lib/utils/card-diff.util.d.ts +52 -0
  76. package/lib/utils/index.d.ts +2 -0
  77. package/lib/utils/responsive.util.d.ts +2 -0
  78. package/package.json +63 -0
  79. package/public-api.d.ts +50 -0
  80. package/styles/_styles.scss +95 -0
  81. package/styles/components/cards/_ai-card.scss +743 -0
  82. package/styles/components/sections/_analytics.scss +280 -0
  83. package/styles/components/sections/_brand-colors.scss +280 -0
  84. package/styles/components/sections/_chart.scss +494 -0
  85. package/styles/components/sections/_contact.scss +250 -0
  86. package/styles/components/sections/_design-system.scss +540 -0
  87. package/styles/components/sections/_event.scss +246 -0
  88. package/styles/components/sections/_fallback.scss +172 -0
  89. package/styles/components/sections/_financials.scss +258 -0
  90. package/styles/components/sections/_global-enforcement.scss +648 -0
  91. package/styles/components/sections/_info.scss +224 -0
  92. package/styles/components/sections/_list.scss +216 -0
  93. package/styles/components/sections/_map.scss +186 -0
  94. package/styles/components/sections/_network.scss +115 -0
  95. package/styles/components/sections/_news.scss +81 -0
  96. package/styles/components/sections/_overview.scss +159 -0
  97. package/styles/components/sections/_product.scss +906 -0
  98. package/styles/components/sections/_quotation.scss +151 -0
  99. package/styles/components/sections/_section-shell.scss +385 -0
  100. package/styles/components/sections/_section-types.scss +290 -0
  101. package/styles/components/sections/_sections-base.scss +332 -0
  102. package/styles/components/sections/_social-media.scss +88 -0
  103. package/styles/components/sections/_solutions.scss +205 -0
  104. package/styles/components/sections/_text-reference.scss +158 -0
  105. package/styles/components/sections/_unified-cards.scss +124 -0
  106. package/styles/core/_animations.scss +766 -0
  107. package/styles/core/_global.scss +66 -0
  108. package/styles/core/_mixins.scss +140 -0
  109. package/styles/core/_surface-layers.scss +76 -0
  110. package/styles/core/_utilities.scss +193 -0
  111. package/styles/core/_variables.scss +462 -0
  112. package/styles/core/variables/_colors.scss +212 -0
  113. package/styles/layout/_masonry.scss +60 -0
  114. package/styles/layout/_tilt.scss +214 -0
@@ -0,0 +1,33 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { CardField } from '../../models';
3
+ import { BaseSectionComponent } from './base-section.component';
4
+ import * as i0 from "@angular/core";
5
+ type InfoField = CardField & {
6
+ description?: string;
7
+ change?: number;
8
+ trend?: 'up' | 'down' | 'stable' | 'neutral';
9
+ };
10
+ export interface InfoSectionFieldInteraction {
11
+ sectionTitle?: string;
12
+ field: CardField;
13
+ }
14
+ export declare class InfoSectionComponent extends BaseSectionComponent<InfoField> {
15
+ private readonly utils;
16
+ infoFieldInteraction: EventEmitter<InfoSectionFieldInteraction>;
17
+ get fields(): InfoField[];
18
+ get hasFields(): boolean;
19
+ onFieldClick(field: InfoField): void;
20
+ getTrendIcon(field: InfoField): string | null;
21
+ getTrendClass(field: InfoField): string;
22
+ getTrendIconClass(field: InfoField): string;
23
+ formatChange(change?: number): string;
24
+ /**
25
+ * Get display value, hiding "Streaming…" placeholder text
26
+ * Inline implementation to avoid TypeScript override conflicts
27
+ */
28
+ getDisplayValue(field: InfoField): string;
29
+ trackField(index: number, field: InfoField): string;
30
+ static ɵfac: i0.ɵɵFactoryDeclaration<InfoSectionComponent, never>;
31
+ static ɵcmp: i0.ɵɵComponentDeclaration<InfoSectionComponent, "app-info-section", never, {}, { "infoFieldInteraction": "infoFieldInteraction"; }, never, never, true, never>;
32
+ }
33
+ export {};
@@ -0,0 +1,21 @@
1
+ import { CardField, CardItem } from '../../../models';
2
+ import { BaseSectionComponent } from '../base-section.component';
3
+ import * as i0 from "@angular/core";
4
+ type ListEntry = (CardItem & CardField) & {
5
+ priority?: string;
6
+ assignee?: string;
7
+ date?: string;
8
+ };
9
+ export declare class ListSectionComponent extends BaseSectionComponent<ListEntry> {
10
+ get items(): ListEntry[];
11
+ onItemClick(item: ListEntry): void;
12
+ /**
13
+ * Get display description, hiding "Streaming…" placeholder text
14
+ * Inline implementation to avoid TypeScript override conflicts
15
+ */
16
+ getDisplayDescription(item: ListEntry): string;
17
+ trackItem(index: number, item: ListEntry): string;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<ListSectionComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<ListSectionComponent, "app-list-section", never, {}, {}, never, never, true, never>;
20
+ }
21
+ export {};
@@ -0,0 +1,22 @@
1
+ import { CardField, CardItem } from '../../../models';
2
+ import { BaseSectionComponent } from '../base-section.component';
3
+ import * as i0 from "@angular/core";
4
+ type MapLocation = (CardField & CardItem) & {
5
+ coordinates?: {
6
+ lat: number;
7
+ lng: number;
8
+ };
9
+ address?: string;
10
+ name: string;
11
+ type?: string;
12
+ };
13
+ export declare class MapSectionComponent extends BaseSectionComponent<MapLocation> {
14
+ get locations(): MapLocation[];
15
+ get hasItems(): boolean;
16
+ onLocationClick(location: MapLocation): void;
17
+ formatCoordinates(location: MapLocation): string | null;
18
+ trackItem(index: number, location: MapLocation): string;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<MapSectionComponent, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<MapSectionComponent, "app-map-section", never, {}, {}, never, never, true, never>;
21
+ }
22
+ export {};
@@ -0,0 +1,18 @@
1
+ import { CardField } from '../../../models';
2
+ import { BaseSectionComponent } from '../base-section.component';
3
+ import * as i0 from "@angular/core";
4
+ type NetworkField = CardField;
5
+ export declare class NetworkCardSectionComponent extends BaseSectionComponent<NetworkField> {
6
+ get fields(): NetworkField[];
7
+ get hasFields(): boolean;
8
+ trackField: (_index: number, field: NetworkField) => string;
9
+ onItemClick(field: NetworkField): void;
10
+ /**
11
+ * Get display value, hiding "Streaming…" placeholder text
12
+ * Inline implementation to avoid TypeScript override conflicts
13
+ */
14
+ getDisplayValue(field: NetworkField): string;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<NetworkCardSectionComponent, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<NetworkCardSectionComponent, "app-network-card-section", never, {}, {}, never, never, true, never>;
17
+ }
18
+ export {};
@@ -0,0 +1,16 @@
1
+ import { BaseSectionComponent } from '../base-section.component';
2
+ import { CardItem } from '../../../models';
3
+ import * as i0 from "@angular/core";
4
+ export declare class NewsSectionComponent extends BaseSectionComponent<CardItem> {
5
+ get newsItems(): CardItem[];
6
+ formatSource(item: CardItem): string;
7
+ formatTimestamp(item: CardItem): string;
8
+ /**
9
+ * Get display description, hiding "Streaming…" placeholder text
10
+ * Inline implementation to avoid TypeScript override conflicts
11
+ */
12
+ getDisplayDescription(item: CardItem): string;
13
+ trackItem(index: number, item: CardItem): string;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<NewsSectionComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<NewsSectionComponent, "app-news-section", never, {}, {}, never, never, true, never>;
16
+ }
@@ -0,0 +1,19 @@
1
+ import { CardField } from '../../../models';
2
+ import { BaseSectionComponent } from '../base-section.component';
3
+ import { SectionUtilsService } from '../../../services';
4
+ import * as i0 from "@angular/core";
5
+ export declare class OverviewSectionComponent extends BaseSectionComponent<CardField> {
6
+ protected readonly utils: SectionUtilsService;
7
+ get fields(): CardField[];
8
+ get hasFields(): boolean;
9
+ onFieldClick(field: CardField): void;
10
+ trackField(index: number, field: CardField): string;
11
+ getStatusClasses(status?: string): string;
12
+ /**
13
+ * Get display value, hiding "Streaming…" placeholder text
14
+ * Inline implementation to avoid TypeScript override conflicts
15
+ */
16
+ getDisplayValue(field: CardField): string;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<OverviewSectionComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<OverviewSectionComponent, "app-overview-section", never, {}, {}, never, never, true, never>;
19
+ }
@@ -0,0 +1,57 @@
1
+ import { CardField } from '../../../models';
2
+ import { BaseSectionComponent } from '../base-section.component';
3
+ import * as i0 from "@angular/core";
4
+ interface ProductField extends CardField {
5
+ category?: 'pricing' | 'features' | 'process' | 'references' | 'contacts' | 'advantages' | string;
6
+ benefits?: string[];
7
+ outcomes?: string[];
8
+ deliveryTime?: string;
9
+ teamSize?: string;
10
+ contact?: {
11
+ name: string;
12
+ role: string;
13
+ email?: string;
14
+ phone?: string;
15
+ avatar?: string;
16
+ };
17
+ reference?: {
18
+ company: string;
19
+ testimonial?: string;
20
+ logo?: string;
21
+ };
22
+ }
23
+ interface ProductCategoryGroup {
24
+ key: string;
25
+ title: string;
26
+ icon: string;
27
+ fields: ProductField[];
28
+ }
29
+ export declare class ProductSectionComponent extends BaseSectionComponent<ProductField> {
30
+ private readonly categoryOrder;
31
+ private readonly categoryConfig;
32
+ readonly referenceStars: number[];
33
+ get fields(): ProductField[];
34
+ get hasFields(): boolean;
35
+ get categoryGroups(): ProductCategoryGroup[];
36
+ get referenceGroup(): ProductCategoryGroup | null;
37
+ get gridGroups(): ProductCategoryGroup[];
38
+ get summaryStats(): {
39
+ label: string;
40
+ value: number;
41
+ }[];
42
+ isContactField(field: ProductField): boolean;
43
+ isReferenceField(field: ProductField): boolean;
44
+ onFieldClick(field: ProductField): void;
45
+ trackGroup: (_index: number, group: ProductCategoryGroup) => string;
46
+ trackField: (_index: number, field: ProductField) => string;
47
+ getGroupBadgeLabel(group: ProductCategoryGroup): string;
48
+ getCategoryIconTone(group: ProductCategoryGroup): string;
49
+ /**
50
+ * Get display value, hiding "Streaming…" placeholder text
51
+ * Inline implementation to avoid TypeScript override conflicts
52
+ */
53
+ getDisplayValue(field: ProductField): string;
54
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProductSectionComponent, never>;
55
+ static ɵcmp: i0.ɵɵComponentDeclaration<ProductSectionComponent, "app-product-section", never, {}, {}, never, never, true, never>;
56
+ }
57
+ export {};
@@ -0,0 +1,23 @@
1
+ import { BaseSectionComponent } from '../base-section.component';
2
+ import { CardField } from '../../../models';
3
+ import * as i0 from "@angular/core";
4
+ type QuotationField = CardField & {
5
+ quote: string;
6
+ author?: string;
7
+ source?: string;
8
+ date?: string;
9
+ };
10
+ export declare class QuotationSectionComponent extends BaseSectionComponent<QuotationField> {
11
+ get fields(): QuotationField[];
12
+ get hasFields(): boolean;
13
+ trackField(index: number, field: QuotationField): string;
14
+ onQuotationClick(field: QuotationField): void;
15
+ /**
16
+ * Get display quote, hiding "Streaming…" placeholder text
17
+ * Inline implementation to avoid TypeScript override conflicts
18
+ */
19
+ getDisplayQuote(field: QuotationField): string;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<QuotationSectionComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<QuotationSectionComponent, "app-quotation-section", never, {}, {}, never, never, true, never>;
22
+ }
23
+ export {};
@@ -0,0 +1,11 @@
1
+ import { BaseSectionComponent } from '../base-section.component';
2
+ import { CardItem } from '../../../models';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SocialMediaSectionComponent extends BaseSectionComponent<CardItem> {
5
+ get posts(): CardItem[];
6
+ formatPlatform(item: CardItem): string;
7
+ formatMetric(item: CardItem): string;
8
+ trackPost(index: number, post: CardItem): string;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<SocialMediaSectionComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<SocialMediaSectionComponent, "app-social-media-section", never, {}, {}, never, never, true, never>;
11
+ }
@@ -0,0 +1,19 @@
1
+ import { CardField } from '../../../models';
2
+ import { BaseSectionComponent } from '../base-section.component';
3
+ import * as i0 from "@angular/core";
4
+ interface SolutionField extends CardField {
5
+ category?: 'consulting' | 'technology' | 'managed' | 'training' | 'support' | string;
6
+ benefits?: string[];
7
+ deliveryTime?: string;
8
+ teamSize?: string;
9
+ outcomes?: string[];
10
+ }
11
+ export declare class SolutionsSectionComponent extends BaseSectionComponent<SolutionField> {
12
+ get fields(): SolutionField[];
13
+ get hasFields(): boolean;
14
+ trackField(index: number, field: SolutionField): string;
15
+ onSolutionClick(field: SolutionField): void;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<SolutionsSectionComponent, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<SolutionsSectionComponent, "app-solutions-section", never, {}, {}, never, never, true, never>;
18
+ }
19
+ export {};
@@ -0,0 +1,25 @@
1
+ import { BaseSectionComponent } from '../base-section.component';
2
+ import { CardField } from '../../../models';
3
+ import * as i0 from "@angular/core";
4
+ type TextReferenceField = CardField & {
5
+ text: string;
6
+ referenceText?: string;
7
+ source?: string;
8
+ url?: string;
9
+ date?: string;
10
+ category?: string;
11
+ };
12
+ export declare class TextReferenceSectionComponent extends BaseSectionComponent<TextReferenceField> {
13
+ get fields(): TextReferenceField[];
14
+ get hasFields(): boolean;
15
+ onReferenceClick(field: TextReferenceField): void;
16
+ openReference(field: TextReferenceField, event: Event): void;
17
+ /**
18
+ * Get display text, hiding "Streaming…" placeholder text
19
+ * Inline implementation to avoid TypeScript override conflicts
20
+ */
21
+ getDisplayText(field: TextReferenceField): string;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<TextReferenceSectionComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<TextReferenceSectionComponent, "app-text-reference-section", never, {}, {}, never, never, true, never>;
24
+ }
25
+ export {};
@@ -0,0 +1 @@
1
+ export * from './lucide-icons.module';
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "lucide-angular";
3
+ export declare class LucideIconsModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<LucideIconsModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<LucideIconsModule, never, [typeof i1.LucideAngularModule], [typeof i1.LucideAngularModule]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<LucideIconsModule>;
7
+ }
@@ -0,0 +1,289 @@
1
+ export type CardType = 'company' | 'contact' | 'opportunity' | 'product' | 'analytics' | 'event' | 'project' | 'sko';
2
+ export interface AICardConfig {
3
+ id?: string;
4
+ cardTitle: string;
5
+ cardSubtitle?: string;
6
+ cardType?: CardType;
7
+ description?: string;
8
+ columns?: 1 | 2 | 3;
9
+ sections: CardSection[];
10
+ actions?: CardAction[];
11
+ meta?: Record<string, unknown>;
12
+ processedAt?: number;
13
+ }
14
+ export interface CardSection {
15
+ id?: string;
16
+ title: string;
17
+ type: 'info' | 'timeline' | 'analytics' | 'metrics' | 'contact-card' | 'network-card' | 'map' | 'financials' | 'locations' | 'event' | 'project' | 'list' | 'table' | 'chart' | 'product' | 'solutions' | 'overview' | 'stats' | 'quotation' | 'reference' | 'text-reference' | 'text-ref' | 'brand-colors';
18
+ description?: string;
19
+ subtitle?: string;
20
+ columns?: number;
21
+ colSpan?: number;
22
+ width?: number;
23
+ collapsed?: boolean;
24
+ emoji?: string;
25
+ fields?: CardField[];
26
+ items?: CardItem[];
27
+ chartType?: 'bar' | 'line' | 'pie' | 'doughnut';
28
+ chartData?: {
29
+ labels?: string[];
30
+ datasets?: {
31
+ label?: string;
32
+ data: number[];
33
+ backgroundColor?: string | string[];
34
+ borderColor?: string | string[];
35
+ borderWidth?: number;
36
+ }[];
37
+ };
38
+ meta?: Record<string, unknown>;
39
+ [key: string]: unknown;
40
+ }
41
+ export interface CardField {
42
+ id?: string;
43
+ label?: string;
44
+ title?: string;
45
+ value?: string | number | boolean | null;
46
+ icon?: string;
47
+ format?: 'currency' | 'percentage' | 'number' | 'text';
48
+ percentage?: number;
49
+ change?: number;
50
+ trend?: 'up' | 'down' | 'stable' | 'neutral';
51
+ performance?: string;
52
+ chartData?: unknown;
53
+ description?: string;
54
+ name?: string;
55
+ x?: number;
56
+ y?: number;
57
+ type?: string;
58
+ address?: string;
59
+ coordinates?: {
60
+ lat: number;
61
+ lng: number;
62
+ };
63
+ role?: string;
64
+ email?: string;
65
+ phone?: string;
66
+ avatar?: string;
67
+ department?: string;
68
+ location?: string;
69
+ status?: 'completed' | 'in-progress' | 'pending' | 'cancelled' | 'active' | 'inactive' | 'warning';
70
+ priority?: 'high' | 'medium' | 'low';
71
+ date?: string;
72
+ time?: string;
73
+ assignee?: string;
74
+ attendees?: number;
75
+ category?: string;
76
+ contact?: {
77
+ name: string;
78
+ role: string;
79
+ email?: string;
80
+ phone?: string;
81
+ };
82
+ reference?: {
83
+ company: string;
84
+ testimonial?: string;
85
+ logo?: string;
86
+ };
87
+ benefits?: string[];
88
+ deliveryTime?: string;
89
+ complexity?: 'low' | 'medium' | 'high';
90
+ teamSize?: string;
91
+ outcomes?: string[];
92
+ connections?: number;
93
+ strength?: number;
94
+ valueColor?: string;
95
+ backgroundColor?: string;
96
+ clickable?: boolean;
97
+ link?: string;
98
+ meta?: Record<string, unknown>;
99
+ [key: string]: unknown;
100
+ }
101
+ export interface CardItem {
102
+ id?: string;
103
+ title: string;
104
+ description?: string;
105
+ icon?: string;
106
+ value?: string | number;
107
+ status?: string;
108
+ meta?: Record<string, unknown>;
109
+ }
110
+ /**
111
+ * Button type for card actions - comes from JSON 'type' field
112
+ * - 'mail': Opens default email client with pre-filled recipient, subject, and body
113
+ * - 'website': Opens URL in a new browser tab/window
114
+ * - 'agent': Triggers an agent action (emits agentAction event for parent handling)
115
+ * - 'question': Writes a new message to the chat (emits questionAction event for parent handling)
116
+ *
117
+ * Legacy values ('primary', 'secondary') are supported for backward compatibility but should use 'variant' for styling
118
+ */
119
+ export type CardActionButtonType = 'mail' | 'website' | 'agent' | 'question' | 'primary' | 'secondary';
120
+ /**
121
+ * Email contact information - required for mail button type
122
+ */
123
+ export interface EmailContact {
124
+ name: string;
125
+ email: string;
126
+ role: string;
127
+ }
128
+ /**
129
+ * Email configuration - required when type is 'mail'
130
+ * Must include contact, subject, and body
131
+ */
132
+ export interface EmailConfig {
133
+ /** Contact information - required */
134
+ contact: EmailContact;
135
+ /** Email subject - required */
136
+ subject: string;
137
+ /** Email body - required */
138
+ body: string;
139
+ /** Direct recipient email(s) - optional, defaults to contact.email */
140
+ to?: string | string[];
141
+ /** CC recipient(s) - optional */
142
+ cc?: string | string[];
143
+ /** BCC recipient(s) - optional */
144
+ bcc?: string | string[];
145
+ }
146
+ /**
147
+ * Base card action properties shared by all action types
148
+ */
149
+ interface BaseCardAction {
150
+ id?: string;
151
+ label: string;
152
+ /** Icon identifier for the button (emoji, icon name, or image URL) */
153
+ icon?: string;
154
+ /** Legacy action property - URL string or action identifier */
155
+ action?: string;
156
+ /** Visual variant for button styling (primary, secondary, outline, ghost) */
157
+ variant?: 'primary' | 'secondary' | 'outline' | 'ghost';
158
+ /** Additional metadata for the action */
159
+ meta?: Record<string, unknown>;
160
+ }
161
+ /**
162
+ * Mail action - requires email configuration with contact, subject, and body
163
+ */
164
+ export interface MailCardAction extends BaseCardAction {
165
+ type: 'mail';
166
+ /** Email configuration - required for mail type */
167
+ email: EmailConfig;
168
+ }
169
+ /**
170
+ * Website action - requires URL
171
+ */
172
+ export interface WebsiteCardAction extends BaseCardAction {
173
+ type: 'website';
174
+ /** URL to open - can be in 'url' field or 'action' field when type is 'website' */
175
+ url?: string;
176
+ }
177
+ /**
178
+ * Agent action - optional agentId and context
179
+ */
180
+ export interface AgentCardAction extends BaseCardAction {
181
+ type: 'agent';
182
+ /** Agent identifier - optional when type is 'agent' */
183
+ agentId?: string;
184
+ /** Additional context for agent action */
185
+ agentContext?: Record<string, unknown>;
186
+ }
187
+ /**
188
+ * Question action - optional pre-filled question
189
+ */
190
+ export interface QuestionCardAction extends BaseCardAction {
191
+ type: 'question';
192
+ /** Pre-filled question text - optional when type is 'question' */
193
+ question?: string;
194
+ }
195
+ /**
196
+ * Legacy action types for backward compatibility
197
+ */
198
+ export interface LegacyCardAction extends BaseCardAction {
199
+ type?: 'primary' | 'secondary' | CardActionButtonType;
200
+ /** Legacy email configuration - optional */
201
+ email?: {
202
+ to?: string | string[];
203
+ cc?: string | string[];
204
+ bcc?: string | string[];
205
+ subject?: string;
206
+ body?: string;
207
+ contact?: {
208
+ name?: string;
209
+ email?: string;
210
+ role?: string;
211
+ };
212
+ };
213
+ url?: string;
214
+ agentId?: string;
215
+ agentContext?: Record<string, unknown>;
216
+ question?: string;
217
+ }
218
+ /**
219
+ * Card action button configuration
220
+ * The 'type' field from JSON determines button behavior (mail, website, agent, question)
221
+ * The 'variant' field determines visual styling (primary, secondary, outline, ghost)
222
+ *
223
+ * @example
224
+ * // Mail button - REQUIRES email.contact, email.subject, and email.body
225
+ * {
226
+ * "label": "Send Email to Client",
227
+ * "type": "mail",
228
+ * "variant": "primary",
229
+ * "icon": "📧",
230
+ * "email": {
231
+ * "contact": {
232
+ * "name": "Robert Chen",
233
+ * "email": "robert.chen@manufacturing.com",
234
+ * "role": "Chief Information Officer"
235
+ * },
236
+ * "subject": "Orange Business Solutions - Recommended Solutions",
237
+ * "body": "Dear Robert Chen,\n\nI am pleased to present..."
238
+ * }
239
+ * }
240
+ *
241
+ * @example
242
+ * // Website button
243
+ * {
244
+ * "label": "Visit Website",
245
+ * "type": "website",
246
+ * "variant": "primary",
247
+ * "url": "https://example.com"
248
+ * }
249
+ *
250
+ * @example
251
+ * // Agent button
252
+ * {
253
+ * "label": "Contact Agent",
254
+ * "type": "agent",
255
+ * "variant": "outline",
256
+ * "agentId": "agent-123",
257
+ * "agentContext": { "context": "sales" }
258
+ * }
259
+ *
260
+ * @example
261
+ * // Question button
262
+ * {
263
+ * "label": "Ask Question",
264
+ * "type": "question",
265
+ * "variant": "ghost",
266
+ * "question": "What is the status?"
267
+ * }
268
+ */
269
+ export type CardAction = MailCardAction | WebsiteCardAction | AgentCardAction | QuestionCardAction | LegacyCardAction;
270
+ export declare class CardTypeGuards {
271
+ static isAICardConfig(obj: unknown): obj is AICardConfig;
272
+ static isCardSection(obj: unknown): obj is CardSection;
273
+ static isCardField(obj: unknown): obj is CardField;
274
+ /**
275
+ * Type guard to check if an action is a valid mail action
276
+ * Validates that required fields (contact, subject, body) are present
277
+ */
278
+ static isMailAction(obj: unknown): obj is MailCardAction;
279
+ }
280
+ export declare class CardUtils {
281
+ static safeString(value: unknown, maxLength?: number): string;
282
+ static safeNumber(value: unknown, defaultValue?: number): number;
283
+ static generateId(prefix?: string): string;
284
+ static ensureSectionIds(sections: CardSection[]): CardSection[];
285
+ static ensureFieldIds(fields: CardField[], sectionIndex: number): CardField[];
286
+ static ensureItemIds(items: CardItem[], sectionIndex: number): CardItem[];
287
+ static sanitizeCardConfig(config: unknown): AICardConfig | null;
288
+ }
289
+ export {};
@@ -0,0 +1 @@
1
+ export * from './card.model';
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class IconService {
3
+ private iconMap;
4
+ private classMap;
5
+ getFieldIcon(fieldName: string): string;
6
+ getFieldIconClass(fieldName: string): string;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<IconService, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<IconService>;
9
+ }
@@ -0,0 +1,4 @@
1
+ export * from './icon.service';
2
+ export * from './section-normalization.service';
3
+ export * from './magnetic-tilt.service';
4
+ export * from './section-utils.service';
@@ -0,0 +1,34 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export interface MousePosition {
4
+ x: number;
5
+ y: number;
6
+ }
7
+ export interface TiltCalculations {
8
+ rotateX: number;
9
+ rotateY: number;
10
+ glowBlur: number;
11
+ glowOpacity: number;
12
+ reflectionOpacity: number;
13
+ }
14
+ export declare class MagneticTiltService implements OnDestroy {
15
+ private tiltCalculationsSubject;
16
+ tiltCalculations$: import("rxjs").Observable<TiltCalculations>;
17
+ private elementCache;
18
+ private rafId;
19
+ private pendingUpdate;
20
+ private lastCalculations;
21
+ private readonly CACHE_DURATION;
22
+ private readonly ngZone;
23
+ calculateTilt(mousePosition: MousePosition, element: HTMLElement | null): void;
24
+ private processTiltUpdate;
25
+ private getElementCache;
26
+ private hasCalculationsChanged;
27
+ private resetTimeoutId;
28
+ private readonly RESET_TRANSITION_DURATION_MS;
29
+ resetTilt(smooth?: boolean): void;
30
+ clearCache(element?: HTMLElement): void;
31
+ ngOnDestroy(): void;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<MagneticTiltService, never>;
33
+ static ɵprov: i0.ɵɵInjectableDeclaration<MagneticTiltService>;
34
+ }
@@ -0,0 +1,38 @@
1
+ import { CardSection } from '../models/card.model';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SectionNormalizationService {
4
+ /**
5
+ * Supported section types
6
+ */
7
+ private readonly supportedTypes;
8
+ /**
9
+ * Normalize a section by resolving its type and ensuring required properties
10
+ */
11
+ normalizeSection(section: CardSection): CardSection;
12
+ /**
13
+ * Get column span thresholds for a section type
14
+ * This is the default logic for each section type
15
+ */
16
+ private getColSpanThresholdsForType;
17
+ /**
18
+ * Resolve section type from raw type and title
19
+ */
20
+ private resolveSectionType;
21
+ /**
22
+ * Get section priority for sorting
23
+ * Lower numbers appear first
24
+ */
25
+ getSectionPriority(section: CardSection): number;
26
+ /**
27
+ * Sort sections by priority
28
+ */
29
+ sortSections(sections: CardSection[]): CardSection[];
30
+ private compareStreamingOrder;
31
+ private getStreamingOrder;
32
+ /**
33
+ * Normalize and sort sections
34
+ */
35
+ normalizeAndSortSections(sections: CardSection[]): CardSection[];
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<SectionNormalizationService, never>;
37
+ static ɵprov: i0.ɵɵInjectableDeclaration<SectionNormalizationService>;
38
+ }