nexheal-lib 0.0.11 → 0.0.13
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 +132 -269
- package/fesm2022/nexheal-lib.mjs.map +1 -1
- package/index.d.ts +39 -22
- package/package.json +1 -1
- package/src/styles/_formcontrols.scss +10 -0
package/index.d.ts
CHANGED
|
@@ -24,7 +24,6 @@ declare class AutocompleteControl implements ControlValueAccessor, OnInit, OnDes
|
|
|
24
24
|
addNewItemClicked: EventEmitter<void>;
|
|
25
25
|
blurEvent: EventEmitter<void>;
|
|
26
26
|
optionPatched: EventEmitter<any>;
|
|
27
|
-
loadAllOnOpen: boolean;
|
|
28
27
|
readonly: boolean;
|
|
29
28
|
private _disabled;
|
|
30
29
|
private _options;
|
|
@@ -68,7 +67,7 @@ declare class AutocompleteControl implements ControlValueAccessor, OnInit, OnDes
|
|
|
68
67
|
resetInput(): void;
|
|
69
68
|
removeItem(item: any): void;
|
|
70
69
|
static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteControl, never>;
|
|
71
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteControl, "autocomplete-control", never, { "title": { "alias": "title"; "required": false; }; "required": { "alias": "required"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "clearVal": { "alias": "clearVal"; "required": false; }; "field": { "alias": "field"; "required": false; }; "error": { "alias": "error"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "inputLoader": { "alias": "inputLoader"; "required": false; }; "isAddNewItem": { "alias": "isAddNewItem"; "required": false; }; "optionDisplayProperty": { "alias": "optionDisplayProperty"; "required": false; }; "
|
|
70
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteControl, "autocomplete-control", never, { "title": { "alias": "title"; "required": false; }; "required": { "alias": "required"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "clearVal": { "alias": "clearVal"; "required": false; }; "field": { "alias": "field"; "required": false; }; "error": { "alias": "error"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "inputLoader": { "alias": "inputLoader"; "required": false; }; "isAddNewItem": { "alias": "isAddNewItem"; "required": false; }; "optionDisplayProperty": { "alias": "optionDisplayProperty"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "options": { "alias": "options"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "optionSelected": "optionSelected"; "search": "search"; "selectionCleared": "selectionCleared"; "addNewItemClicked": "addNewItemClicked"; "blurEvent": "blurEvent"; "optionPatched": "optionPatched"; }, never, never, true, never>;
|
|
72
71
|
}
|
|
73
72
|
|
|
74
73
|
type ViewMode = "day" | "month" | "yearRange";
|
|
@@ -87,7 +86,9 @@ declare class CalendarControl implements ControlValueAccessor, OnInit, OnDestroy
|
|
|
87
86
|
timeOnly: boolean;
|
|
88
87
|
dateFormat: string;
|
|
89
88
|
placeholder: string;
|
|
90
|
-
|
|
89
|
+
private _disabled;
|
|
90
|
+
get disabled(): boolean;
|
|
91
|
+
set disabled(value: boolean);
|
|
91
92
|
readonly: boolean;
|
|
92
93
|
submitted: boolean;
|
|
93
94
|
inputPlaceholder: boolean;
|
|
@@ -435,43 +436,59 @@ declare class SwitchControl implements ControlValueAccessor {
|
|
|
435
436
|
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>;
|
|
436
437
|
}
|
|
437
438
|
|
|
438
|
-
|
|
439
|
+
/**
|
|
440
|
+
* Lightweight rich-text editor built on a `contenteditable` element and the
|
|
441
|
+
* browser's `document.execCommand` rich-editing API (the de-facto standard for
|
|
442
|
+
* simple in-browser editors).
|
|
443
|
+
*
|
|
444
|
+
* Implemented as a `ControlValueAccessor`, so it works with `[(ngModel)]`,
|
|
445
|
+
* `formControlName` and `[formControl]`. The emitted value is the editor's
|
|
446
|
+
* inner HTML string.
|
|
447
|
+
*/
|
|
448
|
+
declare class TextEditor implements ControlValueAccessor, AfterViewInit {
|
|
439
449
|
header: boolean;
|
|
440
450
|
media: boolean;
|
|
441
451
|
link: boolean;
|
|
442
452
|
placeholder: string;
|
|
443
453
|
readonly: boolean;
|
|
454
|
+
/** Disabled state, set by Reactive Forms through `setDisabledState`. */
|
|
455
|
+
disabled: boolean;
|
|
444
456
|
editorRef: ElementRef<HTMLDivElement>;
|
|
445
457
|
private onChange;
|
|
446
458
|
private onTouch;
|
|
447
|
-
|
|
448
|
-
private
|
|
449
|
-
|
|
459
|
+
/** HTML received via `writeValue` before the view (and `editorRef`) is ready. */
|
|
460
|
+
private pendingValue;
|
|
461
|
+
private viewInitialized;
|
|
462
|
+
/** Last selection range observed inside the editor (restored before commands). */
|
|
463
|
+
private savedRange;
|
|
450
464
|
ngAfterViewInit(): void;
|
|
451
465
|
writeValue(value: string): void;
|
|
452
|
-
registerOnChange(fn:
|
|
453
|
-
registerOnTouched(fn:
|
|
466
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
467
|
+
registerOnTouched(fn: () => void): void;
|
|
468
|
+
setDisabledState(isDisabled: boolean): void;
|
|
454
469
|
onInput(): void;
|
|
455
470
|
onTouched(): void;
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
471
|
+
/** Remember the caret/selection whenever it sits inside the editor. */
|
|
472
|
+
saveSelection(): void;
|
|
473
|
+
applyInlineStyle(style: 'bold' | 'italic' | 'underline'): void;
|
|
474
|
+
applyBlockFormat(block: 'h1' | 'h2' | 'p'): void;
|
|
475
|
+
applyList(listType: 'ul' | 'ol'): void;
|
|
476
|
+
indent(): void;
|
|
477
|
+
outdent(): void;
|
|
478
|
+
setAlignment(alignment: 'left' | 'center' | 'right' | 'justify'): void;
|
|
461
479
|
applyColor(event: Event): void;
|
|
462
480
|
applyHighlight(event: Event): void;
|
|
463
|
-
applyBlockFormat(blockTag: 'h1' | 'h2' | 'p'): void;
|
|
464
|
-
private findBlockAncestor;
|
|
465
|
-
private isBlockElement;
|
|
466
|
-
applyList(listType: 'ul' | 'ol'): void;
|
|
467
|
-
private splitContentByLine;
|
|
468
481
|
createLink(): void;
|
|
469
482
|
insertImage(): void;
|
|
470
|
-
setAlignment(alignment: 'left' | 'center' | 'right' | 'justify'): void;
|
|
471
|
-
clearFormatting(): void;
|
|
472
|
-
saveState(): void;
|
|
473
483
|
undo(): void;
|
|
474
484
|
redo(): void;
|
|
485
|
+
clearFormatting(): void;
|
|
486
|
+
/**
|
|
487
|
+
* Focus the editor, restore the last selection, run a rich-text command and
|
|
488
|
+
* propagate the resulting HTML. No-op while readonly/disabled.
|
|
489
|
+
*/
|
|
490
|
+
private exec;
|
|
491
|
+
private restoreSelection;
|
|
475
492
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextEditor, never>;
|
|
476
493
|
static ɵcmp: i0.ɵɵComponentDeclaration<TextEditor, "app-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>;
|
|
477
494
|
}
|
package/package.json
CHANGED
|
@@ -206,6 +206,16 @@
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
+
&.calendar.disabled {
|
|
210
|
+
.form-control {
|
|
211
|
+
cursor: not-allowed;
|
|
212
|
+
user-select: none;
|
|
213
|
+
background: #e7e7e7;
|
|
214
|
+
}
|
|
215
|
+
.calendar-icon i {
|
|
216
|
+
color: #b0b0b0;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
209
219
|
&.input-placeholder {
|
|
210
220
|
.form-control {
|
|
211
221
|
&::placeholder {
|