@jm-7c3/common-lib 22.1.0 → 22.3.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.
package/package.json CHANGED
@@ -1,16 +1,19 @@
1
1
  {
2
2
  "name": "@jm-7c3/common-lib",
3
- "version": "22.1.0",
3
+ "version": "22.3.0",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^22.0.4",
6
6
  "@angular/common": "^22.0.5",
7
7
  "@angular/core": "^22.0.5",
8
8
  "@angular/material": "^22.0.4",
9
9
  "@ngrx/signals": "^21.1.1",
10
+ "@tailwindcss/postcss": "^4.3.2",
10
11
  "lodash-es": "^4.18.1",
12
+ "postcss": "^8.5.16",
11
13
  "primeflex": "^4.0.0",
12
14
  "primeicons": "^7.0.0",
13
15
  "primeng": "^21.1.9",
16
+ "tailwindcss": "^4.3.2",
14
17
  "uuid": "^14.0.1"
15
18
  },
16
19
  "dependencies": {
@@ -21,9 +24,10 @@
21
24
  "type": "git",
22
25
  "url": "https://github.com/jm-7c3/ngx-common-library.git"
23
26
  },
24
- "module": "fesm2022/jm-7c3-common-lib.mjs",
25
- "typings": "types/jm-7c3-common-lib.d.ts",
26
27
  "exports": {
28
+ "./styles.css": {
29
+ "styles": "./styles.css"
30
+ },
27
31
  "./package.json": {
28
32
  "default": "./package.json"
29
33
  },
@@ -32,5 +36,7 @@
32
36
  "default": "./fesm2022/jm-7c3-common-lib.mjs"
33
37
  }
34
38
  },
39
+ "module": "fesm2022/jm-7c3-common-lib.mjs",
40
+ "typings": "types/jm-7c3-common-lib.d.ts",
35
41
  "type": "module"
36
42
  }
package/styles.css ADDED
@@ -0,0 +1,2 @@
1
+ /*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-gray-300:oklch(87.2% .01 258.338);--spacing:.25rem;--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--radius-lg:.5rem;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.mt-5{margin-top:calc(var(--spacing) * 5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-3{margin-right:calc(var(--spacing) * 3)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.block{display:block}.flex{display:flex}.hidden{display:none}.w-4{width:calc(var(--spacing) * 4)}.rounded-lg{border-radius:var(--radius-lg)}.border-1{border-style:var(--tw-border-style);border-width:1px}.border-gray-300{border-color:var(--color-gray-300)}.p-5{padding:calc(var(--spacing) * 5)}.text-right{text-align:right}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.\[x\:string\]{x:string}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}
@@ -1,8 +1,10 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnInit, AfterViewInit, Type, OnDestroy, ElementRef, InjectionToken } from '@angular/core';
2
+ import { OnInit, AfterViewInit, Type, OnDestroy, TemplateRef, ElementRef, InjectionToken } from '@angular/core';
3
3
  import { Observable, Subscription } from 'rxjs';
4
4
  import { UntypedFormGroup, FormGroup, ControlValueAccessor, Validator, FormArray, FormControl, AbstractControl, ValidationErrors, FormControlName } from '@angular/forms';
5
5
  import { MatDialogConfig } from '@angular/material/dialog';
6
+ import * as _angular_forms_signals from '@angular/forms/signals';
7
+ import { FormValueControl, SchemaPath } from '@angular/forms/signals';
6
8
 
7
9
  type ButtonColor = 'danger' | 'link' | 'main' | 'primary' | 'secondary';
8
10
 
@@ -212,6 +214,16 @@ declare class MatFormDialogService {
212
214
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<MatFormDialogService>;
213
215
  }
214
216
 
217
+ type PanelTemplate = TemplateRef<any> | undefined;
218
+ declare class PanelComponent {
219
+ protected readonly contentTemplate: _angular_core.Signal<PanelTemplate>;
220
+ protected readonly footerTemplate: _angular_core.Signal<PanelTemplate>;
221
+ protected readonly headerTemplate: _angular_core.Signal<PanelTemplate>;
222
+ readonly title: _angular_core.InputSignal<string>;
223
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PanelComponent, never>;
224
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PanelComponent, "cl-panel", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; }, {}, ["contentTemplate", "footerTemplate", "headerTemplate"], never, true, never>;
225
+ }
226
+
215
227
  declare class ProgressBarDialogComponent {
216
228
  private readonly cdRef;
217
229
  private readonly clStateService;
@@ -261,7 +273,7 @@ declare class ToastsService {
261
273
  }
262
274
 
263
275
  declare class BaseFormComponent implements ControlValueAccessor, OnDestroy, Validator {
264
- readonly control: FormArray<any> | FormControl<any> | FormGroup<any>;
276
+ readonly control: FormGroup<any> | FormArray<any> | FormControl<any>;
265
277
  readonly disabled: _angular_core.WritableSignal<boolean>;
266
278
  protected readonly subscription: Subscription;
267
279
  ngOnDestroy(): void;
@@ -291,7 +303,7 @@ declare class FileInputComponent implements ControlValueAccessor {
291
303
  readonly fileName: _angular_core.WritableSignal<string>;
292
304
  readonly isDisabled: _angular_core.WritableSignal<boolean>;
293
305
  readonly isFileSelected: _angular_core.WritableSignal<boolean>;
294
- readonly value: _angular_core.WritableSignal<FileInputValue$1>;
306
+ readonly value: _angular_core.WritableSignal<FileInputValue>;
295
307
  registerOnChange(fn: any): void;
296
308
  registerOnTouched(fn: any): void;
297
309
  setDisabledState(isDisabled: boolean): void;
@@ -319,7 +331,7 @@ interface FileInput {
319
331
  path: string;
320
332
  toDelete: boolean;
321
333
  }
322
- type FileInputValue$1 = FileInput[] | null;
334
+ type FileInputValue = FileInput[] | null;
323
335
 
324
336
  declare class FileInputsComponent extends BaseFormComponent {
325
337
  private readonly cdRef;
@@ -334,12 +346,12 @@ declare class FileInputsComponent extends BaseFormComponent {
334
346
  onDownload(file: FileInput[]): void;
335
347
  setDisabledState(isDisabled: boolean): void;
336
348
  validate(control?: AbstractControl): ValidationErrors | null;
337
- writeValue(value: FileInputsValue$1): void;
349
+ writeValue(value: FileInputsValue): void;
338
350
  protected getForm(): FormArray<any>;
339
351
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<FileInputsComponent, never>;
340
352
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<FileInputsComponent, "cl-file-inputs", never, { "directory": { "alias": "directory"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; }, { "onDownloadEmitter": "onDownload"; }, never, never, true, never>;
341
353
  }
342
- type FileInputsValue$1 = FileInput[][] | null;
354
+ type FileInputsValue = FileInput[][] | null;
343
355
 
344
356
  declare const ERROR_DIRECTIVE: InjectionToken<ErrorDirective>;
345
357
  declare class ErrorDirective {
@@ -375,56 +387,54 @@ interface MatFileInput {
375
387
  path: string;
376
388
  toDelete: boolean;
377
389
  }
378
- type FileInputValue = MatFileInput[] | null;
379
- declare class MatFileInputComponent implements ControlValueAccessor {
390
+ type MatFileInputValue = MatFileInput[] | null;
391
+ declare function matFileInputRequired(message?: string): (path: SchemaPath<MatFileInputValue>) => void;
392
+ declare class MatFileInputComponent implements FormValueControl<MatFileInputValue>, OnInit {
380
393
  readonly directory: _angular_core.InputSignal<string>;
394
+ readonly disabled: _angular_core.InputSignal<boolean>;
381
395
  readonly icon: _angular_core.InputSignal<string>;
382
396
  readonly label: _angular_core.InputSignal<string>;
383
397
  readonly readonly: _angular_core.InputSignal<boolean>;
384
- readonly onDownloadEmitter: _angular_core.OutputEmitterRef<MatFileInput[]>;
398
+ readonly onDownloadEmitter: _angular_core.OutputEmitterRef<MatFileInputValue>;
385
399
  readonly fileInput: _angular_core.Signal<ElementRef<any> | undefined>;
386
- readonly fileName: _angular_core.WritableSignal<string>;
387
- readonly isDisabled: _angular_core.WritableSignal<boolean>;
388
- readonly isFileSelected: _angular_core.WritableSignal<boolean>;
389
- readonly value: _angular_core.WritableSignal<FileInputValue>;
390
- registerOnChange(fn: any): void;
391
- registerOnTouched(fn: any): void;
392
- setDisabledState(isDisabled: boolean): void;
393
- writeValue(value?: MatFileInput[] | string | null): void;
394
- onClick(): void;
395
- onFileSelected(event: Event): void;
396
- onDelete(): void;
397
- onDownload(): void;
400
+ readonly value: _angular_core.ModelSignal<MatFileInputValue>;
401
+ protected readonly form: _angular_forms_signals.FieldTree<MatFileInputValue, string | number, "writable">;
402
+ protected readonly isFileSelected: _angular_core.Signal<number | undefined>;
403
+ protected readonly fileName: _angular_core.Signal<string>;
404
+ ngOnInit(): void;
405
+ protected onClick(event: Event): void;
406
+ protected onFileSelected(event: Event): void;
407
+ protected onDelete(): void;
408
+ protected onDownload(): void;
398
409
  private getFileNameParts;
399
410
  private getHashFromFileName;
400
411
  private getLastFile;
401
412
  private getSafeFileName;
402
- private onChange;
403
- private onTouched;
404
- private selectFile;
405
- private setValue;
413
+ private writeValue;
406
414
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MatFileInputComponent, never>;
407
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatFileInputComponent, "cl-mat-file-input", never, { "directory": { "alias": "directory"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; }, { "onDownloadEmitter": "onDownload"; }, never, never, true, never>;
415
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatFileInputComponent, "cl-mat-file-input", never, { "directory": { "alias": "directory"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "onDownloadEmitter": "onDownload"; "value": "valueChange"; }, never, never, true, never>;
408
416
  }
409
417
 
410
- type FileInputsValue = MatFileInput[][] | null;
411
- declare class MatFileInputsComponent extends BaseFormComponent {
412
- private readonly cdRef;
418
+ type MatFileInputsValue = MatFileInputValue[] | null;
419
+ declare function matFileInputsRequired(message?: string): (path: SchemaPath<MatFileInputsValue>) => void;
420
+ declare class MatFileInputsComponent implements FormValueControl<MatFileInputsValue>, OnInit {
413
421
  readonly directory: _angular_core.InputSignal<string>;
422
+ readonly disabled: _angular_core.InputSignal<boolean>;
414
423
  readonly icon: _angular_core.InputSignal<string>;
415
424
  readonly label: _angular_core.InputSignal<string>;
416
- readonly max: _angular_core.InputSignal<number>;
425
+ readonly maxFiles: _angular_core.InputSignal<number>;
417
426
  readonly readonly: _angular_core.InputSignal<boolean>;
418
427
  readonly onDownloadEmitter: _angular_core.OutputEmitterRef<MatFileInput[]>;
419
- onAdd(): void;
420
- onDelete(index: number): void;
421
- onDownload(file: MatFileInput[]): void;
422
- setDisabledState(isDisabled: boolean): void;
423
- validate(control?: AbstractControl): ValidationErrors | null;
424
- writeValue(value: FileInputsValue): void;
425
- protected getForm(): FormArray<any>;
428
+ readonly value: _angular_core.ModelSignal<MatFileInputsValue>;
429
+ protected readonly form: _angular_forms_signals.FieldTree<MatFileInputsValue, string | number, "writable">;
430
+ ngOnInit(): void;
431
+ protected onAdd(): void;
432
+ protected onDelete(index: number): void;
433
+ protected onDownload(file: MatFileInput[] | null): void;
434
+ protected onValueChange(file: MatFileInputValue, index: number): void;
435
+ private writeValue;
426
436
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MatFileInputsComponent, never>;
427
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatFileInputsComponent, "cl-mat-file-inputs", never, { "directory": { "alias": "directory"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; }, { "onDownloadEmitter": "onDownload"; }, never, never, true, never>;
437
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MatFileInputsComponent, "cl-mat-file-inputs", never, { "directory": { "alias": "directory"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "maxFiles": { "alias": "maxFiles"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "onDownloadEmitter": "onDownload"; "value": "valueChange"; }, never, never, true, never>;
428
438
  }
429
439
 
430
440
  interface ConfirmationConfig {
@@ -471,5 +481,5 @@ declare class ClStateService {
471
481
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<ClStateService>;
472
482
  }
473
483
 
474
- export { BaseFormComponent, ButtonComponent, ClStateService, CommonLibModule, ConfirmationComponent, ConfirmationService, ContentDialogComponent, ContentDialogService, ERROR_DIRECTIVE, ErrorDirective, FORM_FIELD, FileInputComponent, FileInputsComponent, FormDialogComponent, FormDialogService, FormFieldComponent, FormFieldModule, IconButtonComponent, LABEL_DIRECTIVE, LabelDirective, MatConfirmationComponent, MatConfirmationService, MatFileInputComponent, MatFileInputsComponent, MatFormDialogComponent, MatFormDialogService, MatFormHostableComponent, ProgressBarDialogComponent, ProgressBarDialogService, ReadonlyValueComponent, ToastsComponent, ToastsService, concatWithToArray };
475
- export type { ClState, ClStateMessage, ClStateMessageType, ConfirmationConfig, ConfirmationData, ContentDialogConfig, ContentDialogData, ContentDialogDataConfig, FieldOption, FileInput, FormDialogConfig, FormDialogData, FormDialogDataConfig, MatConfirmationComponentConfig, MatConfirmationConfig, MatConfirmationData, MatFileInput, MatFormDialogConfig, MatFormDialogData, ToastData };
484
+ export { BaseFormComponent, ButtonComponent, ClStateService, CommonLibModule, ConfirmationComponent, ConfirmationService, ContentDialogComponent, ContentDialogService, ERROR_DIRECTIVE, ErrorDirective, FORM_FIELD, FileInputComponent, FileInputsComponent, FormDialogComponent, FormDialogService, FormFieldComponent, FormFieldModule, IconButtonComponent, LABEL_DIRECTIVE, LabelDirective, MatConfirmationComponent, MatConfirmationService, MatFileInputComponent, MatFileInputsComponent, MatFormDialogComponent, MatFormDialogService, MatFormHostableComponent, PanelComponent, ProgressBarDialogComponent, ProgressBarDialogService, ReadonlyValueComponent, ToastsComponent, ToastsService, concatWithToArray, matFileInputRequired, matFileInputsRequired };
485
+ export type { ClState, ClStateMessage, ClStateMessageType, ConfirmationConfig, ConfirmationData, ContentDialogConfig, ContentDialogData, ContentDialogDataConfig, FieldOption, FileInput, FormDialogConfig, FormDialogData, FormDialogDataConfig, MatConfirmationComponentConfig, MatConfirmationConfig, MatConfirmationData, MatFileInput, MatFileInputValue, MatFileInputsValue, MatFormDialogConfig, MatFormDialogData, ToastData };
Binary file