shirkasoft-ui-components 1.13.18 → 2.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 (98) hide show
  1. package/README.md +415 -42
  2. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +189 -100
  3. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -1
  4. package/fesm2022/shirkasoft-ui-components-button.mjs +367 -73
  5. package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -1
  6. package/fesm2022/shirkasoft-ui-components-chart.mjs +206 -142
  7. package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -1
  8. package/fesm2022/shirkasoft-ui-components-config.mjs +976 -0
  9. package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -0
  10. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +307 -142
  11. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -1
  12. package/fesm2022/shirkasoft-ui-components-date-picker.mjs +1624 -1400
  13. package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
  14. package/fesm2022/shirkasoft-ui-components-fieldset.mjs +347 -92
  15. package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -1
  16. package/fesm2022/shirkasoft-ui-components-file-upload.mjs +484 -293
  17. package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
  18. package/fesm2022/shirkasoft-ui-components-icons.mjs +1141 -0
  19. package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -0
  20. package/fesm2022/shirkasoft-ui-components-knob.mjs +395 -180
  21. package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -1
  22. package/fesm2022/shirkasoft-ui-components-loading.mjs +505 -128
  23. package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -1
  24. package/fesm2022/shirkasoft-ui-components-modal.mjs +311 -303
  25. package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -1
  26. package/fesm2022/shirkasoft-ui-components-notification.mjs +188 -142
  27. package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -1
  28. package/fesm2022/shirkasoft-ui-components-price-input.mjs +517 -277
  29. package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
  30. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +669 -289
  31. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -1
  32. package/fesm2022/shirkasoft-ui-components-select.mjs +1014 -814
  33. package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
  34. package/fesm2022/shirkasoft-ui-components-sidebar.mjs +508 -184
  35. package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -1
  36. package/fesm2022/shirkasoft-ui-components-skeleton.mjs +197 -57
  37. package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -1
  38. package/fesm2022/shirkasoft-ui-components-table.mjs +1918 -1676
  39. package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
  40. package/fesm2022/shirkasoft-ui-components-tabs.mjs +419 -177
  41. package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
  42. package/fesm2022/shirkasoft-ui-components-tag.mjs +177 -51
  43. package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
  44. package/fesm2022/shirkasoft-ui-components-text-field.mjs +687 -369
  45. package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
  46. package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +466 -0
  47. package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -0
  48. package/fesm2022/shirkasoft-ui-components-theme.mjs +147 -0
  49. package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -0
  50. package/fesm2022/shirkasoft-ui-components-timeline.mjs +791 -215
  51. package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
  52. package/fesm2022/shirkasoft-ui-components-toggle.mjs +205 -128
  53. package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -1
  54. package/fesm2022/shirkasoft-ui-components-tooltip.mjs +244 -180
  55. package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -1
  56. package/fesm2022/shirkasoft-ui-components-utils.mjs +97 -125
  57. package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
  58. package/fesm2022/shirkasoft-ui-components-wizard.mjs +673 -166
  59. package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
  60. package/fesm2022/shirkasoft-ui-components.mjs +0 -9
  61. package/package.json +37 -7
  62. package/src/baseline.css +2472 -0
  63. package/src/theme.css +15 -543
  64. package/src/themes/ocean.css +56 -0
  65. package/src/themes/sunset.css +55 -0
  66. package/src/themes/violet.css +25 -0
  67. package/src/tokens.css +612 -0
  68. package/types/shirkasoft-ui-components-breadcrumb.d.ts +59 -44
  69. package/types/shirkasoft-ui-components-button.d.ts +142 -49
  70. package/types/shirkasoft-ui-components-chart.d.ts +59 -44
  71. package/types/shirkasoft-ui-components-config.d.ts +357 -0
  72. package/types/shirkasoft-ui-components-confirm-dialog.d.ts +107 -65
  73. package/types/shirkasoft-ui-components-date-picker.d.ts +527 -373
  74. package/types/shirkasoft-ui-components-fieldset.d.ts +135 -59
  75. package/types/shirkasoft-ui-components-file-upload.d.ts +176 -106
  76. package/types/shirkasoft-ui-components-icons.d.ts +1430 -0
  77. package/types/shirkasoft-ui-components-knob.d.ts +151 -64
  78. package/types/shirkasoft-ui-components-loading.d.ts +155 -64
  79. package/types/shirkasoft-ui-components-modal.d.ts +134 -132
  80. package/types/shirkasoft-ui-components-notification.d.ts +63 -58
  81. package/types/shirkasoft-ui-components-price-input.d.ts +198 -85
  82. package/types/shirkasoft-ui-components-rail-sidebar.d.ts +262 -142
  83. package/types/shirkasoft-ui-components-select.d.ts +301 -192
  84. package/types/shirkasoft-ui-components-sidebar.d.ts +198 -92
  85. package/types/shirkasoft-ui-components-skeleton.d.ts +68 -27
  86. package/types/shirkasoft-ui-components-table.d.ts +849 -649
  87. package/types/shirkasoft-ui-components-tabs.d.ts +102 -61
  88. package/types/shirkasoft-ui-components-tag.d.ts +54 -23
  89. package/types/shirkasoft-ui-components-text-field.d.ts +231 -111
  90. package/types/shirkasoft-ui-components-theme-picker.d.ts +117 -0
  91. package/types/shirkasoft-ui-components-theme.d.ts +80 -0
  92. package/types/shirkasoft-ui-components-timeline.d.ts +326 -150
  93. package/types/shirkasoft-ui-components-toggle.d.ts +76 -45
  94. package/types/shirkasoft-ui-components-tooltip.d.ts +64 -43
  95. package/types/shirkasoft-ui-components-utils.d.ts +26 -17
  96. package/types/shirkasoft-ui-components-wizard.d.ts +236 -86
  97. package/types/shirkasoft-ui-components.d.ts +1 -2
  98. package/fesm2022/shirkasoft-ui-components.mjs.map +0 -1
@@ -1,13 +1,15 @@
1
- import * as _angular_core from '@angular/core';
2
-
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i0 from "@angular/core";
3
5
  /** An action button rendered on the right side of the fieldset header. */
4
6
  interface FieldsetHeaderAction {
5
- label: string;
6
- icon: string | any;
7
- onClick: () => void;
8
- class?: string;
9
- isVisible?: () => boolean;
10
- isDisabled?: () => boolean;
7
+ label: string;
8
+ icon: string | any;
9
+ onClick: () => void;
10
+ class?: string;
11
+ isVisible?: () => boolean;
12
+ isDisabled?: () => boolean;
11
13
  }
12
14
  /**
13
15
  * Shirkasoft UI Components.
@@ -18,55 +20,129 @@ interface FieldsetHeaderAction {
18
20
  * Collapsible content group with a legend header, optional leading icon,
19
21
  * badge and action buttons on the right side.
20
22
  */
21
- declare class FieldsetComponent {
22
- protected getIcon: (name: any) => any;
23
- /** Title shown in the header. */
24
- legend: _angular_core.InputSignal<string>;
25
- /** Collapsed state (default: collapsed). Two-way bindable with [(collapsed)]. */
26
- collapsed: _angular_core.ModelSignal<boolean>;
27
- /** Whether the header toggles the content. */
28
- toggleable: _angular_core.InputSignal<boolean>;
29
- /** Shows the expand/collapse icon button. */
30
- showToggleIcon: _angular_core.InputSignal<boolean>;
31
- /** Optional leading icon shown next to the legend. */
32
- icon: _angular_core.InputSignal<any>;
33
- /** Optional badge/count shown after the legend. */
34
- badge: _angular_core.InputSignal<string | number>;
35
- /** CSS classes for the badge (override). */
36
- badgeClass: _angular_core.InputSignal<string>;
37
- /** Icon shown when collapsed. */
38
- collapsedIcon: _angular_core.InputSignal<string>;
39
- /** Icon shown when expanded. */
40
- expandedIcon: _angular_core.InputSignal<string>;
41
- /** Action buttons rendered on the right side of the header. */
42
- headerActions: _angular_core.InputSignal<FieldsetHeaderAction[]>;
43
- /** Custom content templates: key 'legend' (context: $implicit collapsed, expanded). */
44
- customTemplates: _angular_core.InputSignal<{
45
- [key: string]: any;
46
- }>;
47
- /** CSS classes for the extra shadow styling of the panel. */
48
- hasShadow: _angular_core.InputSignal<boolean>;
49
- /** Accessible label for the expand action. */
50
- expandLabel: _angular_core.InputSignal<string>;
51
- /** Accessible label for the collapse action. */
52
- collapseLabel: _angular_core.InputSignal<string>;
53
- /** Emits the new expanded state when toggled. */
54
- toggle: _angular_core.OutputEmitterRef<boolean>;
55
- /** Emitted when the fieldset is expanded. */
56
- expand: _angular_core.OutputEmitterRef<void>;
57
- /** Emitted when the fieldset is collapsed. */
58
- collapse: _angular_core.OutputEmitterRef<void>;
59
- /** Stable id linking the header button and the content region. */
60
- contentId: string;
61
- /** Toggles the collapsed state and emits the new state (unless not toggleable). */
62
- onToggle(): void;
63
- /** Whether a header action can be rendered. */
64
- isHeaderActionVisible(action: FieldsetHeaderAction): boolean;
65
- /** Whether a header action should be disabled. */
66
- isHeaderActionDisabled(action: FieldsetHeaderAction): boolean;
67
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<FieldsetComponent, never>;
68
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<FieldsetComponent, "shk-fieldset", never, { "legend": { "alias": "legend"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "toggleable": { "alias": "toggleable"; "required": false; "isSignal": true; }; "showToggleIcon": { "alias": "showToggleIcon"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "badge": { "alias": "badge"; "required": false; "isSignal": true; }; "badgeClass": { "alias": "badgeClass"; "required": false; "isSignal": true; }; "collapsedIcon": { "alias": "collapsedIcon"; "required": false; "isSignal": true; }; "expandedIcon": { "alias": "expandedIcon"; "required": false; "isSignal": true; }; "headerActions": { "alias": "headerActions"; "required": false; "isSignal": true; }; "customTemplates": { "alias": "customTemplates"; "required": false; "isSignal": true; }; "hasShadow": { "alias": "hasShadow"; "required": false; "isSignal": true; }; "expandLabel": { "alias": "expandLabel"; "required": false; "isSignal": true; }; "collapseLabel": { "alias": "collapseLabel"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; "toggle": "toggle"; "expand": "expand"; "collapse": "collapse"; }, never, ["*"], true, never>;
23
+ export declare class FieldsetComponent {
24
+ protected getIcon: (name: any) => import("shirkasoft-ui-components/icons").IconNode | null;
25
+ /** Title shown in the header. */
26
+ legend: import("@angular/core").InputSignal<string>;
27
+ /** Collapsed state (default: collapsed). Two-way bindable with [(collapsed)]. */
28
+ collapsed: import("@angular/core").ModelSignal<boolean>;
29
+ /** Whether the header toggles the content. */
30
+ toggleable: import("@angular/core").InputSignal<boolean>;
31
+ /** Shows the expand/collapse icon button. */
32
+ showToggleIcon: import("@angular/core").InputSignal<boolean>;
33
+ /** Optional leading icon shown next to the legend. */
34
+ icon: import("@angular/core").InputSignal<any>;
35
+ /** Optional badge/count shown after the legend. */
36
+ badge: import("@angular/core").InputSignal<string | number>;
37
+ /** CSS classes for the badge (override). */
38
+ badgeClass: import("@angular/core").InputSignal<string>;
39
+ /** Icon shown when collapsed. */
40
+ collapsedIcon: import("@angular/core").InputSignal<string>;
41
+ /** Icon shown when expanded. */
42
+ expandedIcon: import("@angular/core").InputSignal<string>;
43
+ /** Action buttons rendered on the right side of the header. */
44
+ headerActions: import("@angular/core").InputSignal<FieldsetHeaderAction[]>;
45
+ /** Custom content templates: key 'legend' (context: $implicit collapsed, expanded). */
46
+ customTemplates: import("@angular/core").InputSignal<{
47
+ [key: string]: any;
48
+ }>;
49
+ /** CSS classes for the extra shadow styling of the panel. */
50
+ hasShadow: import("@angular/core").InputSignal<boolean>;
51
+ /** Accessible label for the expand action. */
52
+ expandLabel: import("@angular/core").InputSignal<string>;
53
+ /** Accessible label for the collapse action. */
54
+ collapseLabel: import("@angular/core").InputSignal<string>;
55
+ /** Emits the new expanded state when toggled. */
56
+ toggle: import("@angular/core").OutputEmitterRef<boolean>;
57
+ /** Emitted when the fieldset is expanded. */
58
+ expand: import("@angular/core").OutputEmitterRef<void>;
59
+ /** Emitted when the fieldset is collapsed. */
60
+ collapse: import("@angular/core").OutputEmitterRef<void>;
61
+ /** Stable id linking the header button and the content region. */
62
+ contentId: string;
63
+ /** Toggles the collapsed state and emits the new state (unless not toggleable). */
64
+ onToggle(): void;
65
+ /** Whether a header action can be rendered. */
66
+ isHeaderActionVisible(action: FieldsetHeaderAction): boolean;
67
+ /** Whether a header action should be disabled. */
68
+ isHeaderActionDisabled(action: FieldsetHeaderAction): boolean;
69
+ static ɵfac: i0.ɵɵFactoryDeclaration<FieldsetComponent, never>;
70
+ static ɵcmp: i0.ɵɵComponentDeclaration<FieldsetComponent, "shk-fieldset", never, {
71
+ "legend": {
72
+ "alias": "legend";
73
+ "required": false;
74
+ "isSignal": true;
75
+ };
76
+ "collapsed": {
77
+ "alias": "collapsed";
78
+ "required": false;
79
+ "isSignal": true;
80
+ };
81
+ "toggleable": {
82
+ "alias": "toggleable";
83
+ "required": false;
84
+ "isSignal": true;
85
+ };
86
+ "showToggleIcon": {
87
+ "alias": "showToggleIcon";
88
+ "required": false;
89
+ "isSignal": true;
90
+ };
91
+ "icon": {
92
+ "alias": "icon";
93
+ "required": false;
94
+ "isSignal": true;
95
+ };
96
+ "badge": {
97
+ "alias": "badge";
98
+ "required": false;
99
+ "isSignal": true;
100
+ };
101
+ "badgeClass": {
102
+ "alias": "badgeClass";
103
+ "required": false;
104
+ "isSignal": true;
105
+ };
106
+ "collapsedIcon": {
107
+ "alias": "collapsedIcon";
108
+ "required": false;
109
+ "isSignal": true;
110
+ };
111
+ "expandedIcon": {
112
+ "alias": "expandedIcon";
113
+ "required": false;
114
+ "isSignal": true;
115
+ };
116
+ "headerActions": {
117
+ "alias": "headerActions";
118
+ "required": false;
119
+ "isSignal": true;
120
+ };
121
+ "customTemplates": {
122
+ "alias": "customTemplates";
123
+ "required": false;
124
+ "isSignal": true;
125
+ };
126
+ "hasShadow": {
127
+ "alias": "hasShadow";
128
+ "required": false;
129
+ "isSignal": true;
130
+ };
131
+ "expandLabel": {
132
+ "alias": "expandLabel";
133
+ "required": false;
134
+ "isSignal": true;
135
+ };
136
+ "collapseLabel": {
137
+ "alias": "collapseLabel";
138
+ "required": false;
139
+ "isSignal": true;
140
+ };
141
+ }, {
142
+ "collapsed": "collapsedChange";
143
+ "toggle": "toggle";
144
+ "expand": "expand";
145
+ "collapse": "collapse";
146
+ }, never, ["*"], true, never>;
69
147
  }
70
-
71
- export { FieldsetComponent };
72
- export type { FieldsetHeaderAction };
148
+ export type { FieldsetHeaderAction };
@@ -1,17 +1,20 @@
1
- import * as _angular_core from '@angular/core';
2
- import { OnDestroy } from '@angular/core';
3
-
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i0 from "@angular/core";
5
+ import { OnDestroy } from "@angular/core";
6
+ import { FormValueControl } from "@angular/forms/signals";
4
7
  interface FileUploadError {
5
- type: 'size' | 'type';
6
- message: string;
7
- file: File;
8
+ type: 'size' | 'type';
9
+ message: string;
10
+ file: File;
8
11
  }
9
12
  interface ExistingFile {
10
- id?: number | string;
11
- name: string;
12
- url?: string;
13
- mimeType?: string;
14
- size?: number;
13
+ id?: number | string;
14
+ name: string;
15
+ url?: string;
16
+ mimeType?: string;
17
+ size?: number;
15
18
  }
16
19
  /**
17
20
  * Shirkasoft UI Components.
@@ -22,100 +25,167 @@ interface ExistingFile {
22
25
  * Drag & drop file uploader with file type/size validation, image previews,
23
26
  * multiple files support and localized error messages.
24
27
  */
25
- declare class FileUploadComponent implements OnDestroy {
26
- protected getIcon: (name: any) => any;
27
- private transloco;
28
- /** Main label of the uploader. */
29
- label: _angular_core.InputSignal<string>;
30
- /** Accepted MIME types/extensions (e.g. 'image/*', '.pdf'). */
31
- accept: _angular_core.InputSignal<string>;
32
- /** Maximum allowed size per file (bytes). */
33
- maxFileSize: _angular_core.InputSignal<number>;
34
- /** Maximum number of files (0 = unlimited). */
35
- maxFiles: _angular_core.InputSignal<number>;
36
- /** Text of the file picker button. */
37
- fileUploadText: _angular_core.InputSignal<string>;
38
- /** Helper text shown next to the label. */
39
- fileRecommendation: _angular_core.InputSignal<string>;
40
- /** Text shown when files are already loaded. */
41
- changeFilesText: _angular_core.InputSignal<string>;
42
- /** Enables selecting more than one file at once. */
43
- multiple: _angular_core.InputSignal<boolean>;
44
- /** Files already stored by the parent (read-only; the component only emits events). */
45
- existingFiles: _angular_core.InputSignal<ExistingFile[]>;
46
- /** How existing files are rendered. */
47
- existingDisplay: _angular_core.InputSignal<"chips" | "tiles">;
48
- /** Emitted with the currently selected files. */
49
- fileSelected: _angular_core.OutputEmitterRef<File[]>;
50
- /** Emitted when the last selected file is removed. */
51
- fileRemoved: _angular_core.OutputEmitterRef<void>;
52
- /** Emitted when a file fails validation (type/size). */
53
- fileError: _angular_core.OutputEmitterRef<FileUploadError>;
54
- /** Emitted when a file is near the size limit. */
55
- fileWarning: _angular_core.OutputEmitterRef<FileUploadError>;
56
- /** Emitted when an existing file is requested for download/view. */
57
- existingFileAction: _angular_core.OutputEmitterRef<ExistingFile>;
58
- /** Emitted when an existing file should be removed (parent deletes it). */
59
- existingFileRemove: _angular_core.OutputEmitterRef<ExistingFile>;
60
- /** Currently selected files. */
61
- selectedFiles: _angular_core.WritableSignal<File[]>;
62
- /** Localized error message displayed to the user. */
63
- errorMessage: _angular_core.WritableSignal<string>;
64
- /** Whether the user is dragging files over the zone. */
65
- isDragOver: _angular_core.WritableSignal<boolean>;
66
- /** Object URLs used for image previews. */
67
- private previewUrls;
68
- /** Whether another selection is allowed. */
69
- canAddMore: _angular_core.Signal<boolean>;
70
- /** True when the maximum number of files has been reached. */
71
- maxReached: _angular_core.Signal<boolean>;
72
- /** Whether the file is an image (used for previews). */
73
- isImageFile(file: File): boolean;
74
- /** Returns (creating on demand) the object URL for a file preview. */
75
- previewUrl(file: File): string;
76
- /** Marks the drop zone as active while dragging over it. */
77
- onDragOver(event: DragEvent): void;
78
- /** Clears the drag-over state when the drag leaves the zone. */
79
- onDragLeave(event: DragEvent): void;
80
- /** Processes the files dropped on the zone. */
81
- onDrop(event: DragEvent): void;
82
- /** Processes the files picked from the native file input. */
83
- onFileChange(event: Event): void;
84
- /** Validates and appends the received files, emitting errors/warnings. */
85
- private processFiles;
86
- /** Validates a file against `accept` and `maxFileSize`. */
87
- private validateFile;
88
- /** Emits a warning when the file is close to the size limit (>90%). */
89
- private checkSizeWarning;
90
- /** Removes a file, revoking its preview URL. */
91
- removeFile(file: File): void;
92
- /** Clears all selected files and previews. */
93
- changeFiles(): void;
94
- /** Revokes every stored preview object URL. */
95
- private clearPreviews;
96
- /** Revokes pending preview URLs when the component is destroyed. */
97
- ngOnDestroy(): void;
98
- /** Emits the action (download/view) for an existing file. */
99
- onExistingAction(file: ExistingFile): void;
100
- /** Emits the removal request for an existing file. */
101
- onExistingRemove(file: ExistingFile): void;
102
- /** Whether an existing file is an image (by mime type or extension). */
103
- isExistingImage(file: ExistingFile): boolean;
104
- /** Resolves the extension of a file name. */
105
- getExtension(name: string): string;
106
- /** Icon + colored badge shown for non-image files, hinting at the type. */
107
- getExistingBadge(file: ExistingFile): {
108
- label: string;
109
- color: string;
110
- icon: string;
28
+ export declare class FileUploadComponent implements OnDestroy, FormValueControl<File[]> {
29
+ protected getIcon: (name: any) => import("shirkasoft-ui-components/icons").IconNode | null;
30
+ private transloco;
31
+ /** Main label of the uploader. */
32
+ label: import("@angular/core").InputSignal<string>;
33
+ /** Accepted MIME types/extensions (e.g. 'image/*', '.pdf'). */
34
+ accept: import("@angular/core").InputSignal<string>;
35
+ /** Maximum allowed size per file (bytes). */
36
+ maxFileSize: import("@angular/core").InputSignal<number>;
37
+ /** Maximum number of files (0 = unlimited). */
38
+ maxFiles: import("@angular/core").InputSignal<number>;
39
+ /** Text of the file picker button. */
40
+ fileUploadText: import("@angular/core").InputSignal<string>;
41
+ /** Helper text shown next to the label. */
42
+ fileRecommendation: import("@angular/core").InputSignal<string>;
43
+ /** Text shown when files are already loaded. */
44
+ changeFilesText: import("@angular/core").InputSignal<string>;
45
+ /** Enables selecting more than one file at once. */
46
+ multiple: import("@angular/core").InputSignal<boolean>;
47
+ /** Files already stored by the parent (read-only; the component only emits events). */
48
+ existingFiles: import("@angular/core").InputSignal<ExistingFile[]>;
49
+ /** How existing files are rendered. */
50
+ existingDisplay: import("@angular/core").InputSignal<"chips" | "tiles">;
51
+ /** Emitted with the currently selected files. */
52
+ fileSelected: import("@angular/core").OutputEmitterRef<File[]>;
53
+ /** Emitted when the last selected file is removed. */
54
+ fileRemoved: import("@angular/core").OutputEmitterRef<void>;
55
+ /** Emitted when a file fails validation (type/size). */
56
+ fileError: import("@angular/core").OutputEmitterRef<FileUploadError>;
57
+ /** Emitted when a file is near the size limit. */
58
+ fileWarning: import("@angular/core").OutputEmitterRef<FileUploadError>;
59
+ /** Emitted when an existing file is requested for download/view. */
60
+ existingFileAction: import("@angular/core").OutputEmitterRef<ExistingFile>;
61
+ /** Emitted when an existing file should be removed (parent deletes it). */
62
+ existingFileRemove: import("@angular/core").OutputEmitterRef<ExistingFile>;
63
+ /** Currently selected files. Two-way bindable and used by `[formField]`. */
64
+ value: import("@angular/core").ModelSignal<File[]>;
65
+ /** Alias kept for the existing implementation and templates. */
66
+ get selectedFiles(): import("@angular/core").ModelSignal<File[]>;
67
+ /** Emitted when the selection changes so Signal Forms marks the field as touched. */
68
+ touch: import("@angular/core").OutputEmitterRef<void>;
69
+ /** Localized error message displayed to the user. */
70
+ errorMessage: import("@angular/core").WritableSignal<string>;
71
+ /** Whether the user is dragging files over the zone. */
72
+ isDragOver: import("@angular/core").WritableSignal<boolean>;
73
+ /** Object URLs used for image previews. */
74
+ private previewUrls;
75
+ /** Whether another selection is allowed. */
76
+ canAddMore: import("@angular/core").Signal<boolean>;
77
+ /** True when the maximum number of files has been reached. */
78
+ maxReached: import("@angular/core").Signal<boolean>;
79
+ /** Whether the file is an image (used for previews). */
80
+ isImageFile(file: File): boolean;
81
+ /** Returns (creating on demand) the object URL for a file preview. */
82
+ previewUrl(file: File): string;
83
+ /** Marks the drop zone as active while dragging over it. */
84
+ onDragOver(event: DragEvent): void;
85
+ /** Clears the drag-over state when the drag leaves the zone. */
86
+ onDragLeave(event: DragEvent): void;
87
+ /** Processes the files dropped on the zone. */
88
+ onDrop(event: DragEvent): void;
89
+ /** Processes the files picked from the native file input. */
90
+ onFileChange(event: Event): void;
91
+ /** Validates and appends the received files, emitting errors/warnings. */
92
+ private processFiles;
93
+ /** Validates a file against `accept` and `maxFileSize`. */
94
+ private validateFile;
95
+ /** Emits a warning when the file is close to the size limit (>90%). */
96
+ private checkSizeWarning;
97
+ /** Removes a file, revoking its preview URL. */
98
+ removeFile(file: File): void;
99
+ /** Clears all selected files and previews. */
100
+ changeFiles(): void;
101
+ /** Revokes every stored preview object URL. */
102
+ private clearPreviews;
103
+ /** Revokes pending preview URLs when the component is destroyed. */
104
+ ngOnDestroy(): void;
105
+ /** Emits the action (download/view) for an existing file. */
106
+ onExistingAction(file: ExistingFile): void;
107
+ /** Emits the removal request for an existing file. */
108
+ onExistingRemove(file: ExistingFile): void;
109
+ /** Whether an existing file is an image (by mime type or extension). */
110
+ isExistingImage(file: ExistingFile): boolean;
111
+ /** Resolves the extension of a file name. */
112
+ getExtension(name: string): string;
113
+ /** Icon + colored badge shown for non-image files, hinting at the type. */
114
+ getExistingBadge(file: ExistingFile): {
115
+ label: string;
116
+ color: string;
117
+ icon: string;
118
+ };
119
+ /** trackBy for existing files. */
120
+ trackExistingFile(file: ExistingFile): any;
121
+ /** Human readable size (B/KB/MB). */
122
+ private formatFileSize;
123
+ static ɵfac: i0.ɵɵFactoryDeclaration<FileUploadComponent, never>;
124
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileUploadComponent, "shk-file-upload", never, {
125
+ "label": {
126
+ "alias": "label";
127
+ "required": false;
128
+ "isSignal": true;
129
+ };
130
+ "accept": {
131
+ "alias": "accept";
132
+ "required": false;
133
+ "isSignal": true;
134
+ };
135
+ "maxFileSize": {
136
+ "alias": "maxFileSize";
137
+ "required": false;
138
+ "isSignal": true;
139
+ };
140
+ "maxFiles": {
141
+ "alias": "maxFiles";
142
+ "required": false;
143
+ "isSignal": true;
144
+ };
145
+ "fileUploadText": {
146
+ "alias": "fileUploadText";
147
+ "required": false;
148
+ "isSignal": true;
149
+ };
150
+ "fileRecommendation": {
151
+ "alias": "fileRecommendation";
152
+ "required": false;
153
+ "isSignal": true;
154
+ };
155
+ "changeFilesText": {
156
+ "alias": "changeFilesText";
157
+ "required": false;
158
+ "isSignal": true;
159
+ };
160
+ "multiple": {
161
+ "alias": "multiple";
162
+ "required": false;
163
+ "isSignal": true;
164
+ };
165
+ "existingFiles": {
166
+ "alias": "existingFiles";
167
+ "required": false;
168
+ "isSignal": true;
169
+ };
170
+ "existingDisplay": {
171
+ "alias": "existingDisplay";
172
+ "required": false;
173
+ "isSignal": true;
174
+ };
175
+ "value": {
176
+ "alias": "value";
177
+ "required": false;
178
+ "isSignal": true;
111
179
  };
112
- /** trackBy for existing files. */
113
- trackExistingFile(file: ExistingFile): any;
114
- /** Human readable size (B/KB/MB). */
115
- private formatFileSize;
116
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<FileUploadComponent, never>;
117
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<FileUploadComponent, "shk-file-upload", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; "isSignal": true; }; "maxFiles": { "alias": "maxFiles"; "required": false; "isSignal": true; }; "fileUploadText": { "alias": "fileUploadText"; "required": false; "isSignal": true; }; "fileRecommendation": { "alias": "fileRecommendation"; "required": false; "isSignal": true; }; "changeFilesText": { "alias": "changeFilesText"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "existingFiles": { "alias": "existingFiles"; "required": false; "isSignal": true; }; "existingDisplay": { "alias": "existingDisplay"; "required": false; "isSignal": true; }; }, { "fileSelected": "fileSelected"; "fileRemoved": "fileRemoved"; "fileError": "fileError"; "fileWarning": "fileWarning"; "existingFileAction": "existingFileAction"; "existingFileRemove": "existingFileRemove"; }, never, never, true, never>;
180
+ }, {
181
+ "fileSelected": "fileSelected";
182
+ "fileRemoved": "fileRemoved";
183
+ "fileError": "fileError";
184
+ "fileWarning": "fileWarning";
185
+ "existingFileAction": "existingFileAction";
186
+ "existingFileRemove": "existingFileRemove";
187
+ "value": "valueChange";
188
+ "touch": "touch";
189
+ }, never, never, true, never>;
118
190
  }
119
-
120
- export { FileUploadComponent };
121
- export type { ExistingFile, FileUploadError };
191
+ export type { ExistingFile, FileUploadError };