c3-components 0.11.8 → 0.12.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.
@@ -1,15 +1,13 @@
1
- import { ChangeDetectorRef, TemplateRef, OnChanges, SimpleChanges } from '@angular/core';
1
+ import { TemplateRef } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
- export declare class C3DropdownComponent implements OnChanges {
4
- private _changeDetectorRef;
5
- template: TemplateRef<any>;
6
- /** Classes to be added to the container of the content. Supports the same syntax as `ngClass`. */
7
- dropdownClass: string | string[] | Set<string> | {
3
+ export declare class C3DropdownComponent {
4
+ readonly panelClass: import("@angular/core").InputSignal<string | string[] | Set<string> | {
8
5
  [key: string]: any;
9
- };
10
- constructor(_changeDetectorRef: ChangeDetectorRef);
11
- ngOnChanges(changes: SimpleChanges): void;
12
- _markForCheck(): void;
6
+ } | undefined>;
7
+ readonly isOpen: import("@angular/core").WritableSignal<boolean>;
8
+ readonly template: import("@angular/core").Signal<TemplateRef<any>>;
9
+ private readonly _changeDetectorRef;
10
+ constructor();
13
11
  static ɵfac: i0.ɵɵFactoryDeclaration<C3DropdownComponent, never>;
14
- static ɵcmp: i0.ɵɵComponentDeclaration<C3DropdownComponent, "c3-dropdown", never, { "dropdownClass": { "alias": "dropdownClass"; "required": false; }; }, {}, never, ["*"], false, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<C3DropdownComponent, "c3-dropdown", never, { "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; }, {}, never, ["*"], false, never>;
15
13
  }
@@ -1,4 +1,4 @@
1
- import { ElementRef, ViewContainerRef, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
1
+ import { ElementRef, ViewContainerRef, OnDestroy } from '@angular/core';
2
2
  import { Overlay } from '@angular/cdk/overlay';
3
3
  import { C3DropdownComponent } from '../components/c3-dropdown.component';
4
4
  import * as i0 from "@angular/core";
@@ -13,27 +13,23 @@ export declare const MAT_DROPDOWN_VALUE_ACCESSOR: any;
13
13
  * @input c3DropdownClass - A string, an array of strings, a set of strings or a
14
14
  * object representing the CSS classes to be applied to the dropdown menu.
15
15
  */
16
- export declare class C3DropdownTrigger implements OnChanges, OnDestroy {
16
+ export declare class C3DropdownTrigger implements OnDestroy {
17
17
  private _element;
18
18
  private _overlay;
19
19
  private _viewContainerRef;
20
20
  private overlayRef?;
21
21
  private _closingActionsSubscription;
22
22
  private _destroyed;
23
- private _dropdownClass;
24
- private _dropdownDisabled;
25
23
  /** The dropdown menu instance */
26
- dropdown?: C3DropdownComponent;
24
+ readonly dropdown: import("@angular/core").ModelSignal<C3DropdownComponent>;
27
25
  /** Whether the dropdown is disabled. */
28
- get dropdownDisabled(): boolean;
29
- set dropdownDisabled(value: boolean);
26
+ readonly dropdownDisabled: import("@angular/core").InputSignal<boolean>;
30
27
  /** Classes to be passed to the dropdown menu. Supports the same syntax as `ngClass`. */
31
- dropdownClass: string | string[] | Set<string> | {
28
+ readonly dropdownClass: import("@angular/core").InputSignal<string | string[] | Set<string> | {
32
29
  [key: string]: any;
33
- };
30
+ }>;
34
31
  constructor(_element: ElementRef<HTMLElement>, _overlay: Overlay, _viewContainerRef: ViewContainerRef);
35
32
  onClick(): void;
36
- ngOnChanges(changes: SimpleChanges): void;
37
33
  ngOnDestroy(): void;
38
34
  show(): void;
39
35
  close(): void;
@@ -41,5 +37,5 @@ export declare class C3DropdownTrigger implements OnChanges, OnDestroy {
41
37
  /** Returns a stream that emits whenever an action that should close the menu occurs. */
42
38
  private _menuClosingActions;
43
39
  static ɵfac: i0.ɵɵFactoryDeclaration<C3DropdownTrigger, never>;
44
- static ɵdir: i0.ɵɵDirectiveDeclaration<C3DropdownTrigger, "[c3Dropdown]", ["c3DropdownTrigger"], { "dropdown": { "alias": "c3Dropdown"; "required": false; }; "dropdownDisabled": { "alias": "c3DropdownDisabled"; "required": false; }; "dropdownClass": { "alias": "c3DropdownClass"; "required": false; }; }, {}, never, never, false, never>;
40
+ static ɵdir: i0.ɵɵDirectiveDeclaration<C3DropdownTrigger, "[c3DropdownTrigger]", never, { "dropdown": { "alias": "c3DropdownTrigger"; "required": true; "isSignal": true; }; "dropdownDisabled": { "alias": "dropdownDisabled"; "required": false; "isSignal": true; }; "dropdownClass": { "alias": "dropdownClass"; "required": false; "isSignal": true; }; }, { "dropdown": "c3DropdownTriggerChange"; }, never, never, false, never>;
45
41
  }
@@ -0,0 +1,20 @@
1
+ import { TemplateRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class C3FileDisplayListColumnDefDirective {
4
+ readonly title: import("@angular/core").InputSignal<string>;
5
+ private readonly _table;
6
+ readonly headerCellDef: import("@angular/core").Signal<C3FileDisplayListHeaderCellDefDirective | undefined>;
7
+ readonly cellDef: import("@angular/core").Signal<C3FileDisplayListCellDefDirective | undefined>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<C3FileDisplayListColumnDefDirective, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<C3FileDisplayListColumnDefDirective, "[c3FileDisplayListColumnDef]", never, { "title": { "alias": "c3FileDisplayListColumnDef"; "required": true; "isSignal": true; }; }, {}, ["headerCellDef", "cellDef"], never, true, never>;
10
+ }
11
+ export declare class C3FileDisplayListHeaderCellDefDirective {
12
+ template: TemplateRef<any>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<C3FileDisplayListHeaderCellDefDirective, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<C3FileDisplayListHeaderCellDefDirective, "[c3FileDisplayListHeaderCellDef]", never, {}, {}, never, never, true, never>;
15
+ }
16
+ export declare class C3FileDisplayListCellDefDirective {
17
+ template: TemplateRef<any>;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<C3FileDisplayListCellDefDirective, never>;
19
+ static ɵdir: i0.ɵɵDirectiveDeclaration<C3FileDisplayListCellDefDirective, "[c3FileDisplayListCellDef]", never, {}, {}, never, never, true, never>;
20
+ }
@@ -2,6 +2,7 @@ import { C3FileViewerDialogComponent } from '../../c3-file-viewer/components/pub
2
2
  import { FileMetadata } from '../../c3-file-viewer/models/file-metadata';
3
3
  import { C3FileViewer } from '../../c3-file-viewer/models/file-viewer';
4
4
  import { C3FileViewerConfig } from '../../c3-file-viewer/models/file-viewer-config.model';
5
+ import { C3FileDisplayListColumnDefDirective } from './c3-file-display-list-column-def.directive';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class C3FileDisplayListComponent {
7
8
  readonly files: import("@angular/core").InputSignal<(FileMetadata & {
@@ -11,12 +12,16 @@ export declare class C3FileDisplayListComponent {
11
12
  readonly displayFn: import("@angular/core").InputSignal<(file: FileMetadata & {
12
13
  location: string;
13
14
  }) => string>;
15
+ readonly columns: import("@angular/core").InputSignal<string[]>;
14
16
  readonly deletable: import("@angular/core").InputSignal<boolean>;
15
17
  readonly onDelete: import("@angular/core").OutputEmitterRef<FileMetadata>;
16
18
  readonly dialog: import("@angular/core").Signal<C3FileViewerDialogComponent | undefined>;
19
+ private readonly _columnDefs;
20
+ private readonly _viewContainer;
17
21
  fileViewer: C3FileViewer;
18
22
  constructor();
19
23
  openDialog($event: MouseEvent, index: number): void;
24
+ getColumnDef(columnName: string): C3FileDisplayListColumnDefDirective | undefined;
20
25
  static ɵfac: i0.ɵɵFactoryDeclaration<C3FileDisplayListComponent, never>;
21
- static ɵcmp: i0.ɵɵComponentDeclaration<C3FileDisplayListComponent, "c3-file-display-list", never, { "files": { "alias": "files"; "required": true; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "displayFn": { "alias": "displayFn"; "required": false; "isSignal": true; }; "deletable": { "alias": "deletable"; "required": false; "isSignal": true; }; }, { "onDelete": "onDelete"; }, never, ["*"], true, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<C3FileDisplayListComponent, "c3-file-display-list", never, { "files": { "alias": "files"; "required": true; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "displayFn": { "alias": "displayFn"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "deletable": { "alias": "deletable"; "required": false; "isSignal": true; }; }, { "onDelete": "onDelete"; }, ["_columnDefs"], ["*"], true, never>;
22
27
  }
@@ -18,6 +18,12 @@
18
18
  &.full {
19
19
  flex: auto;
20
20
  }
21
+
22
+ &.icon {
23
+ flex: 0 0 auto;
24
+ width: 56px;
25
+ min-width: 56px;
26
+ }
21
27
  }
22
28
 
23
29
  .icon {
@@ -44,9 +50,20 @@
44
50
  background-color: var(--background-hover);
45
51
  }
46
52
 
47
- .icon {
48
- flex-basis: 56px;
53
+ .icon-cell {
54
+ flex: 0 0 auto;
49
55
  width: 56px;
56
+ min-width: 56px;
57
+ display: flex;
58
+ align-items: center;
59
+ justify-content: center;
60
+ padding: 0 0.5rem;
61
+
62
+ .icon {
63
+ display: flex;
64
+ align-items: center;
65
+ justify-content: center;
66
+ }
50
67
  }
51
68
 
52
69
  .name {
@@ -55,6 +72,11 @@
55
72
  width: 304px;
56
73
  }
57
74
 
75
+ .cell {
76
+ flex-basis: 304px;
77
+ width: 304px;
78
+ }
79
+
58
80
  .date-label {
59
81
  flex-basis: 304px;
60
82
  width: 304px;
@@ -0,0 +1,2 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export declare const C3_FILE_DISPLAY_LIST: InjectionToken<any>;
@@ -4,8 +4,9 @@ import * as i2 from "./c3-file-display-grid/c3-file-display-grid.component";
4
4
  import * as i3 from "./c3-file-display-list/c3-file-display-list.component";
5
5
  import * as i4 from "./c3-file-display-card/c3-file-display-card.component";
6
6
  import * as i5 from "./c3-file-display-icon/c3-file-display-icon.component";
7
+ import * as i6 from "./c3-file-display-list/c3-file-display-list-column-def.directive";
7
8
  export declare class C3FileDisplayerModule {
8
9
  static ɵfac: i0.ɵɵFactoryDeclaration<C3FileDisplayerModule, never>;
9
- static ɵmod: i0.ɵɵNgModuleDeclaration<C3FileDisplayerModule, never, [typeof i1.CommonModule, typeof i2.C3FileDisplayGridComponent, typeof i3.C3FileDisplayListComponent, typeof i4.C3FileDisplayCardComponent, typeof i5.C3FileDisplayIconComponent], [typeof i2.C3FileDisplayGridComponent, typeof i3.C3FileDisplayListComponent, typeof i4.C3FileDisplayCardComponent, typeof i5.C3FileDisplayIconComponent]>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<C3FileDisplayerModule, never, [typeof i1.CommonModule, typeof i2.C3FileDisplayGridComponent, typeof i3.C3FileDisplayListComponent, typeof i4.C3FileDisplayCardComponent, typeof i5.C3FileDisplayIconComponent, typeof i6.C3FileDisplayListColumnDefDirective, typeof i6.C3FileDisplayListHeaderCellDefDirective, typeof i6.C3FileDisplayListCellDefDirective], [typeof i2.C3FileDisplayGridComponent, typeof i3.C3FileDisplayListComponent, typeof i4.C3FileDisplayCardComponent, typeof i5.C3FileDisplayIconComponent, typeof i6.C3FileDisplayListColumnDefDirective, typeof i6.C3FileDisplayListHeaderCellDefDirective, typeof i6.C3FileDisplayListCellDefDirective]>;
10
11
  static ɵinj: i0.ɵɵInjectorDeclaration<C3FileDisplayerModule>;
11
12
  }
@@ -0,0 +1,17 @@
1
+ :host {
2
+ display: block;
3
+ background-color: #a0a0a0;
4
+ position: relative;
5
+ pdf-viewer-header {
6
+ width: 100%;
7
+ background-color: #f0f0f0;
8
+ box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
9
+ z-index: 100;
10
+ }
11
+
12
+ pdf-viewer-footer {
13
+ position: absolute;
14
+ bottom: 0;
15
+ left: 0;
16
+ }
17
+ }
@@ -0,0 +1,18 @@
1
+ @use "pdfjs-dist/web/pdf_viewer.css";
2
+
3
+ pdf-viewer-content {
4
+ position: relative;
5
+ display: block;
6
+ height: 100%;
7
+ width: 100%;
8
+ min-height: 500px;
9
+ min-width: 500px;
10
+ overflow: auto;
11
+ #viewerContainer {
12
+ position: absolute;
13
+ top: 0;
14
+ left: 0;
15
+ height: 100%;
16
+ width: 100%;
17
+ }
18
+ }
@@ -0,0 +1,6 @@
1
+ :host {
2
+ display: flex;
3
+ justify-content: space-between;
4
+ align-items: center;
5
+ padding: 0.5rem;
6
+ }
package/package.json CHANGED
@@ -1,17 +1,18 @@
1
1
  {
2
2
  "name": "c3-components",
3
- "version": "0.11.8",
3
+ "version": "0.12.0",
4
4
  "description": "C3 Components Library",
5
5
  "author": "c3ulnta0rk",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/c3ulnta0rk/c3-components",
8
8
  "peerDependencies": {
9
- "@angular/common": ">=16.0.0",
10
- "@angular/core": ">=16.0.0",
11
- "@angular/cdk": ">=16.0.0",
12
- "@angular/material": ">=16.0.0",
9
+ "@angular/common": ">=19.1.0",
10
+ "@angular/core": ">=19.1.0",
11
+ "@angular/cdk": ">=19.1.0",
12
+ "@angular/material": ">=19.1.0",
13
13
  "autoprefixer": "^10.4.16",
14
- "@formkit/auto-animate": "^0.8.2"
14
+ "@formkit/auto-animate": "^0.8.2",
15
+ "pdfjs-dist": "^5.1.2"
15
16
  },
16
17
  "dependencies": {
17
18
  "tslib": "^2.3.0"
package/public-api.d.ts CHANGED
@@ -36,6 +36,8 @@ export * from './lib/c3-file-displayer/c3-file-display-list/c3-file-display-list
36
36
  export * from './lib/c3-file-displayer/c3-file-display-icon/c3-file-display-icon.component';
37
37
  export * from './lib/c3-file-displayer/c3-file-display-grid/c3-file-display-grid.component';
38
38
  export * from './lib/c3-file-displayer/c3-file-display-card/c3-file-display-card.component';
39
+ export * from './lib/c3-file-displayer/c3-file-display-list/c3-file-display-list-column-def.directive';
40
+ export * from './lib/c3-file-displayer/c3-file-display-list/tokens';
39
41
  /**
40
42
  * Safe Url
41
43
  */
@@ -88,3 +90,6 @@ export * from './lib/c3-prevent-event/index';
88
90
  export * from './lib/c3-menu/c3-menu.module';
89
91
  export * from './lib/c3-menu/components/c3-menu/c3-menu.component';
90
92
  export * from './lib/c3-menu/components/c3-nav-item/c3-nav-item.component';
93
+ /**
94
+ * C3 PDF Viewer
95
+ */