chrv-components 1.11.55 → 1.11.56

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/index.d.ts CHANGED
@@ -1,12 +1,11 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnInit, ViewContainerRef, Type, ApplicationRef, EnvironmentInjector, ComponentRef, AfterViewInit, OnDestroy, ElementRef, AfterViewChecked, AfterContentChecked, QueryList, AfterContentInit, InjectionToken } from '@angular/core';
2
+ import { OnInit, ViewContainerRef, AfterViewInit, Type, ApplicationRef, EnvironmentInjector, ComponentRef, OnDestroy, ElementRef, AfterViewChecked, AfterContentChecked, QueryList, AfterContentInit, InjectionToken } from '@angular/core';
3
3
  import { Router, UrlTree } from '@angular/router';
4
4
  import * as rxjs from 'rxjs';
5
5
  import { Observable, Subject, BehaviorSubject } from 'rxjs';
6
6
  import * as _angular_forms from '@angular/forms';
7
7
  import { AbstractControl, ValidationErrors, ValidatorFn, AsyncValidatorFn, FormControl, FormGroup, ControlValueAccessor, NgControl, Validator } from '@angular/forms';
8
8
  import { MatAutocomplete } from '@angular/material/autocomplete';
9
- import { MatDialogConfig, MatDialogRef } from '@angular/material/dialog';
10
9
  import { SafeHtml, DomSanitizer } from '@angular/platform-browser';
11
10
  import { HttpClient, HttpInterceptorFn, HttpEvent, HttpFeature } from '@angular/common/http';
12
11
  import * as _angular_animations from '@angular/animations';
@@ -46,7 +45,7 @@ declare class ChrButtonComponent {
46
45
  readonly textColor: _angular_core.InputSignal<Color | undefined>;
47
46
  readonly flat: _angular_core.InputSignal<boolean>;
48
47
  readonly predicate: _angular_core.InputSignal<boolean | undefined>;
49
- readonly type: _angular_core.InputSignal<"fixed" | "small" | "none" | "responsive" | "table" | "full">;
48
+ readonly type: _angular_core.InputSignal<"none" | "responsive" | "table" | "full" | "fixed" | "small">;
50
49
  readonly href: _angular_core.InputSignal<string | undefined>;
51
50
  readonly target: _angular_core.InputSignal<"_blank" | "_parent" | "_self" | "_top" | undefined>;
52
51
  readonly disabled: _angular_core.InputSignal<boolean>;
@@ -112,6 +111,106 @@ declare class ChrModalComponent<T> implements OnInit {
112
111
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChrModalComponent<any>, "chr-modal", never, { "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "disableClose": { "alias": "disableClose"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "background": { "alias": "background"; "required": false; "isSignal": true; }; }, { "closeOnBackdropClick": "closeOnBackdropClickChange"; "closeOnEscape": "closeOnEscapeChange"; "close": "close"; }, never, never, true, never>;
113
112
  }
114
113
 
114
+ interface IContextMenuItem {
115
+ /**
116
+ * Label for the menu item
117
+ */
118
+ label: string;
119
+ /**
120
+ * Action to trigger when the menu item is clicked
121
+ */
122
+ action: Function;
123
+ /**
124
+ * Optional Material Icon name to display
125
+ */
126
+ icon?: string;
127
+ /**
128
+ * Optional color for the hover background
129
+ */
130
+ color?: Color;
131
+ }
132
+
133
+ type Alignment = 'left' | 'center' | 'right';
134
+ declare const Aligments: {
135
+ [key: string]: string;
136
+ };
137
+ interface IChips {
138
+ display: string;
139
+ name: string;
140
+ callback: (entry: any) => string | boolean;
141
+ textColor?: Color;
142
+ backgroundColor?: Color;
143
+ }
144
+ interface IColumn {
145
+ display: string;
146
+ alignment?: 'left' | 'center' | 'right';
147
+ chips?: IChips[];
148
+ properties?: string[];
149
+ callback?: Function;
150
+ date?: string;
151
+ isLink?: boolean;
152
+ linkStaticUrl?: string;
153
+ }
154
+ interface IComputedRow {
155
+ columns: IComputedColumn[];
156
+ }
157
+ interface IComputedColumn {
158
+ label?: string;
159
+ value?: any;
160
+ callback?: Function;
161
+ alignment?: 'left' | 'center' | 'right';
162
+ after?: string;
163
+ }
164
+ interface IAction {
165
+ display?: string;
166
+ icon?: string;
167
+ callback: Function;
168
+ disabled?: boolean;
169
+ disabledCallback?: Function;
170
+ color: Color;
171
+ }
172
+ declare class ChrTableComponent implements OnInit, AfterViewInit {
173
+ private _date;
174
+ private dataService;
175
+ private changeDetector;
176
+ readonly computedRows: _angular_core.InputSignal<IComputedRow[] | undefined>;
177
+ readonly columns: _angular_core.InputSignal<IColumn[] | undefined>;
178
+ private _data;
179
+ get data(): any[] | null;
180
+ set data(value: any[] | null);
181
+ readonly actions: _angular_core.InputSignal<IAction[]>;
182
+ readonly isAsc: _angular_core.ModelSignal<boolean>;
183
+ readonly sortBy: _angular_core.ModelSignal<string[] | undefined>;
184
+ readonly pageSize: _angular_core.ModelSignal<number>;
185
+ readonly currentPage: _angular_core.ModelSignal<number>;
186
+ readonly selectable: _angular_core.InputSignal<boolean>;
187
+ readonly selection: _angular_core.ModelSignal<any[]>;
188
+ readonly id: _angular_core.InputSignal<string>;
189
+ readonly color: _angular_core.InputSignal<Color>;
190
+ readonly textColor: _angular_core.InputSignal<Color>;
191
+ private _page;
192
+ readonly contextMenuItems: (entry: any) => IContextMenuItem[];
193
+ currentProperty: any | null;
194
+ currentText: string | null;
195
+ ngOnInit(): void;
196
+ ngAfterViewInit(): void;
197
+ protected getProperty: (entry: any, properties?: any[]) => any;
198
+ protected getText: (property: any, column: IColumn) => any;
199
+ protected select: (entry: any, event: MouseEvent) => void;
200
+ getSelection: () => any[];
201
+ setSelection: (data: any[]) => void;
202
+ protected contains: (entry: any) => boolean;
203
+ protected getIsAsc: () => boolean;
204
+ protected getSortBy: () => string[] | undefined;
205
+ protected getTextColor: (color?: Color) => string;
206
+ protected getBackgroundColor: (color?: Color) => string;
207
+ protected getContrastTextColor: (color?: Color) => string;
208
+ protected getBorderColor: (color?: Color) => string;
209
+ protected getAlignment: (alignment?: Alignment) => string;
210
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChrTableComponent, never>;
211
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChrTableComponent, "app-chr-table, [app-chr-table]", never, { "computedRows": { "alias": "computedRows"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "isAsc": { "alias": "isAsc"; "required": false; "isSignal": true; }; "sortBy": { "alias": "sortBy"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "textColor": { "alias": "textColor"; "required": false; "isSignal": true; }; }, { "isAsc": "isAscChange"; "sortBy": "sortByChange"; "pageSize": "pageSizeChange"; "currentPage": "currentPageChange"; "selection": "selectionChange"; }, never, ["*"], true, never>;
212
+ }
213
+
115
214
  interface ModalOptions {
116
215
  /**
117
216
  * Indicates if the modal is open or closed.
@@ -135,6 +234,28 @@ interface ModalOptions {
135
234
  * Height in vh
136
235
  */
137
236
  height?: number;
237
+ /**
238
+ * Extra configuration to be passed to the modal component instance
239
+ */
240
+ extraConfig?: {
241
+ /**
242
+ * Title of the modal
243
+ */
244
+ title: string;
245
+ /**
246
+ * Text/HTML content of the modal
247
+ */
248
+ text: string;
249
+ /**
250
+ * Label for the close button
251
+ * @default 'Fermer'
252
+ */
253
+ close: string;
254
+ /**
255
+ * Array of actions to be shown as buttons in the modal
256
+ */
257
+ actions: IAction[];
258
+ } | any;
138
259
  /**
139
260
  * Default background of the modal container. Defaults to 'none' as to allow customisation through css with the class '.modal-content'.
140
261
  * @default 'none'
@@ -214,14 +335,14 @@ declare class ModalRef<T extends object> implements IModalRef<ChrModalComponent<
214
335
  */
215
336
  configure(options: ModalOptions): void;
216
337
  private _configureModal;
338
+ private _setInputs;
217
339
  private _attachToDom;
218
340
  }
219
341
 
220
342
  declare class ChrDeleteModalComponent {
221
- t: ModalRef<ChrDeleteModalComponent>;
222
343
  dialogRef: ModalRef<any>;
223
344
  valid: boolean;
224
- constructor(t: ModalRef<ChrDeleteModalComponent>);
345
+ constructor();
225
346
  ngOnInit(): void;
226
347
  cancel: () => void;
227
348
  close: () => void;
@@ -813,25 +934,6 @@ declare class ChrSearchSelectComponent extends ChrBaseInputComponent implements
813
934
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChrSearchSelectComponent, "app-chr-search-select, [app-chr-search-select], chr-search-select, [chr-search-select]", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "display": { "alias": "display"; "required": false; "isSignal": true; }; "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "addCallback": { "alias": "addCallback"; "required": false; "isSignal": true; }; "acceptText": { "alias": "acceptText"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
814
935
  }
815
936
 
816
- interface IContextMenuItem {
817
- /**
818
- * Label for the menu item
819
- */
820
- label: string;
821
- /**
822
- * Action to trigger when the menu item is clicked
823
- */
824
- action: Function;
825
- /**
826
- * Optional Material Icon name to display
827
- */
828
- icon?: string;
829
- /**
830
- * Optional color for the hover background
831
- */
832
- color?: Color;
833
- }
834
-
835
937
  declare class ChrTagSelectComponent extends ChrBaseInputComponent implements ControlValueAccessor, OnInit, OnDestroy {
836
938
  predicate: boolean;
837
939
  readonly autocomplete: _angular_core.Signal<MatAutocomplete>;
@@ -894,87 +996,6 @@ declare class ChrTagSelectComponent extends ChrBaseInputComponent implements Con
894
996
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChrTagSelectComponent, "app-chr-tag-select, [app-chr-tag-select], chr-tag-select, [chr-tag-select]", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "display": { "alias": "display"; "required": false; "isSignal": true; }; "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "editCallback": { "alias": "editCallback"; "required": false; "isSignal": true; }; "addCallback": { "alias": "addCallback"; "required": false; "isSignal": true; }; "removeCallback": { "alias": "removeCallback"; "required": false; "isSignal": true; }; "acceptText": { "alias": "acceptText"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
895
997
  }
896
998
 
897
- type Alignment = 'left' | 'center' | 'right';
898
- declare const Aligments: {
899
- [key: string]: string;
900
- };
901
- interface IChips {
902
- display: string;
903
- name: string;
904
- callback: (entry: any) => string | boolean;
905
- textColor?: Color;
906
- backgroundColor?: Color;
907
- }
908
- interface IColumn {
909
- display: string;
910
- alignment?: 'left' | 'center' | 'right';
911
- chips?: IChips[];
912
- properties?: string[];
913
- callback?: Function;
914
- date?: string;
915
- isLink?: boolean;
916
- linkStaticUrl?: string;
917
- }
918
- interface IComputedRow {
919
- columns: IComputedColumn[];
920
- }
921
- interface IComputedColumn {
922
- label?: string;
923
- value?: any;
924
- callback?: Function;
925
- alignment?: 'left' | 'center' | 'right';
926
- after?: string;
927
- }
928
- interface IAction {
929
- display?: string;
930
- icon?: string;
931
- callback: Function;
932
- disabled?: boolean;
933
- disabledCallback?: Function;
934
- color: Color;
935
- }
936
- declare class ChrTableComponent implements OnInit, AfterViewInit {
937
- private _date;
938
- private dataService;
939
- private changeDetector;
940
- readonly computedRows: _angular_core.InputSignal<IComputedRow[] | undefined>;
941
- readonly columns: _angular_core.InputSignal<IColumn[] | undefined>;
942
- private _data;
943
- get data(): any[] | null;
944
- set data(value: any[] | null);
945
- readonly actions: _angular_core.InputSignal<IAction[]>;
946
- readonly isAsc: _angular_core.ModelSignal<boolean>;
947
- readonly sortBy: _angular_core.ModelSignal<string[] | undefined>;
948
- readonly pageSize: _angular_core.ModelSignal<number>;
949
- readonly currentPage: _angular_core.ModelSignal<number>;
950
- readonly selectable: _angular_core.InputSignal<boolean>;
951
- readonly selection: _angular_core.ModelSignal<any[]>;
952
- readonly id: _angular_core.InputSignal<string>;
953
- readonly color: _angular_core.InputSignal<Color>;
954
- readonly textColor: _angular_core.InputSignal<Color>;
955
- private _page;
956
- readonly contextMenuItems: (entry: any) => IContextMenuItem[];
957
- currentProperty: any | null;
958
- currentText: string | null;
959
- ngOnInit(): void;
960
- ngAfterViewInit(): void;
961
- protected getProperty: (entry: any, properties?: any[]) => any;
962
- protected getText: (property: any, column: IColumn) => any;
963
- protected select: (entry: any, event: MouseEvent) => void;
964
- getSelection: () => any[];
965
- setSelection: (data: any[]) => void;
966
- protected contains: (entry: any) => boolean;
967
- protected getIsAsc: () => boolean;
968
- protected getSortBy: () => string[] | undefined;
969
- protected getTextColor: (color?: Color) => string;
970
- protected getBackgroundColor: (color?: Color) => string;
971
- protected getContrastTextColor: (color?: Color) => string;
972
- protected getBorderColor: (color?: Color) => string;
973
- protected getAlignment: (alignment?: Alignment) => string;
974
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChrTableComponent, never>;
975
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChrTableComponent, "app-chr-table, [app-chr-table]", never, { "computedRows": { "alias": "computedRows"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "isAsc": { "alias": "isAsc"; "required": false; "isSignal": true; }; "sortBy": { "alias": "sortBy"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "currentPage": { "alias": "currentPage"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "textColor": { "alias": "textColor"; "required": false; "isSignal": true; }; }, { "isAsc": "isAscChange"; "sortBy": "sortByChange"; "pageSize": "pageSizeChange"; "currentPage": "currentPageChange"; "selection": "selectionChange"; }, never, ["*"], true, never>;
976
- }
977
-
978
999
  type TColumn = {
979
1000
  /**
980
1001
  * Nom de la colonne
@@ -1275,36 +1296,21 @@ declare class ChrToastComponent {
1275
1296
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChrToastComponent, "app-chr-toast", never, { "topmargin": { "alias": "topmargin"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1276
1297
  }
1277
1298
 
1278
- interface IDefaultDialogConfig extends MatDialogConfig<any> {
1279
- config?: MatDialogConfig<any>;
1280
- title: string;
1281
- text: string;
1282
- close?: string;
1283
- actions?: IAction[];
1284
- }
1285
- interface DialogConfig {
1286
- _config: {
1287
- title: string;
1288
- text: string;
1289
- close: string;
1290
- actions: IAction[];
1291
- };
1292
- }
1293
1299
  declare class ChrDefaultModalComponent {
1294
- dialogRef: MatDialogRef<ChrDefaultModalComponent, any>;
1295
- config: DialogConfig;
1300
+ private dialogRef;
1301
+ private config;
1296
1302
  private sanitizer;
1297
1303
  valid: boolean;
1298
- readonly title: _angular_core.InputSignal<string | undefined>;
1299
- readonly text: _angular_core.InputSignal<string | undefined>;
1300
- readonly actions: _angular_core.InputSignal<IAction[] | undefined>;
1301
- readonly close: _angular_core.InputSignal<string | undefined>;
1302
- protected html: SafeHtml | null;
1304
+ readonly title: _angular_core.ModelSignal<string>;
1305
+ readonly text: _angular_core.ModelSignal<string>;
1306
+ readonly actions: _angular_core.ModelSignal<IAction[] | undefined>;
1307
+ readonly close: _angular_core.ModelSignal<string>;
1308
+ protected html: _angular_core.Signal<SafeHtml>;
1303
1309
  constructor();
1304
1310
  ngOnInit(): void;
1305
1311
  closeModal: (callback?: Function) => void;
1306
1312
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChrDefaultModalComponent, never>;
1307
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChrDefaultModalComponent, "app-chr-default-modal", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "close": { "alias": "close"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1313
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChrDefaultModalComponent, "app-chr-default-modal", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "text": { "alias": "text"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "close": { "alias": "close"; "required": false; "isSignal": true; }; }, { "title": "titleChange"; "text": "textChange"; "actions": "actionsChange"; "close": "closeChange"; }, never, never, true, never>;
1308
1314
  }
1309
1315
 
1310
1316
  declare class InlineSvgComponent implements OnInit {
@@ -1681,4 +1687,4 @@ declare const XSRFCOOKIENAME: InjectionToken<string>;
1681
1687
  declare const HUBURL: InjectionToken<string>;
1682
1688
 
1683
1689
  export { Aligments, AutofocusDirective, BaseErrorDisplays, BreadcrumbComponent, ButtonComponent, CHR_MODAL_DATA, CHR_MODAL_REF, CarouselComponent, ChrBaseInputComponent, ChrButtonComponent, ChrCheckboxComponent, ChrColorInputComponent, ChrContextMenuComponent, ChrDataTable, ChrDateInputComponent, ChrDatetimeInputComponent, ChrDefaultModalComponent, ChrDeleteModalComponent, ChrDropdownComponent, ChrFile, ChrFileInputComponent, ChrFormComponent, ChrModalComponent, ChrNiceFileInputComponent, ChrPaginatorComponent, ChrSearchSelectComponent, ChrSearchbarComponent, ChrSeparatorComponent, ChrSpinnerComponent, ChrTableComponent, ChrTableHeaderCellComponent, ChrTagSelectComponent, ChrTextareaInputComponent, ChrToastComponent, ChrToggleInputComponent, Colors, ContextMenuDirective, CookiesService, DEFAULTLIVEUPDATEMESSAGE, DataService, DecimalValidatorDirective, DefaultLiveUpdateMessage, FileService, HUBURL, InlineSvgComponent, LiveUpdateService, LiveUpdateStatus, LoaderService, MaxDateValidatorDirective, MaxFileSizeValidator, MaxLengthValidatorDirective, MinFileSizeValidator, MinLengthValidatorDirective, ModalRef, ModalService, RequiredValidatorDirective, SpinnerInterceptor, SyncValidatorToAsync, TabComponent, TabGroupComponent, TabToEnterHandlerDirective, TabToInputHandlerDirective, ToastService, TypeValidatorDirective, WaitAndStoreXsrfToken, XSRFCOOKIENAME, XSRFHEADERNAME, XsrfInterceptor, decimal, getAsyncValidators, getBackgroundColor, getBorderColor, getContrastBackgroundColor, getContrastBorderColor, getContrastTextColor, getSyncValidators, getTextColor, getValidators, inOutAnimation, maxDate, maxFileSize, maxLength, minFileSize, minLength, provideXsrfHttpClient, required, rotationAnimation, type };
1684
- export type { Alignment, Breadcrumb, Color, IAction, IChip, IChips, IColumn, IComputedColumn, IComputedRow, IContextMenuItem, IControl, IControlValidation, IDefaultDialogConfig, IFile, IFormSection, IInputSearchFilter, ILiveUpdateMessage, IModalRef, ISearchFilter, IXsrfProviderParams, InputType, ModalData, ModalOptions, TColumn, TColumnType, Toast };
1690
+ export type { Alignment, Breadcrumb, Color, IAction, IChip, IChips, IColumn, IComputedColumn, IComputedRow, IContextMenuItem, IControl, IControlValidation, IFile, IFormSection, IInputSearchFilter, ILiveUpdateMessage, IModalRef, ISearchFilter, IXsrfProviderParams, InputType, ModalData, ModalOptions, TColumn, TColumnType, Toast };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chrv-components",
3
- "version": "1.11.55",
3
+ "version": "1.11.56",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=17.0.0",
6
6
  "@angular/core": ">=17.0.0",
Binary file