nexheal-lib 0.0.55 → 0.0.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
@@ -712,6 +712,32 @@ declare class SwitchControl implements ControlValueAccessor {
712
712
  static ɵcmp: i0.ɵɵComponentDeclaration<SwitchControl, "switch-control", never, { "title": { "alias": "title"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; }, { "switchChange": "switchChange"; "blurEvent": "blurEvent"; }, never, never, true, never>;
713
713
  }
714
714
 
715
+ /** Toolbar items that can be shown or hidden individually. */
716
+ interface RichTextEditorFeatures {
717
+ bold: boolean;
718
+ italic: boolean;
719
+ underline: boolean;
720
+ h1: boolean;
721
+ h2: boolean;
722
+ textColor: boolean;
723
+ backgroundColor: boolean;
724
+ alignLeft: boolean;
725
+ alignCenter: boolean;
726
+ alignRight: boolean;
727
+ justify: boolean;
728
+ indent: boolean;
729
+ outdent: boolean;
730
+ unorderedList: boolean;
731
+ orderedList: boolean;
732
+ link: boolean;
733
+ image: boolean;
734
+ undo: boolean;
735
+ redo: boolean;
736
+ clearFormatting: boolean;
737
+ }
738
+ type RichTextEditorFeature = keyof RichTextEditorFeatures;
739
+ declare const RICH_TEXT_EDITOR_DEFAULT_FEATURES: RichTextEditorFeatures;
740
+
715
741
  /**
716
742
  * Lightweight rich-text editor built on a `contenteditable` element and the
717
743
  * browser's `document.execCommand` rich-editing API (the de-facto standard for
@@ -722,9 +748,8 @@ declare class SwitchControl implements ControlValueAccessor {
722
748
  * inner HTML string.
723
749
  */
724
750
  declare class RichTextEditor implements ControlValueAccessor, AfterViewInit {
725
- header: boolean;
726
- media: boolean;
727
- link: boolean;
751
+ /** Per-item toolbar visibility. Omitted keys default to visible. */
752
+ features: Partial<RichTextEditorFeatures>;
728
753
  placeholder: string;
729
754
  readonly: boolean;
730
755
  /** Disabled state, set by Reactive Forms through `setDisabledState`. */
@@ -780,6 +805,10 @@ declare class RichTextEditor implements ControlValueAccessor, AfterViewInit {
780
805
  confirmModal(): void;
781
806
  cancelModal(): void;
782
807
  trackByIndex(index: number): number;
808
+ /** Whether a toolbar item is visible (defaults to true when not configured). */
809
+ isVisible(feature: RichTextEditorFeature): boolean;
810
+ /** Whether any of the given toolbar items are visible (for group separators). */
811
+ hasAny(...features: RichTextEditorFeature[]): boolean;
783
812
  undo(): void;
784
813
  redo(): void;
785
814
  clearFormatting(): void;
@@ -790,7 +819,7 @@ declare class RichTextEditor implements ControlValueAccessor, AfterViewInit {
790
819
  private exec;
791
820
  private restoreSelection;
792
821
  static ɵfac: i0.ɵɵFactoryDeclaration<RichTextEditor, never>;
793
- static ɵcmp: i0.ɵɵComponentDeclaration<RichTextEditor, "rich-text-editor", never, { "header": { "alias": "header"; "required": false; }; "media": { "alias": "media"; "required": false; }; "link": { "alias": "link"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; }, {}, never, never, true, never>;
822
+ static ɵcmp: i0.ɵɵComponentDeclaration<RichTextEditor, "rich-text-editor", never, { "features": { "alias": "features"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; }, {}, never, never, true, never>;
794
823
  }
795
824
 
796
825
  declare class TextareaControl {
@@ -820,5 +849,5 @@ declare class TextareaControl {
820
849
  static ɵcmp: i0.ɵɵComponentDeclaration<TextareaControl, "textarea-control", never, { "title": { "alias": "title"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "clearVal": { "alias": "clearVal"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "required": { "alias": "required"; "required": false; }; "error": { "alias": "error"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; }, { "textareaChange": "textareaChange"; "selectionCleared": "selectionCleared"; "blurEvent": "blurEvent"; }, never, never, true, never>;
821
850
  }
822
851
 
823
- export { AutocompleteControl, CalendarControl, CheckboxControl, ColorPicker, InputControl, MultiselectControl, PaginatedAutocompleteControl, RadioControl, RichTextEditor, SelectControl, SwitchControl, TextareaControl };
824
- export type { PageChangeEvent };
852
+ export { AutocompleteControl, CalendarControl, CheckboxControl, ColorPicker, InputControl, MultiselectControl, PaginatedAutocompleteControl, RICH_TEXT_EDITOR_DEFAULT_FEATURES, RadioControl, RichTextEditor, SelectControl, SwitchControl, TextareaControl };
853
+ export type { PageChangeEvent, RichTextEditorFeature, RichTextEditorFeatures };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexheal-lib",
3
- "version": "0.0.55",
3
+ "version": "0.0.56",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.1.0",
6
6
  "@angular/core": "^20.1.0"