ngx-lite-form 1.3.7 → 1.3.9

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,6 +1,6 @@
1
- import { FormControl, AbstractControl } from '@angular/forms';
1
+ import { FormControl, AbstractControl, FormGroup, FormGroupDirective } from '@angular/forms';
2
2
  import * as _angular_core from '@angular/core';
3
- import { ElementRef, AfterViewInit, OnDestroy, Type, TemplateRef, ViewContainerRef } from '@angular/core';
3
+ import { ElementRef, AfterViewInit, OnDestroy, Type, TemplateRef, ViewContainerRef, QueryList } from '@angular/core';
4
4
  import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
5
5
 
6
6
  declare class FieldDto {
@@ -476,11 +476,16 @@ interface LitePanelAction {
476
476
  * Adds a CSS modifier class `lite-panel__action--${variant}` to let consumers style the action button.
477
477
  */
478
478
  variant?: 'primary' | 'secondary' | 'danger';
479
+ /**
480
+ * Controls action interactivity. Use a boolean literal or return `true` from a function to disable.
481
+ */
482
+ disabled?: boolean | (() => boolean);
479
483
  }
480
484
  declare class LitePanel implements AfterViewInit, OnDestroy {
481
485
  title: _angular_core.InputSignal<string | null>;
482
486
  content: _angular_core.InputSignal<string | Type<any> | TemplateRef<unknown> | null>;
483
487
  contentInputs: _angular_core.InputSignal<Record<string, any> | null>;
488
+ formGroup: _angular_core.InputSignal<FormGroup<any> | null>;
484
489
  actions: _angular_core.InputSignal<LitePanelAction[] | null>;
485
490
  closeOnOverlayClick: _angular_core.InputSignal<boolean>;
486
491
  width: _angular_core.InputSignal<string | number | null>;
@@ -489,8 +494,10 @@ declare class LitePanel implements AfterViewInit, OnDestroy {
489
494
  maxHeight: _angular_core.InputSignal<string | number | null>;
490
495
  closed: _angular_core.OutputEmitterRef<unknown>;
491
496
  dynamicComponentContainer?: ViewContainerRef;
497
+ formGroupDirectives?: QueryList<FormGroupDirective>;
492
498
  readonly panelTitleId: string;
493
499
  private componentRef?;
500
+ private detectedFormGroup;
494
501
  private readonly defaultActions;
495
502
  readonly resolvedActions: _angular_core.Signal<LitePanelAction[]>;
496
503
  readonly contentTemplate: _angular_core.Signal<TemplateRef<unknown> | null>;
@@ -505,13 +512,18 @@ declare class LitePanel implements AfterViewInit, OnDestroy {
505
512
  onBackdropClick(): void;
506
513
  onAction(action: LitePanelAction): void;
507
514
  getActionClasses(action: LitePanelAction): Record<string, boolean>;
515
+ isActionDisabled(action: LitePanelAction): boolean;
516
+ private shouldRespectComponentValidity;
517
+ private getComponentValidity;
518
+ private findFormGroup;
519
+ private detectFormInTemplate;
508
520
  private toCssLength;
509
521
  private isNilOrEmpty;
510
522
  ngAfterViewInit(): void;
511
523
  ngOnDestroy(): void;
512
524
  private loadDynamicComponent;
513
525
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<LitePanel, never>;
514
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<LitePanel, "lite-panel", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "contentInputs": { "alias": "contentInputs"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "closeOnOverlayClick": { "alias": "closeOnOverlayClick"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, never, ["*"], true, never>;
526
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<LitePanel, "lite-panel", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "contentInputs": { "alias": "contentInputs"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "closeOnOverlayClick": { "alias": "closeOnOverlayClick"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, never, ["*"], true, never>;
515
527
  }
516
528
 
517
529
  type LoadingView = 'spinner' | 'progress';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-lite-form",
3
- "version": "1.3.7",
3
+ "version": "1.3.9",
4
4
  "description": "A lightweight Angular form library with reusable input, textarea, select, multi-select, radio, checkbox, date picker and password components",
5
5
  "keywords": [
6
6
  "angular",