c3-components 0.15.1 → 0.15.2

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.
@@ -999,10 +999,15 @@ class C3FileViewerComponent {
999
999
  constructor(moduleConfig, _http) {
1000
1000
  this.moduleConfig = moduleConfig;
1001
1001
  this._http = _http;
1002
+ /** Height in pixels occupied by other elements (e.g. header), used to calculate viewer height. Defaults to 0. */
1002
1003
  this.screenHeightOccupied = input(0, ...(ngDevMode ? [{ debugName: "screenHeightOccupied" }] : [])); // In Px
1004
+ /** The C3FileViewer instance to control the viewer. */
1003
1005
  this.fileViewer = input.required(...(ngDevMode ? [{ debugName: "fileViewer" }] : []));
1006
+ /** Emits when the current file index changes. */
1004
1007
  this.indexChange = output();
1008
+ /** Emits configuration changes. */
1005
1009
  this.configChange = output();
1010
+ /** Emits custom events from the file viewer. */
1006
1011
  this.customFileEvent = output();
1007
1012
  // Setup subscriptions in constructor using effect
1008
1013
  effect(() => {
@@ -1576,11 +1581,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
1576
1581
 
1577
1582
  class C3FileDisplayCardComponent {
1578
1583
  constructor() {
1584
+ /**
1585
+ * The file object/metadata to display. Can include an observable for the object URL.
1586
+ */
1579
1587
  this.fileObjectUrl = input.required(...(ngDevMode ? [{ debugName: "fileObjectUrl" }] : []));
1588
+ /**
1589
+ * Function to extract the display name from the file metadata.
1590
+ * Defaults to returning `file.name`.
1591
+ */
1580
1592
  this.displayFn = input((file) => file.name, ...(ngDevMode ? [{ debugName: "displayFn" }] : []));
1593
+ /** Whether the file can be deleted. Defaults to false. */
1581
1594
  this.deletable = input(false, ...(ngDevMode ? [{ debugName: "deletable" }] : []));
1595
+ /** Size of the card. Options: '16', '32', '64', '128', '256'. Defaults to '32'. */
1582
1596
  this.size = input('32', ...(ngDevMode ? [{ debugName: "size" }] : []));
1597
+ /** Emits when the delete button is clicked. */
1583
1598
  this.onDelete = output();
1599
+ /** Emits when the download button/action is triggered. */
1584
1600
  this.onDownload = output();
1585
1601
  this.getFileType = computed(() => {
1586
1602
  const file = this.fileObjectUrl();
@@ -1695,7 +1711,7 @@ class C3FileDisplayIconComponent {
1695
1711
  }
1696
1712
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: C3FileDisplayIconComponent, decorators: [{
1697
1713
  type: Component,
1698
- args: [{ selector: 'c3-file-display-icon', imports: [CommonModule, MatIconModule], template: "<mat-icon [ngClass]=\"color()\">{{ displayedIcon() }}</mat-icon>\n", styles: [":host{display:block}:host .text-primary{color:var(--primary-color)}:host .text-secondary{color:var(--secondary-color)}:host .text-success{color:var(--success-color)}:host .text-gray{color:var(--gray-color)}\n"] }]
1714
+ args: [{ selector: 'c3-file-display-icon', standalone: true, imports: [CommonModule, MatIconModule], template: "<mat-icon [ngClass]=\"color()\">{{ displayedIcon() }}</mat-icon>\n", styles: [":host{display:block}:host .text-primary{color:var(--primary-color)}:host .text-secondary{color:var(--secondary-color)}:host .text-success{color:var(--success-color)}:host .text-gray{color:var(--gray-color)}\n"] }]
1699
1715
  }], propDecorators: { fileType: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileType", required: true }] }] } });
1700
1716
 
1701
1717
  /**
@@ -1788,8 +1804,11 @@ class C3FileDisplayListColumnDefDirective {
1788
1804
  }]));
1789
1805
  this.classList = input([], ...(ngDevMode ? [{ debugName: "classList" }] : []));
1790
1806
  this._table = inject(C3_FILE_DISPLAY_LIST, { optional: true });
1791
- this.headerCellDef = contentChild(C3FileDisplayListHeaderCellDefDirective, ...(ngDevMode ? [{ debugName: "headerCellDef" }] : []));
1792
- this.cellDef = contentChild(C3FileDisplayListCellDefDirective, ...(ngDevMode ? [{ debugName: "cellDef" }] : []));
1807
+ // contentChild searches in projected content (via ng-content)
1808
+ // Note: contentChild may not find directives on ng-template in tests, but works in real usage
1809
+ // when directives are projected via ng-content in the parent component
1810
+ this.headerCellDef = contentChild(C3FileDisplayListHeaderCellDefDirective, ...(ngDevMode ? [{ debugName: "headerCellDef", descendants: true }] : [{ descendants: true }]));
1811
+ this.cellDef = contentChild(C3FileDisplayListCellDefDirective, ...(ngDevMode ? [{ debugName: "cellDef", descendants: true }] : [{ descendants: true }]));
1793
1812
  }
1794
1813
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: C3FileDisplayListColumnDefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1795
1814
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.14", type: C3FileDisplayListColumnDefDirective, isStandalone: true, selector: "[c3FileDisplayListColumnDef]", inputs: { title: { classPropertyName: "title", publicName: "c3FileDisplayListColumnDef", isSignal: true, isRequired: true, transformFunction: null }, classList: { classPropertyName: "classList", publicName: "classList", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "headerCellDef", first: true, predicate: C3FileDisplayListHeaderCellDefDirective, descendants: true, isSignal: true }, { propertyName: "cellDef", first: true, predicate: C3FileDisplayListCellDefDirective, descendants: true, isSignal: true }], ngImport: i0 }); }
@@ -1798,8 +1817,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
1798
1817
  type: Directive,
1799
1818
  args: [{
1800
1819
  selector: '[c3FileDisplayListColumnDef]',
1820
+ standalone: true,
1801
1821
  }]
1802
- }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "c3FileDisplayListColumnDef", required: true }] }], classList: [{ type: i0.Input, args: [{ isSignal: true, alias: "classList", required: false }] }], headerCellDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => C3FileDisplayListHeaderCellDefDirective), { isSignal: true }] }], cellDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => C3FileDisplayListCellDefDirective), { isSignal: true }] }] } });
1822
+ }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "c3FileDisplayListColumnDef", required: true }] }], classList: [{ type: i0.Input, args: [{ isSignal: true, alias: "classList", required: false }] }], headerCellDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => C3FileDisplayListHeaderCellDefDirective), { ...{ descendants: true }, isSignal: true }] }], cellDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => C3FileDisplayListCellDefDirective), { ...{ descendants: true }, isSignal: true }] }] } });
1803
1823
  class C3FileDisplayListHeaderCellDefDirective {
1804
1824
  constructor() {
1805
1825
  this.template = inject(TemplateRef);
@@ -1811,6 +1831,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
1811
1831
  type: Directive,
1812
1832
  args: [{
1813
1833
  selector: '[c3FileDisplayListHeaderCellDef]',
1834
+ standalone: true,
1814
1835
  }]
1815
1836
  }] });
1816
1837
  class C3FileDisplayListCellDefDirective {
@@ -1824,6 +1845,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
1824
1845
  type: Directive,
1825
1846
  args: [{
1826
1847
  selector: '[c3FileDisplayListCellDef]',
1848
+ standalone: true,
1827
1849
  }]
1828
1850
  }] });
1829
1851
 
@@ -1867,7 +1889,7 @@ class C3FileDisplayListComponent {
1867
1889
  }
1868
1890
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: C3FileDisplayListComponent, decorators: [{
1869
1891
  type: Component,
1870
- args: [{ selector: 'c3-file-display-list', imports: [
1892
+ args: [{ selector: 'c3-file-display-list', standalone: true, imports: [
1871
1893
  C3StopPropagationDirective,
1872
1894
  C3FileViewerModule,
1873
1895
  C3FileDisplayIconComponent,
@@ -1971,12 +1993,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
1971
1993
  }]
1972
1994
  }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
1973
1995
 
1996
+ /**
1997
+ * C3ExpansionComponent
1998
+ * A style-agnostic expansion panel. Provides the expansion logic and animation
1999
+ * (via c3-auto-animate) but leaves styling to the consumer.
2000
+ */
1974
2001
  class C3ExpansionComponent {
1975
2002
  get hostClass() {
1976
2003
  return 'c3-expansion';
1977
2004
  }
1978
2005
  constructor() {
2006
+ /** Class to apply to the header element. Defaults to 'c3-expansion-header'. */
1979
2007
  this.headerClass = input('c3-expansion-header', ...(ngDevMode ? [{ debugName: "headerClass" }] : []));
2008
+ /** Whether the panel is expanded. Two-way binding supported. */
1980
2009
  this.isExpanded = model(false, ...(ngDevMode ? [{ debugName: "isExpanded" }] : []));
1981
2010
  this._elementRef = inject(ElementRef);
1982
2011
  this.header = contentChild(C3ExpansionHeaderComponent, ...(ngDevMode ? [{ debugName: "header" }] : []));
@@ -2216,20 +2245,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
2216
2245
 
2217
2246
  class C3TraceCardTitleComponent {
2218
2247
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: C3TraceCardTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2219
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: C3TraceCardTitleComponent, isStandalone: false, selector: "c3-trace-card-title", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] }); }
2248
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: C3TraceCardTitleComponent, isStandalone: false, selector: "c3-trace-card-title", host: { classAttribute: "c3-trace-card-title" }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] }); }
2220
2249
  }
2221
2250
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: C3TraceCardTitleComponent, decorators: [{
2222
2251
  type: Component,
2223
- args: [{ selector: 'c3-trace-card-title', standalone: false, template: "<ng-content></ng-content>\n" }]
2252
+ args: [{ selector: 'c3-trace-card-title', standalone: false, host: {
2253
+ class: 'c3-trace-card-title',
2254
+ }, template: "<ng-content></ng-content>\n" }]
2224
2255
  }] });
2225
2256
 
2226
2257
  class C3TraceCardContentComponent {
2227
2258
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: C3TraceCardContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2228
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: C3TraceCardContentComponent, isStandalone: false, selector: "c3-trace-card-content", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] }); }
2259
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: C3TraceCardContentComponent, isStandalone: false, selector: "c3-trace-card-content", host: { classAttribute: "c3-trace-card-content" }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] }); }
2229
2260
  }
2230
2261
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: C3TraceCardContentComponent, decorators: [{
2231
2262
  type: Component,
2232
- args: [{ selector: 'c3-trace-card-content', standalone: false, template: "<ng-content></ng-content>\n" }]
2263
+ args: [{ selector: 'c3-trace-card-content', host: {
2264
+ class: 'c3-trace-card-content',
2265
+ }, standalone: false, template: "<ng-content></ng-content>\n" }]
2233
2266
  }] });
2234
2267
 
2235
2268
  class C3TraceCardAlignLeftDirective {
@@ -2334,6 +2367,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
2334
2367
  }]
2335
2368
  }], ctorParameters: () => [] });
2336
2369
 
2370
+ /**
2371
+ * C3MenuComponent
2372
+ * Wrapper for the side menu. It projects `c3-nav-item` components.
2373
+ * Automatically handles `headless` mode via query params (managed by C3MenuService).
2374
+ */
2337
2375
  class C3MenuComponent {
2338
2376
  constructor() {
2339
2377
  this._c3Menu = inject(C3MenuService);
@@ -2348,9 +2386,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
2348
2386
 
2349
2387
  class C3NavItemComponent {
2350
2388
  constructor() {
2389
+ /** The router link path for this navigation item. */
2351
2390
  this.route = input.required(...(ngDevMode ? [{ debugName: "route" }] : []));
2391
+ /** The title/label of the navigation item. */
2352
2392
  this.itemTitle = input.required(...(ngDevMode ? [{ debugName: "itemTitle" }] : []));
2393
+ /** Optional regex string to check if the item is active based on URL. If null, defaults to `route`. */
2353
2394
  this.check = input(null, ...(ngDevMode ? [{ debugName: "check" }] : []));
2395
+ /** Whether the link is external (opens in new tab/window). Defaults to false. */
2354
2396
  this.isExternal = input(false, ...(ngDevMode ? [{ debugName: "isExternal" }] : []));
2355
2397
  this.element = viewChild('button', ...(ngDevMode ? [{ debugName: "element", read: (ElementRef) }] : [{
2356
2398
  read: (ElementRef),