nexheal-lib 0.0.29 → 0.0.31
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/fesm2022/nexheal-lib.mjs +85 -31
- package/fesm2022/nexheal-lib.mjs.map +1 -1
- package/index.d.ts +31 -10
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -247,6 +247,10 @@ declare class ColorPicker implements ControlValueAccessor, OnDestroy {
|
|
|
247
247
|
showValue: boolean;
|
|
248
248
|
/** Where the value text sits relative to the swatch/panel. */
|
|
249
249
|
valuePosition: "left" | "right" | "bottom";
|
|
250
|
+
/** Trigger look: a plain `swatch`, or an `input`-style field with the swatch inside it. */
|
|
251
|
+
variant: "swatch" | "input";
|
|
252
|
+
/** Placeholder shown in the `input` variant when there is no value yet. */
|
|
253
|
+
placeholder: string;
|
|
250
254
|
onChange: EventEmitter<ColorPickerValue>;
|
|
251
255
|
blurEvent: EventEmitter<void>;
|
|
252
256
|
h: number;
|
|
@@ -271,6 +275,8 @@ declare class ColorPicker implements ControlValueAccessor, OnDestroy {
|
|
|
271
275
|
get previewColor(): string;
|
|
272
276
|
/** The chosen value as a display string, formatted to match `format`. */
|
|
273
277
|
get displayValue(): string;
|
|
278
|
+
/** Whether a value has actually been set (vs. just the default colour). */
|
|
279
|
+
get hasValue(): boolean;
|
|
274
280
|
get satHandleLeft(): number;
|
|
275
281
|
get briHandleTop(): number;
|
|
276
282
|
get hueHandleTop(): number;
|
|
@@ -299,7 +305,7 @@ declare class ColorPicker implements ControlValueAccessor, OnDestroy {
|
|
|
299
305
|
private hexToRgb;
|
|
300
306
|
private rgbToHex;
|
|
301
307
|
static ɵfac: i0.ɵɵFactoryDeclaration<ColorPicker, never>;
|
|
302
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ColorPicker, "color-picker", never, { "title": { "alias": "title"; "required": false; }; "required": { "alias": "required"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "inline": { "alias": "inline"; "required": false; }; "format": { "alias": "format"; "required": false; }; "defaultColor": { "alias": "defaultColor"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "showValue": { "alias": "showValue"; "required": false; }; "valuePosition": { "alias": "valuePosition"; "required": false; }; }, { "onChange": "onChange"; "blurEvent": "blurEvent"; }, never, never, true, never>;
|
|
308
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ColorPicker, "color-picker", never, { "title": { "alias": "title"; "required": false; }; "required": { "alias": "required"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "inline": { "alias": "inline"; "required": false; }; "format": { "alias": "format"; "required": false; }; "defaultColor": { "alias": "defaultColor"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "showValue": { "alias": "showValue"; "required": false; }; "valuePosition": { "alias": "valuePosition"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, { "onChange": "onChange"; "blurEvent": "blurEvent"; }, never, never, true, never>;
|
|
303
309
|
}
|
|
304
310
|
|
|
305
311
|
declare class InputControl implements ControlValueAccessor, OnInit, OnDestroy {
|
|
@@ -537,7 +543,7 @@ declare class SwitchControl implements ControlValueAccessor {
|
|
|
537
543
|
* `formControlName` and `[formControl]`. The emitted value is the editor's
|
|
538
544
|
* inner HTML string.
|
|
539
545
|
*/
|
|
540
|
-
declare class
|
|
546
|
+
declare class RichTextEditor implements ControlValueAccessor, AfterViewInit {
|
|
541
547
|
header: boolean;
|
|
542
548
|
media: boolean;
|
|
543
549
|
link: boolean;
|
|
@@ -553,6 +559,13 @@ declare class TextEditor implements ControlValueAccessor, AfterViewInit {
|
|
|
553
559
|
private viewInitialized;
|
|
554
560
|
/** Last selection range observed inside the editor (restored before commands). */
|
|
555
561
|
private savedRange;
|
|
562
|
+
/** Which color popover is open, if any. */
|
|
563
|
+
colorMenu: 'text' | 'background' | null;
|
|
564
|
+
/** Preset swatches shown in the color popovers. */
|
|
565
|
+
readonly palette: string[];
|
|
566
|
+
showModal: boolean;
|
|
567
|
+
modalType: 'link' | 'image';
|
|
568
|
+
modalUrls: string[];
|
|
556
569
|
ngAfterViewInit(): void;
|
|
557
570
|
writeValue(value: string): void;
|
|
558
571
|
registerOnChange(fn: (value: string) => void): void;
|
|
@@ -562,22 +575,30 @@ declare class TextEditor implements ControlValueAccessor, AfterViewInit {
|
|
|
562
575
|
onTouched(): void;
|
|
563
576
|
/** Remember the caret/selection whenever it sits inside the editor. */
|
|
564
577
|
saveSelection(): void;
|
|
578
|
+
/** Close the color popover when a press starts outside any color tool. */
|
|
579
|
+
onDocumentMouseDown(event: Event): void;
|
|
565
580
|
applyInlineStyle(style: 'bold' | 'italic' | 'underline'): void;
|
|
566
581
|
applyBlockFormat(block: 'h1' | 'h2' | 'p'): void;
|
|
567
582
|
applyList(listType: 'ul' | 'ol'): void;
|
|
568
583
|
indent(): void;
|
|
569
584
|
outdent(): void;
|
|
570
585
|
setAlignment(alignment: 'left' | 'center' | 'right' | 'justify'): void;
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
586
|
+
toggleColorMenu(type: 'text' | 'background'): void;
|
|
587
|
+
/** Apply a preset swatch. */
|
|
588
|
+
pickColor(type: 'text' | 'background', color: string): void;
|
|
589
|
+
/** Apply a custom color from the native color input. */
|
|
590
|
+
pickCustomColor(type: 'text' | 'background', event: Event): void;
|
|
576
591
|
createLink(): void;
|
|
577
592
|
insertImage(): void;
|
|
578
593
|
private openModal;
|
|
579
594
|
addUrlRow(): void;
|
|
580
595
|
removeUrlRow(index: number): void;
|
|
596
|
+
/** A single URL is valid for the current modal type. */
|
|
597
|
+
isValidUrl(url: string): boolean;
|
|
598
|
+
/** Show a row as invalid only once the user has typed something wrong. */
|
|
599
|
+
isRowInvalid(url: string): boolean;
|
|
600
|
+
/** Whether the modal has at least one valid URL (enables "Insert"). */
|
|
601
|
+
get hasValidUrl(): boolean;
|
|
581
602
|
confirmModal(): void;
|
|
582
603
|
cancelModal(): void;
|
|
583
604
|
trackByIndex(index: number): number;
|
|
@@ -590,8 +611,8 @@ declare class TextEditor implements ControlValueAccessor, AfterViewInit {
|
|
|
590
611
|
*/
|
|
591
612
|
private exec;
|
|
592
613
|
private restoreSelection;
|
|
593
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
594
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
614
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RichTextEditor, never>;
|
|
615
|
+
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>;
|
|
595
616
|
}
|
|
596
617
|
|
|
597
618
|
declare class TextareaControl {
|
|
@@ -621,4 +642,4 @@ declare class TextareaControl {
|
|
|
621
642
|
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>;
|
|
622
643
|
}
|
|
623
644
|
|
|
624
|
-
export { AutocompleteControl, CalendarControl, CheckboxControl, ColorPicker, InputControl, MultiselectControl, SelectControl, SwitchControl,
|
|
645
|
+
export { AutocompleteControl, CalendarControl, CheckboxControl, ColorPicker, InputControl, MultiselectControl, RichTextEditor, SelectControl, SwitchControl, TextareaControl };
|