c3-components 0.15.1 → 0.15.3
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/fesm2022/c3-components.mjs +75 -25
- package/fesm2022/c3-components.mjs.map +1 -1
- package/index.d.ts +51 -15
- package/package.json +1 -1
|
@@ -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
|
/**
|
|
@@ -1781,25 +1797,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
1781
1797
|
|
|
1782
1798
|
const C3_FILE_DISPLAY_LIST = new InjectionToken('C3_FILE_DISPLAY_LIST');
|
|
1783
1799
|
|
|
1784
|
-
class C3FileDisplayListColumnDefDirective {
|
|
1785
|
-
constructor() {
|
|
1786
|
-
this.title = input.required(...(ngDevMode ? [{ debugName: "title", alias: 'c3FileDisplayListColumnDef' }] : [{
|
|
1787
|
-
alias: 'c3FileDisplayListColumnDef',
|
|
1788
|
-
}]));
|
|
1789
|
-
this.classList = input([], ...(ngDevMode ? [{ debugName: "classList" }] : []));
|
|
1790
|
-
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" }] : []));
|
|
1793
|
-
}
|
|
1794
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: C3FileDisplayListColumnDefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1795
|
-
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 }); }
|
|
1796
|
-
}
|
|
1797
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: C3FileDisplayListColumnDefDirective, decorators: [{
|
|
1798
|
-
type: Directive,
|
|
1799
|
-
args: [{
|
|
1800
|
-
selector: '[c3FileDisplayListColumnDef]',
|
|
1801
|
-
}]
|
|
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 }] }] } });
|
|
1803
1800
|
class C3FileDisplayListHeaderCellDefDirective {
|
|
1804
1801
|
constructor() {
|
|
1805
1802
|
this.template = inject(TemplateRef);
|
|
@@ -1811,6 +1808,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
1811
1808
|
type: Directive,
|
|
1812
1809
|
args: [{
|
|
1813
1810
|
selector: '[c3FileDisplayListHeaderCellDef]',
|
|
1811
|
+
standalone: true,
|
|
1814
1812
|
}]
|
|
1815
1813
|
}] });
|
|
1816
1814
|
class C3FileDisplayListCellDefDirective {
|
|
@@ -1824,8 +1822,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
1824
1822
|
type: Directive,
|
|
1825
1823
|
args: [{
|
|
1826
1824
|
selector: '[c3FileDisplayListCellDef]',
|
|
1825
|
+
standalone: true,
|
|
1827
1826
|
}]
|
|
1828
1827
|
}] });
|
|
1828
|
+
class C3FileDisplayListColumnDefDirective {
|
|
1829
|
+
constructor() {
|
|
1830
|
+
this.title = input.required(...(ngDevMode ? [{ debugName: "title", alias: 'c3FileDisplayListColumnDef' }] : [{
|
|
1831
|
+
alias: 'c3FileDisplayListColumnDef',
|
|
1832
|
+
}]));
|
|
1833
|
+
this.classList = input([], ...(ngDevMode ? [{ debugName: "classList" }] : []));
|
|
1834
|
+
this._table = inject(C3_FILE_DISPLAY_LIST, { optional: true });
|
|
1835
|
+
// contentChild searches in projected content (via ng-content)
|
|
1836
|
+
// Note: contentChild may not find directives on ng-template in tests, but works in real usage
|
|
1837
|
+
// when directives are projected via ng-content in the parent component
|
|
1838
|
+
this.headerCellDef = contentChild(forwardRef(() => C3FileDisplayListHeaderCellDefDirective), ...(ngDevMode ? [{ debugName: "headerCellDef", descendants: true }] : [{
|
|
1839
|
+
descendants: true,
|
|
1840
|
+
}]));
|
|
1841
|
+
this.cellDef = contentChild(forwardRef(() => C3FileDisplayListCellDefDirective), ...(ngDevMode ? [{ debugName: "cellDef", descendants: true }] : [{
|
|
1842
|
+
descendants: true,
|
|
1843
|
+
}]));
|
|
1844
|
+
}
|
|
1845
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: C3FileDisplayListColumnDefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1846
|
+
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: i0.forwardRef(() => C3FileDisplayListHeaderCellDefDirective), descendants: true, isSignal: true }, { propertyName: "cellDef", first: true, predicate: i0.forwardRef(() => C3FileDisplayListCellDefDirective), descendants: true, isSignal: true }], ngImport: i0 }); }
|
|
1847
|
+
}
|
|
1848
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: C3FileDisplayListColumnDefDirective, decorators: [{
|
|
1849
|
+
type: Directive,
|
|
1850
|
+
args: [{
|
|
1851
|
+
selector: '[c3FileDisplayListColumnDef]',
|
|
1852
|
+
standalone: true,
|
|
1853
|
+
}]
|
|
1854
|
+
}], 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: [forwardRef(() => C3FileDisplayListHeaderCellDefDirective), { ...{
|
|
1855
|
+
descendants: true,
|
|
1856
|
+
}, isSignal: true }] }], cellDef: [{ type: i0.ContentChild, args: [forwardRef(() => C3FileDisplayListCellDefDirective), { ...{
|
|
1857
|
+
descendants: true,
|
|
1858
|
+
}, isSignal: true }] }] } });
|
|
1829
1859
|
|
|
1830
1860
|
class C3FileDisplayListComponent {
|
|
1831
1861
|
constructor() {
|
|
@@ -1867,7 +1897,7 @@ class C3FileDisplayListComponent {
|
|
|
1867
1897
|
}
|
|
1868
1898
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: C3FileDisplayListComponent, decorators: [{
|
|
1869
1899
|
type: Component,
|
|
1870
|
-
args: [{ selector: 'c3-file-display-list', imports: [
|
|
1900
|
+
args: [{ selector: 'c3-file-display-list', standalone: true, imports: [
|
|
1871
1901
|
C3StopPropagationDirective,
|
|
1872
1902
|
C3FileViewerModule,
|
|
1873
1903
|
C3FileDisplayIconComponent,
|
|
@@ -1971,12 +2001,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
1971
2001
|
}]
|
|
1972
2002
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }] } });
|
|
1973
2003
|
|
|
2004
|
+
/**
|
|
2005
|
+
* C3ExpansionComponent
|
|
2006
|
+
* A style-agnostic expansion panel. Provides the expansion logic and animation
|
|
2007
|
+
* (via c3-auto-animate) but leaves styling to the consumer.
|
|
2008
|
+
*/
|
|
1974
2009
|
class C3ExpansionComponent {
|
|
1975
2010
|
get hostClass() {
|
|
1976
2011
|
return 'c3-expansion';
|
|
1977
2012
|
}
|
|
1978
2013
|
constructor() {
|
|
2014
|
+
/** Class to apply to the header element. Defaults to 'c3-expansion-header'. */
|
|
1979
2015
|
this.headerClass = input('c3-expansion-header', ...(ngDevMode ? [{ debugName: "headerClass" }] : []));
|
|
2016
|
+
/** Whether the panel is expanded. Two-way binding supported. */
|
|
1980
2017
|
this.isExpanded = model(false, ...(ngDevMode ? [{ debugName: "isExpanded" }] : []));
|
|
1981
2018
|
this._elementRef = inject(ElementRef);
|
|
1982
2019
|
this.header = contentChild(C3ExpansionHeaderComponent, ...(ngDevMode ? [{ debugName: "header" }] : []));
|
|
@@ -2216,20 +2253,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
2216
2253
|
|
|
2217
2254
|
class C3TraceCardTitleComponent {
|
|
2218
2255
|
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: [""] }); }
|
|
2256
|
+
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
2257
|
}
|
|
2221
2258
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: C3TraceCardTitleComponent, decorators: [{
|
|
2222
2259
|
type: Component,
|
|
2223
|
-
args: [{ selector: 'c3-trace-card-title', standalone: false,
|
|
2260
|
+
args: [{ selector: 'c3-trace-card-title', standalone: false, host: {
|
|
2261
|
+
class: 'c3-trace-card-title',
|
|
2262
|
+
}, template: "<ng-content></ng-content>\n" }]
|
|
2224
2263
|
}] });
|
|
2225
2264
|
|
|
2226
2265
|
class C3TraceCardContentComponent {
|
|
2227
2266
|
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: [""] }); }
|
|
2267
|
+
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
2268
|
}
|
|
2230
2269
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: C3TraceCardContentComponent, decorators: [{
|
|
2231
2270
|
type: Component,
|
|
2232
|
-
args: [{ selector: 'c3-trace-card-content',
|
|
2271
|
+
args: [{ selector: 'c3-trace-card-content', host: {
|
|
2272
|
+
class: 'c3-trace-card-content',
|
|
2273
|
+
}, standalone: false, template: "<ng-content></ng-content>\n" }]
|
|
2233
2274
|
}] });
|
|
2234
2275
|
|
|
2235
2276
|
class C3TraceCardAlignLeftDirective {
|
|
@@ -2334,6 +2375,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
2334
2375
|
}]
|
|
2335
2376
|
}], ctorParameters: () => [] });
|
|
2336
2377
|
|
|
2378
|
+
/**
|
|
2379
|
+
* C3MenuComponent
|
|
2380
|
+
* Wrapper for the side menu. It projects `c3-nav-item` components.
|
|
2381
|
+
* Automatically handles `headless` mode via query params (managed by C3MenuService).
|
|
2382
|
+
*/
|
|
2337
2383
|
class C3MenuComponent {
|
|
2338
2384
|
constructor() {
|
|
2339
2385
|
this._c3Menu = inject(C3MenuService);
|
|
@@ -2348,9 +2394,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
2348
2394
|
|
|
2349
2395
|
class C3NavItemComponent {
|
|
2350
2396
|
constructor() {
|
|
2397
|
+
/** The router link path for this navigation item. */
|
|
2351
2398
|
this.route = input.required(...(ngDevMode ? [{ debugName: "route" }] : []));
|
|
2399
|
+
/** The title/label of the navigation item. */
|
|
2352
2400
|
this.itemTitle = input.required(...(ngDevMode ? [{ debugName: "itemTitle" }] : []));
|
|
2401
|
+
/** Optional regex string to check if the item is active based on URL. If null, defaults to `route`. */
|
|
2353
2402
|
this.check = input(null, ...(ngDevMode ? [{ debugName: "check" }] : []));
|
|
2403
|
+
/** Whether the link is external (opens in new tab/window). Defaults to false. */
|
|
2354
2404
|
this.isExternal = input(false, ...(ngDevMode ? [{ debugName: "isExternal" }] : []));
|
|
2355
2405
|
this.element = viewChild('button', ...(ngDevMode ? [{ debugName: "element", read: (ElementRef) }] : [{
|
|
2356
2406
|
read: (ElementRef),
|