@bnsights/bbsf-controls 1.2.24 → 1.2.25
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/README.md +35 -11
- package/fesm2022/bnsights-bbsf-controls.mjs +384 -202
- package/fesm2022/bnsights-bbsf-controls.mjs.map +1 -1
- package/lib/controls/MarkdownEditor/markdown-editor.component.d.ts +56 -64
- package/lib/modules/bbsf-editors.module.d.ts +7 -9
- package/package.json +34 -6
- package/src/lib/assets/Style.scss +7 -7
- package/src/lib/assets/ace-builds/ace.js +0 -23
- package/src/lib/assets/ace-builds/mode-markdown.js +0 -8
- package/src/lib/assets/ngx-markdown-editor/highlight.js/agate.min.css +0 -17
- package/src/lib/assets/ngx-markdown-editor/highlight.js/highlight.min.js +0 -2
- package/src/lib/assets/ngx-markdown-editor/marked.min.js +0 -6
|
@@ -1,84 +1,68 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { AbstractControl, ControlContainer, FormGroup, FormGroupDirective } from '@angular/forms';
|
|
3
|
-
import { MdEditorOption } from "ngx-markdown-editor";
|
|
4
|
-
import { MarkdownEditorOptions } from '../../Shared/Models/MarkdownEditorOptions';
|
|
5
3
|
import { ControlValidationService, UtilityService } from '@bnsights/bbsf-utilities/ui';
|
|
6
|
-
import {
|
|
4
|
+
import { Editor } from '@tiptap/core';
|
|
5
|
+
import { MarkdownEditorOptions } from '../../Shared/Models/MarkdownEditorOptions';
|
|
7
6
|
import { GlobalSettings } from '../../Shared/services/GlobalSettings.service';
|
|
8
7
|
import { ControlUtility } from '../../Shared/services/ControlUtility';
|
|
9
|
-
import { ScriptService } from 'ngx-script-loader';
|
|
10
8
|
import * as i0 from "@angular/core";
|
|
11
|
-
export
|
|
9
|
+
export type MarkdownToolbarItem = 'undo' | 'redo' | 'h1' | 'h2' | 'h3' | 'bold' | 'italic' | 'underline' | 'strike' | 'code' | 'bulletList' | 'orderedList' | 'taskList' | 'blockquote' | 'codeBlock' | 'horizontalRule' | 'table' | 'link' | '|';
|
|
10
|
+
export declare class MarkdownEditorComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
12
11
|
utilityService: UtilityService;
|
|
13
12
|
private globalSettings;
|
|
14
13
|
private controlValidationService;
|
|
15
14
|
private controlUtility;
|
|
16
15
|
markdownEditorControlHost: FormGroupDirective;
|
|
17
|
-
private
|
|
16
|
+
private cdr;
|
|
18
17
|
private controlContainer;
|
|
19
18
|
group: FormGroup;
|
|
20
19
|
options: MarkdownEditorOptions;
|
|
21
|
-
OnChange: EventEmitter<
|
|
20
|
+
OnChange: EventEmitter<string>;
|
|
21
|
+
editorBody: ElementRef<HTMLElement>;
|
|
22
22
|
static controlContainerstatic: any;
|
|
23
23
|
markdownEditorFormControl: AbstractControl;
|
|
24
|
-
editorOptions: MdEditorOption;
|
|
25
|
-
mode: string;
|
|
26
|
-
hideToolbar: boolean;
|
|
27
|
-
currentLocale: string;
|
|
28
24
|
validationRules: any[];
|
|
29
25
|
validationRulesasync: any[];
|
|
30
26
|
markAllAsTouched: boolean;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Link: {
|
|
47
|
-
title: string;
|
|
48
|
-
};
|
|
49
|
-
Image: {
|
|
50
|
-
title: string;
|
|
51
|
-
};
|
|
52
|
-
UnorderedList: {
|
|
53
|
-
title: string;
|
|
54
|
-
};
|
|
55
|
-
OrderedList: {
|
|
56
|
-
title: string;
|
|
57
|
-
};
|
|
58
|
-
CodeBlock: {
|
|
59
|
-
title: string;
|
|
60
|
-
};
|
|
61
|
-
ShowPreview: {
|
|
62
|
-
title: string;
|
|
63
|
-
};
|
|
64
|
-
HidePreview: {
|
|
65
|
-
title: string;
|
|
66
|
-
};
|
|
67
|
-
Fullscreen: {
|
|
68
|
-
title: string;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
Upload: {
|
|
72
|
-
Drag: string;
|
|
73
|
-
Uploading: string;
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
locales: MdEditorLocaleOptions;
|
|
77
|
-
constructor(utilityService: UtilityService, globalSettings: GlobalSettings, controlValidationService: ControlValidationService, controlUtility: ControlUtility, markdownEditorControlHost: FormGroupDirective, scriptService: ScriptService, controlContainer: ControlContainer);
|
|
78
|
-
private loadAllScripts;
|
|
27
|
+
activeStates: import("@angular/core").WritableSignal<Record<string, boolean>>;
|
|
28
|
+
canUndo: import("@angular/core").WritableSignal<boolean>;
|
|
29
|
+
canRedo: import("@angular/core").WritableSignal<boolean>;
|
|
30
|
+
showLinkPopover: import("@angular/core").WritableSignal<boolean>;
|
|
31
|
+
linkInputValue: import("@angular/core").WritableSignal<string>;
|
|
32
|
+
showTablePopover: import("@angular/core").WritableSignal<boolean>;
|
|
33
|
+
characters: import("@angular/core").WritableSignal<number>;
|
|
34
|
+
words: import("@angular/core").WritableSignal<number>;
|
|
35
|
+
isOverLimit: import("@angular/core").Signal<boolean>;
|
|
36
|
+
toolbarItems: MarkdownToolbarItem[];
|
|
37
|
+
tableMenuGroups: readonly (readonly string[])[];
|
|
38
|
+
editor: Editor;
|
|
39
|
+
private valueChangesSubscription?;
|
|
40
|
+
private submitSubscription?;
|
|
41
|
+
constructor(utilityService: UtilityService, globalSettings: GlobalSettings, controlValidationService: ControlValidationService, controlUtility: ControlUtility, markdownEditorControlHost: FormGroupDirective, cdr: ChangeDetectorRef, controlContainer: ControlContainer);
|
|
79
42
|
ngOnInit(): void;
|
|
80
|
-
|
|
81
|
-
|
|
43
|
+
ngAfterViewInit(): void;
|
|
44
|
+
ngOnDestroy(): void;
|
|
45
|
+
button(id: MarkdownToolbarItem): {
|
|
46
|
+
icon: string;
|
|
47
|
+
label: string;
|
|
48
|
+
} | null;
|
|
49
|
+
textLabel(id: MarkdownToolbarItem): string | null;
|
|
50
|
+
run(id: MarkdownToolbarItem): void;
|
|
51
|
+
isActive(id: MarkdownToolbarItem): boolean;
|
|
52
|
+
disabled(id: MarkdownToolbarItem): boolean;
|
|
53
|
+
openLinkPopover(): void;
|
|
54
|
+
onLinkInput(value: string): void;
|
|
55
|
+
commitLink(): void;
|
|
56
|
+
cancelLink(): void;
|
|
57
|
+
onLinkKeydown(event: KeyboardEvent): void;
|
|
58
|
+
inTable(): boolean;
|
|
59
|
+
toggleTablePopover(): void;
|
|
60
|
+
insertTable(): void;
|
|
61
|
+
tableOpMeta(id: string): {
|
|
62
|
+
icon: string;
|
|
63
|
+
label: string;
|
|
64
|
+
};
|
|
65
|
+
tableOp(id: string): void;
|
|
82
66
|
resetError: () => void;
|
|
83
67
|
showGlobalError(): void;
|
|
84
68
|
getErrorValidation(ErrorList: any): string;
|
|
@@ -87,8 +71,16 @@ export declare class MarkdownEditorComponent implements OnInit {
|
|
|
87
71
|
removeCustomValidation: (customValidation: any) => void;
|
|
88
72
|
addCustomValidation: (customValidation: any) => void;
|
|
89
73
|
isValid: () => void;
|
|
90
|
-
|
|
91
|
-
|
|
74
|
+
get editorHeight(): string;
|
|
75
|
+
get maxLength(): number | null;
|
|
76
|
+
private initializeOptions;
|
|
77
|
+
private initializeControl;
|
|
78
|
+
private initializeEditor;
|
|
79
|
+
private subscribeToControlChanges;
|
|
80
|
+
private subscribeToSubmit;
|
|
81
|
+
private refreshState;
|
|
82
|
+
private buildToolbarItems;
|
|
83
|
+
private isReadonly;
|
|
92
84
|
static ɵfac: i0.ɵɵFactoryDeclaration<MarkdownEditorComponent, [null, null, null, null, null, null, { optional: true; }]>;
|
|
93
85
|
static ɵcmp: i0.ɵɵComponentDeclaration<MarkdownEditorComponent, "BBSF-MarkdownEditor", never, { "group": { "alias": "group"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "OnChange": "OnChange"; }, never, never, true, never>;
|
|
94
86
|
}
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "@angular/common";
|
|
3
3
|
import * as i2 from "@angular/forms";
|
|
4
|
-
import * as i3 from "
|
|
5
|
-
import * as i4 from "
|
|
6
|
-
import * as i5 from "../controls/
|
|
7
|
-
import * as i6 from "../controls/
|
|
8
|
-
import * as i7 from "../controls/MultiLingualHtmlEditor/MultiLingualHtmlEditor.component";
|
|
4
|
+
import * as i3 from "@bnsights/bbsf-utilities";
|
|
5
|
+
import * as i4 from "../controls/HtmlEditor/HtmlEditor.component";
|
|
6
|
+
import * as i5 from "../controls/MarkdownEditor/markdown-editor.component";
|
|
7
|
+
import * as i6 from "../controls/MultiLingualHtmlEditor/MultiLingualHtmlEditor.component";
|
|
9
8
|
/**
|
|
10
9
|
* BBSF Editors Module
|
|
11
10
|
*
|
|
12
11
|
* Contains rich text editor controls (~800 KB gzipped):
|
|
13
12
|
* - HtmlEditorComponent: WYSIWYG HTML editor
|
|
14
|
-
* - MarkdownEditorComponent:
|
|
13
|
+
* - MarkdownEditorComponent: Tiptap-powered markdown editor
|
|
15
14
|
* - MultiLingualHtmlEditorComponent: HTML editor with multilingual support
|
|
16
15
|
*
|
|
17
16
|
* Dependencies:
|
|
18
17
|
* - @kolkov/angular-editor (~300 KB)
|
|
19
|
-
* -
|
|
20
|
-
* - ngx-script-loader
|
|
18
|
+
* - Tiptap
|
|
21
19
|
*
|
|
22
20
|
* @example New way (Recommended):
|
|
23
21
|
* ```typescript
|
|
@@ -41,6 +39,6 @@ import * as i7 from "../controls/MultiLingualHtmlEditor/MultiLingualHtmlEditor.c
|
|
|
41
39
|
*/
|
|
42
40
|
export declare class BBSFEditorsModule {
|
|
43
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<BBSFEditorsModule, never>;
|
|
44
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<BBSFEditorsModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.
|
|
42
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<BBSFEditorsModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.BBSFUtilitiesModule, typeof i4.HtmlEditorComponent, typeof i5.MarkdownEditorComponent, typeof i6.MultiLingualHtmlEditorComponent], [typeof i4.HtmlEditorComponent, typeof i5.MarkdownEditorComponent, typeof i6.MultiLingualHtmlEditorComponent]>;
|
|
45
43
|
static ɵinj: i0.ɵɵInjectorDeclaration<BBSFEditorsModule>;
|
|
46
44
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bnsights/bbsf-controls",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.25",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/animations": "^19.2.14",
|
|
6
6
|
"@angular/cdk": "^19.2.19",
|
|
@@ -27,9 +27,18 @@
|
|
|
27
27
|
"@ngrx/store": "19.2.1",
|
|
28
28
|
"@ngrx/store-devtools": "19.2.1",
|
|
29
29
|
"@sweetalert2/ngx-sweetalert2": "11.0.0",
|
|
30
|
+
"@tiptap/core": "^3.25.0",
|
|
31
|
+
"@tiptap/extension-character-count": "^3.25.0",
|
|
32
|
+
"@tiptap/extension-table": "^3.25.0",
|
|
33
|
+
"@tiptap/extension-task-item": "^3.25.0",
|
|
34
|
+
"@tiptap/extension-task-list": "^3.25.0",
|
|
35
|
+
"@tiptap/extension-typography": "^3.25.0",
|
|
36
|
+
"@tiptap/extension-underline": "^3.25.0",
|
|
37
|
+
"@tiptap/markdown": "^3.25.0",
|
|
38
|
+
"@tiptap/pm": "^3.25.0",
|
|
39
|
+
"@tiptap/starter-kit": "^3.25.0",
|
|
30
40
|
"@types/file-saver": "2.0.7",
|
|
31
41
|
"@types/google.maps": "3.54.10",
|
|
32
|
-
"ace-builds": "1.43.4",
|
|
33
42
|
"angular-cropperjs": "14.0.1",
|
|
34
43
|
"angular-ng-autocomplete": "2.0.12",
|
|
35
44
|
"bootstrap": "5.3.8",
|
|
@@ -45,16 +54,29 @@
|
|
|
45
54
|
"ngx-dropzone": "3.1.0",
|
|
46
55
|
"ngx-infinite-scroll": "19.0.0",
|
|
47
56
|
"ngx-intl-tel-input": "17.0.0",
|
|
48
|
-
"ngx-markdown-editor": "5.3.4",
|
|
49
57
|
"ngx-mask": "17.1.8",
|
|
50
58
|
"ngx-script-loader": "3.0.0",
|
|
59
|
+
"primeicons": "^7.0.0",
|
|
51
60
|
"summernote": "0.9.1",
|
|
52
61
|
"sweetalert2": "11.10.1",
|
|
53
62
|
"tslib": "2.6.2"
|
|
54
63
|
},
|
|
55
|
-
"module": "fesm2022/bnsights-bbsf-controls.mjs",
|
|
56
|
-
"typings": "index.d.ts",
|
|
57
64
|
"exports": {
|
|
65
|
+
"./src/lib/assets/sass/*.scss": {
|
|
66
|
+
"sass": "./src/lib/assets/sass/*.scss",
|
|
67
|
+
"style": "./src/lib/assets/sass/*.scss",
|
|
68
|
+
"default": "./src/lib/assets/sass/*.scss"
|
|
69
|
+
},
|
|
70
|
+
"./src/lib/assets/sass/*": {
|
|
71
|
+
"sass": "./src/lib/assets/sass/*.scss",
|
|
72
|
+
"style": "./src/lib/assets/sass/*.scss",
|
|
73
|
+
"default": "./src/lib/assets/sass/*.scss"
|
|
74
|
+
},
|
|
75
|
+
"./src/lib/assets/*": {
|
|
76
|
+
"sass": "./src/lib/assets/*",
|
|
77
|
+
"style": "./src/lib/assets/*",
|
|
78
|
+
"default": "./src/lib/assets/*"
|
|
79
|
+
},
|
|
58
80
|
"./package.json": {
|
|
59
81
|
"default": "./package.json"
|
|
60
82
|
},
|
|
@@ -63,5 +85,11 @@
|
|
|
63
85
|
"default": "./fesm2022/bnsights-bbsf-controls.mjs"
|
|
64
86
|
}
|
|
65
87
|
},
|
|
66
|
-
"sideEffects":
|
|
88
|
+
"sideEffects": [
|
|
89
|
+
"**/*.css",
|
|
90
|
+
"**/*.scss",
|
|
91
|
+
"./src/lib/assets/**/*"
|
|
92
|
+
],
|
|
93
|
+
"module": "fesm2022/bnsights-bbsf-controls.mjs",
|
|
94
|
+
"typings": "index.d.ts"
|
|
67
95
|
}
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
@import "fontawesome/fontawesome.scss";
|
|
5
5
|
//toaster
|
|
6
6
|
@import 'ngx-toastr/toastr';
|
|
7
|
-
//phone
|
|
8
|
-
@import 'intl-tel-input/build/css/intlTelInput.css';
|
|
9
|
-
//
|
|
10
|
-
@import '
|
|
11
|
-
//datepicker
|
|
12
|
-
@import '@danielmoncada/angular-datetime-picker/assets/style/picker.min.css';
|
|
7
|
+
//phone
|
|
8
|
+
@import 'intl-tel-input/build/css/intlTelInput.css';
|
|
9
|
+
//icons
|
|
10
|
+
@import 'primeicons/primeicons.css';
|
|
11
|
+
//datepicker
|
|
12
|
+
@import '@danielmoncada/angular-datetime-picker/assets/style/picker.min.css';
|
|
13
13
|
//custom
|
|
14
14
|
@import"sass/base.scss";
|
|
15
15
|
@import"sass/textarea.scss";
|
|
@@ -26,4 +26,4 @@
|
|
|
26
26
|
@import"sass/phone.scss";
|
|
27
27
|
@import"sass/radio-button.scss";
|
|
28
28
|
@import"sass/file-upload.scss";
|
|
29
|
-
@import"sass/markdown.scss";
|
|
29
|
+
@import"sass/markdown.scss";
|