adb-shared 6.2.25 → 6.2.26
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/adb-shared.mjs
CHANGED
|
@@ -1874,10 +1874,13 @@ class AdbRichEditorComponent {
|
|
|
1874
1874
|
hasTaxon = false;
|
|
1875
1875
|
hasReference = false;
|
|
1876
1876
|
rows = 3;
|
|
1877
|
+
label = 'Set label';
|
|
1878
|
+
id;
|
|
1877
1879
|
constructor(el) {
|
|
1878
1880
|
this.el = el;
|
|
1879
1881
|
}
|
|
1880
1882
|
getTextarea() {
|
|
1883
|
+
this.id = this.getId();
|
|
1881
1884
|
return this.el.nativeElement.querySelector('textarea');
|
|
1882
1885
|
}
|
|
1883
1886
|
onDoubleClick() {
|
|
@@ -2002,15 +2005,18 @@ class AdbRichEditorComponent {
|
|
|
2002
2005
|
this.text = value;
|
|
2003
2006
|
this.onChange(this.text);
|
|
2004
2007
|
}
|
|
2008
|
+
getId() {
|
|
2009
|
+
return '' + Math.floor(Math.random() * Date.now());
|
|
2010
|
+
}
|
|
2005
2011
|
ngOnDestroy() { }
|
|
2006
2012
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: AdbRichEditorComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2007
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: AdbRichEditorComponent, isStandalone: false, selector: "adb-rich-editor", inputs: { hasTaxon: "hasTaxon", hasReference: "hasReference", rows: "rows" }, providers: [
|
|
2013
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: AdbRichEditorComponent, isStandalone: false, selector: "adb-rich-editor", inputs: { hasTaxon: "hasTaxon", hasReference: "hasReference", rows: "rows", label: "label" }, providers: [
|
|
2008
2014
|
{
|
|
2009
2015
|
provide: NG_VALUE_ACCESSOR,
|
|
2010
2016
|
useExisting: forwardRef(() => AdbRichEditorComponent),
|
|
2011
2017
|
multi: true
|
|
2012
2018
|
}
|
|
2013
|
-
], ngImport: i0, template: "<div>\r\n <div class=\"d-flex justify-content-end gap-3 mb-1\">\r\n <button class=\"btn btn-secondary\" (click)=\"onItalicClick()\" title=\"Italic\" aria-label=\"Italic\" type=\"button\"><span class=\"fas fa-italic\"></span></button>\r\n <button class=\"btn btn-secondary\" (click)=\"onBoldClick()\" title=\"Italic\" aria-label=\"strong\" type=\"button\"><span class=\"fas fa-bold\"></span></button>\r\n @if (hasTaxon) {\r\n <button class=\"btn btn-secondary\" (click)=\"onTaxonClick()\" title=\"Taxon\" aria-label=\"Taxon\" type=\"button\"><span class=\"fas fa-bug\"></span></button>\r\n }\r\n @if (hasReference) {\r\n <button class=\"btn btn-secondary\" (click)=\"onReferenceClick()\" title=\"Reference\" aria-label=\"Reference\" type=\"button\"><span class=\"fas fa-asterisk\"></span></button>\r\n }\r\n </div>\r\n <textarea class=\"form-control\" [(ngModel)]=\"text\" (ngModelChange)=\"onTextChange()\" [rows]=\"rows\" (dblclick)=\"onDoubleClick()\"></textarea>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
2019
|
+
], ngImport: i0, template: "<div>\r\n <div class=\"d-flex justify-content-end align-items-end gap-3 mb-1\">\r\n <label class=\"me-auto\" [for]=\"id\">{{label|translate}}</label>\r\n <button class=\"btn btn-sm btn-secondary\" (click)=\"onItalicClick()\" title=\"Italic\" aria-label=\"Italic\" type=\"button\"><span class=\"fas fa-italic\"></span></button>\r\n <button class=\"btn btn-sm btn-secondary\" (click)=\"onBoldClick()\" title=\"Italic\" aria-label=\"strong\" type=\"button\"><span class=\"fas fa-bold\"></span></button>\r\n @if (hasTaxon) {\r\n <button class=\"btn btn-sm btn-secondary\" (click)=\"onTaxonClick()\" title=\"Taxon\" aria-label=\"Taxon\" type=\"button\"><span class=\"fas fa-bug\"></span></button>\r\n }\r\n @if (hasReference) {\r\n <button class=\"btn btn-sm btn-secondary\" (click)=\"onReferenceClick()\" title=\"Reference\" aria-label=\"Reference\" type=\"button\"><span class=\"fas fa-asterisk\"></span></button>\r\n }\r\n </div>\r\n <textarea [id]=\"id\" class=\"form-control\" [(ngModel)]=\"text\" (ngModelChange)=\"onTextChange()\" [rows]=\"rows\" (dblclick)=\"onDoubleClick()\"></textarea>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i1$4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
2014
2020
|
}
|
|
2015
2021
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: AdbRichEditorComponent, decorators: [{
|
|
2016
2022
|
type: Component,
|
|
@@ -2020,13 +2026,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
2020
2026
|
useExisting: forwardRef(() => AdbRichEditorComponent),
|
|
2021
2027
|
multi: true
|
|
2022
2028
|
}
|
|
2023
|
-
], standalone: false, template: "<div>\r\n <div class=\"d-flex justify-content-end gap-3 mb-1\">\r\n <button class=\"btn btn-secondary\" (click)=\"onItalicClick()\" title=\"Italic\" aria-label=\"Italic\" type=\"button\"><span class=\"fas fa-italic\"></span></button>\r\n <button class=\"btn btn-secondary\" (click)=\"onBoldClick()\" title=\"Italic\" aria-label=\"strong\" type=\"button\"><span class=\"fas fa-bold\"></span></button>\r\n @if (hasTaxon) {\r\n <button class=\"btn btn-secondary\" (click)=\"onTaxonClick()\" title=\"Taxon\" aria-label=\"Taxon\" type=\"button\"><span class=\"fas fa-bug\"></span></button>\r\n }\r\n @if (hasReference) {\r\n <button class=\"btn btn-secondary\" (click)=\"onReferenceClick()\" title=\"Reference\" aria-label=\"Reference\" type=\"button\"><span class=\"fas fa-asterisk\"></span></button>\r\n }\r\n </div>\r\n <textarea class=\"form-control\" [(ngModel)]=\"text\" (ngModelChange)=\"onTextChange()\" [rows]=\"rows\" (dblclick)=\"onDoubleClick()\"></textarea>\r\n</div>\r\n" }]
|
|
2029
|
+
], standalone: false, template: "<div>\r\n <div class=\"d-flex justify-content-end align-items-end gap-3 mb-1\">\r\n <label class=\"me-auto\" [for]=\"id\">{{label|translate}}</label>\r\n <button class=\"btn btn-sm btn-secondary\" (click)=\"onItalicClick()\" title=\"Italic\" aria-label=\"Italic\" type=\"button\"><span class=\"fas fa-italic\"></span></button>\r\n <button class=\"btn btn-sm btn-secondary\" (click)=\"onBoldClick()\" title=\"Italic\" aria-label=\"strong\" type=\"button\"><span class=\"fas fa-bold\"></span></button>\r\n @if (hasTaxon) {\r\n <button class=\"btn btn-sm btn-secondary\" (click)=\"onTaxonClick()\" title=\"Taxon\" aria-label=\"Taxon\" type=\"button\"><span class=\"fas fa-bug\"></span></button>\r\n }\r\n @if (hasReference) {\r\n <button class=\"btn btn-sm btn-secondary\" (click)=\"onReferenceClick()\" title=\"Reference\" aria-label=\"Reference\" type=\"button\"><span class=\"fas fa-asterisk\"></span></button>\r\n }\r\n </div>\r\n <textarea [id]=\"id\" class=\"form-control\" [(ngModel)]=\"text\" (ngModelChange)=\"onTextChange()\" [rows]=\"rows\" (dblclick)=\"onDoubleClick()\"></textarea>\r\n</div>\r\n" }]
|
|
2024
2030
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { hasTaxon: [{
|
|
2025
2031
|
type: Input
|
|
2026
2032
|
}], hasReference: [{
|
|
2027
2033
|
type: Input
|
|
2028
2034
|
}], rows: [{
|
|
2029
2035
|
type: Input
|
|
2036
|
+
}], label: [{
|
|
2037
|
+
type: Input
|
|
2030
2038
|
}] } });
|
|
2031
2039
|
|
|
2032
2040
|
const RICH_MODULE_CONFIG = new InjectionToken('richModule.config');
|
|
@@ -2134,13 +2142,13 @@ class AdbRichEditorModule {
|
|
|
2134
2142
|
};
|
|
2135
2143
|
}
|
|
2136
2144
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: AdbRichEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2137
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type: AdbRichEditorModule, declarations: [AdbRichEditorComponent, RichTextComponent], imports: [CommonModule, FormsModule], exports: [AdbRichEditorComponent, RichTextComponent] });
|
|
2138
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: AdbRichEditorModule, imports: [CommonModule, FormsModule] });
|
|
2145
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type: AdbRichEditorModule, declarations: [AdbRichEditorComponent, RichTextComponent], imports: [CommonModule, FormsModule, i1$1.TranslateModule], exports: [AdbRichEditorComponent, RichTextComponent] });
|
|
2146
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: AdbRichEditorModule, imports: [CommonModule, FormsModule, TranslateModule.forChild()] });
|
|
2139
2147
|
}
|
|
2140
2148
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: AdbRichEditorModule, decorators: [{
|
|
2141
2149
|
type: NgModule,
|
|
2142
2150
|
args: [{
|
|
2143
|
-
imports: [CommonModule, FormsModule],
|
|
2151
|
+
imports: [CommonModule, FormsModule, TranslateModule.forChild()],
|
|
2144
2152
|
declarations: [AdbRichEditorComponent, RichTextComponent],
|
|
2145
2153
|
exports: [AdbRichEditorComponent, RichTextComponent]
|
|
2146
2154
|
}]
|