@covalent/text-editor 4.0.0 → 4.1.0-develop.2

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.
@@ -0,0 +1,188 @@
1
+ import * as i0 from '@angular/core';
2
+ import { forwardRef, Component, ViewChild, Input, NgModule } from '@angular/core';
3
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
+ import * as EasyMDE from 'easymde';
5
+ import * as marked from 'marked';
6
+ import { CommonModule } from '@angular/common';
7
+
8
+ const noop = () => {
9
+ // empty method
10
+ };
11
+ class TdTextEditorComponent {
12
+ constructor(_zone) {
13
+ this._zone = _zone;
14
+ this._value = '';
15
+ this._fromEditor = false;
16
+ this.options = {};
17
+ /* tslint:disable-next-line */
18
+ this.propagateChange = (_) => noop;
19
+ this.onTouched = () => noop;
20
+ }
21
+ /**
22
+ * value?: string
23
+ * Value in the Editor after async getEditorContent was called
24
+ */
25
+ set value(value) {
26
+ this._value = value;
27
+ if (this._easyMDE) {
28
+ if (!this._fromEditor) {
29
+ this._easyMDE.value(value);
30
+ }
31
+ this.propagateChange(this._value);
32
+ this._fromEditor = false;
33
+ this._zone.run(() => (this._value = value));
34
+ }
35
+ }
36
+ get value() {
37
+ return this._value;
38
+ }
39
+ get easyMDE() {
40
+ return this._easyMDE;
41
+ }
42
+ /**
43
+ * Implemented as part of ControlValueAccessor.
44
+ */
45
+ writeValue(value) {
46
+ this.value = !value ? '' : value;
47
+ }
48
+ registerOnChange(fn) {
49
+ this.propagateChange = fn;
50
+ }
51
+ registerOnTouched(fn) {
52
+ this.onTouched = fn;
53
+ }
54
+ ngAfterViewInit() {
55
+ this.options.element = this.textarea.nativeElement;
56
+ // If content entered is html then don't evaluate it, prevent xss vulnerabilities
57
+ marked.marked.setOptions({ sanitize: true });
58
+ this._easyMDE = new EasyMDE(this.options);
59
+ this._easyMDE.value(this.value);
60
+ this._easyMDE.codemirror.on('change', () => {
61
+ this._fromEditor = true;
62
+ this.writeValue(this._easyMDE.value());
63
+ });
64
+ }
65
+ /* Wrapped function provided by EasyMDE */
66
+ isPreviewActive() {
67
+ return this._easyMDE.isPreviewActive();
68
+ }
69
+ isSideBySideActive() {
70
+ return this._easyMDE.isSideBySideActive();
71
+ }
72
+ isFullscreenActive() {
73
+ return this._easyMDE.isFullscreenActive();
74
+ }
75
+ clearAutosavedValue() {
76
+ this._easyMDE.clearAutosavedValue();
77
+ }
78
+ toTextArea() {
79
+ this._easyMDE.toTextArea();
80
+ }
81
+ toggleBold() {
82
+ this._easyMDE.toggleBold();
83
+ }
84
+ toggleItalic() {
85
+ this._easyMDE.toggleItalic();
86
+ }
87
+ toggleStrikethrough() {
88
+ this._easyMDE.toggleStrikethrough();
89
+ }
90
+ toggleHeadingSmaller() {
91
+ this._easyMDE.toggleHeadingSmaller();
92
+ }
93
+ toggleHeadingBigger() {
94
+ this._easyMDE.toggleHeadingBigger();
95
+ }
96
+ toggleHeading1() {
97
+ this._easyMDE.toggleHeading1();
98
+ }
99
+ toggleHeading2() {
100
+ this._easyMDE.toggleHeading2();
101
+ }
102
+ toggleHeading3() {
103
+ this._easyMDE.toggleHeading3();
104
+ }
105
+ toggleCodeBlock() {
106
+ this._easyMDE.toggleCodeBlock();
107
+ }
108
+ toggleBlockquote() {
109
+ this._easyMDE.toggleBlockquote();
110
+ }
111
+ toggleUnorderedList() {
112
+ this._easyMDE.toggleUnorderedList();
113
+ }
114
+ toggleOrderedList() {
115
+ this._easyMDE.toggleOrderedList();
116
+ }
117
+ cleanBlock() {
118
+ this._easyMDE.cleanBlock();
119
+ }
120
+ drawLink() {
121
+ this._easyMDE.drawLink();
122
+ }
123
+ drawImage() {
124
+ this._easyMDE.drawImage();
125
+ }
126
+ drawTable() {
127
+ this._easyMDE.drawTable();
128
+ }
129
+ drawHorizontalRule() {
130
+ this._easyMDE.drawHorizontalRule();
131
+ }
132
+ togglePreview() {
133
+ this._easyMDE.togglePreview();
134
+ }
135
+ toggleSideBySide() {
136
+ this._easyMDE.toggleSideBySide();
137
+ }
138
+ toggleFullScreen() {
139
+ this._easyMDE.toggleFullScreen();
140
+ }
141
+ }
142
+ TdTextEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdTextEditorComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
143
+ TdTextEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.2", type: TdTextEditorComponent, selector: "td-text-editor", inputs: { options: "options", value: "value" }, providers: [
144
+ {
145
+ provide: NG_VALUE_ACCESSOR,
146
+ useExisting: forwardRef(() => TdTextEditorComponent),
147
+ multi: true,
148
+ },
149
+ ], viewQueries: [{ propertyName: "textarea", first: true, predicate: ["easymde"], descendants: true, static: true }], ngImport: i0, template: "<div>\n <textarea #easymde></textarea>\n</div>\n", styles: ["@charset \"UTF-8\";:host ::ng-deep .CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}:host ::ng-deep .CodeMirror-lines{padding:4px 0}:host ::ng-deep .CodeMirror pre.CodeMirror-line,:host ::ng-deep .CodeMirror pre.CodeMirror-line-like{padding:0 4px}:host ::ng-deep .CodeMirror-gutter-filler,:host ::ng-deep .CodeMirror-scrollbar-filler{background-color:#fff}:host ::ng-deep .CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}:host ::ng-deep .CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}:host ::ng-deep .CodeMirror-guttermarker{color:#000}:host ::ng-deep .CodeMirror-guttermarker-subtle{color:#999}:host ::ng-deep .CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}:host ::ng-deep .CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}:host ::ng-deep .cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}:host ::ng-deep .cm-fat-cursor div.CodeMirror-cursors{z-index:1}:host ::ng-deep .cm-fat-cursor .CodeMirror-line::selection,:host ::ng-deep .cm-fat-cursor .CodeMirror-line>span::selection,:host ::ng-deep .cm-fat-cursor .CodeMirror-line>span>span::selection{background:0 0}:host ::ng-deep .cm-fat-cursor .CodeMirror-line::-moz-selection,:host ::ng-deep .cm-fat-cursor .CodeMirror-line>span::-moz-selection,:host ::ng-deep .cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:0 0}:host ::ng-deep .cm-fat-cursor{caret-color:transparent}@keyframes blink{50%{background-color:transparent}}:host ::ng-deep .cm-tab{display:inline-block;text-decoration:inherit}:host ::ng-deep .CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}:host ::ng-deep .CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}:host ::ng-deep .cm-s-default .cm-header{color:#00f}:host ::ng-deep .cm-s-default .cm-quote{color:#090}:host ::ng-deep .cm-negative{color:#d44}:host ::ng-deep .cm-positive{color:#292}:host ::ng-deep .cm-header,:host ::ng-deep .cm-strong{font-weight:700}:host ::ng-deep .cm-em{font-style:italic}:host ::ng-deep .cm-link{text-decoration:underline}:host ::ng-deep .cm-strikethrough{text-decoration:line-through}:host ::ng-deep .cm-s-default .cm-keyword{color:#708}:host ::ng-deep .cm-s-default .cm-atom{color:#219}:host ::ng-deep .cm-s-default .cm-number{color:#164}:host ::ng-deep .cm-s-default .cm-def{color:#00f}:host ::ng-deep .cm-s-default .cm-variable-2{color:#05a}:host ::ng-deep .cm-s-default .cm-type,:host ::ng-deep .cm-s-default .cm-variable-3{color:#085}:host ::ng-deep .cm-s-default .cm-comment{color:#a50}:host ::ng-deep .cm-s-default .cm-string{color:#a11}:host ::ng-deep .cm-s-default .cm-string-2{color:#f50}:host ::ng-deep .cm-s-default .cm-meta{color:#555}:host ::ng-deep .cm-s-default .cm-qualifier{color:#555}:host ::ng-deep .cm-s-default .cm-builtin{color:#30a}:host ::ng-deep .cm-s-default .cm-bracket{color:#997}:host ::ng-deep .cm-s-default .cm-tag{color:#170}:host ::ng-deep .cm-s-default .cm-attribute{color:#00c}:host ::ng-deep .cm-s-default .cm-hr{color:#999}:host ::ng-deep .cm-s-default .cm-link{color:#00c}:host ::ng-deep .cm-s-default .cm-error{color:red}:host ::ng-deep .cm-invalidchar{color:red}:host ::ng-deep .CodeMirror-composing{border-bottom:2px solid}:host ::ng-deep div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}:host ::ng-deep div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}:host ::ng-deep .CodeMirror-matchingtag{background:rgba(255,150,0,.3)}:host ::ng-deep .CodeMirror-activeline-background{background:#e8f2ff}:host ::ng-deep .CodeMirror{position:relative;overflow:hidden;background:#fff}:host ::ng-deep .CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:0;position:relative}:host ::ng-deep .CodeMirror-sizer{position:relative;border-right:50px solid transparent}:host ::ng-deep .CodeMirror-gutter-filler,:host ::ng-deep .CodeMirror-hscrollbar,:host ::ng-deep .CodeMirror-scrollbar-filler,:host ::ng-deep .CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:0}:host ::ng-deep .CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}:host ::ng-deep .CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}:host ::ng-deep .CodeMirror-scrollbar-filler{right:0;bottom:0}:host ::ng-deep .CodeMirror-gutter-filler{left:0;bottom:0}:host ::ng-deep .CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}:host ::ng-deep .CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}:host ::ng-deep .CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important}:host ::ng-deep .CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}:host ::ng-deep .CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}:host ::ng-deep .CodeMirror-gutter-wrapper ::selection{background-color:transparent}:host ::ng-deep .CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}:host ::ng-deep .CodeMirror-lines{cursor:text;min-height:1px}:host ::ng-deep .CodeMirror pre.CodeMirror-line,:host ::ng-deep .CodeMirror pre.CodeMirror-line-like{border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-feature-settings:\"calt\";font-variant-ligatures:contextual}:host ::ng-deep .CodeMirror-wrap pre.CodeMirror-line,:host ::ng-deep .CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}:host ::ng-deep .CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}:host ::ng-deep .CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}:host ::ng-deep .CodeMirror-code{outline:0}:host ::ng-deep .CodeMirror-gutter,:host ::ng-deep .CodeMirror-gutters,:host ::ng-deep .CodeMirror-linenumber,:host ::ng-deep .CodeMirror-scroll,:host ::ng-deep .CodeMirror-sizer{box-sizing:content-box}:host ::ng-deep .CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}:host ::ng-deep .CodeMirror-cursor{position:absolute;pointer-events:none}:host ::ng-deep .CodeMirror-measure pre{position:static}:host ::ng-deep div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}:host ::ng-deep div.CodeMirror-dragcursors{visibility:visible}:host ::ng-deep .CodeMirror-focused div.CodeMirror-cursors{visibility:visible}:host ::ng-deep .CodeMirror-selected{background:#d9d9d9}:host ::ng-deep .CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}:host ::ng-deep .CodeMirror-crosshair{cursor:crosshair}:host ::ng-deep .CodeMirror-line::selection,:host ::ng-deep .CodeMirror-line>span::selection,:host ::ng-deep .CodeMirror-line>span>span::selection{background:#d7d4f0}:host ::ng-deep .CodeMirror-line::-moz-selection,:host ::ng-deep .CodeMirror-line>span::-moz-selection,:host ::ng-deep .CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}:host ::ng-deep .cm-searching{background-color:#ffa;background-color:#ff06}:host ::ng-deep .cm-force-border{padding-right:.1px}@media print{:host ::ng-deep .CodeMirror div.CodeMirror-cursors{visibility:hidden}}:host ::ng-deep .cm-tab-wrap-hack:after{content:\"\"}:host ::ng-deep span.CodeMirror-selectedtext{background:0 0}:host ::ng-deep .EasyMDEContainer{display:block}:host ::ng-deep .CodeMirror-rtl pre{direction:rtl}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen{display:flex;flex-direction:row;flex-wrap:wrap}:host ::ng-deep .EasyMDEContainer .CodeMirror{box-sizing:border-box;height:auto;border:1px solid #ddd;border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:10px;font:inherit;z-index:0;word-wrap:break-word}:host ::ng-deep .EasyMDEContainer .CodeMirror-scroll{cursor:text}:host ::ng-deep .EasyMDEContainer .CodeMirror-fullscreen{background:#fff;position:fixed!important;top:50px;left:0;right:0;bottom:0;height:auto;z-index:8;border-right:none!important;border-bottom-right-radius:0!important}:host ::ng-deep .EasyMDEContainer .CodeMirror-sided{width:50%!important}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen .CodeMirror-sided{border-right:none!important;border-bottom-right-radius:0;position:relative;flex:1 1 auto}:host ::ng-deep .EasyMDEContainer .CodeMirror-placeholder{opacity:.5}:host ::ng-deep .EasyMDEContainer .CodeMirror-focused .CodeMirror-selected{background:#d9d9d9}:host ::ng-deep .editor-toolbar{position:relative;-webkit-user-select:none;-o-user-select:none;user-select:none;padding:9px 10px;border-top:1px solid #bbb;border-left:1px solid #bbb;border-right:1px solid #bbb;border-top-left-radius:4px;border-top-right-radius:4px}:host ::ng-deep .editor-toolbar.fullscreen{width:100%;height:50px;padding-top:10px;padding-bottom:10px;box-sizing:border-box;background:#fff;border:0;position:fixed;top:0;left:0;opacity:1;z-index:9}:host ::ng-deep .editor-toolbar.fullscreen:before{width:20px;height:50px;background:linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);position:fixed;top:0;left:0;margin:0;padding:0}:host ::ng-deep .editor-toolbar.fullscreen:after{width:20px;height:50px;background:linear-gradient(to right,rgba(255,255,255,0) 0,#fff 100%);position:fixed;top:0;right:0;margin:0;padding:0}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen .editor-toolbar{width:100%}:host ::ng-deep .editor-toolbar .easymde-dropdown,:host ::ng-deep .editor-toolbar button{background:0 0;display:inline-block;text-align:center;text-decoration:none!important;height:30px;margin:0;padding:0;border:1px solid transparent;border-radius:3px;cursor:pointer}:host ::ng-deep .editor-toolbar button{width:30px}:host ::ng-deep .editor-toolbar button.active,:host ::ng-deep .editor-toolbar button:hover{background:#fcfcfc;border-color:#95a5a6}:host ::ng-deep .editor-toolbar i.separator{display:inline-block;width:0;border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:transparent;text-indent:-10px;margin:0 6px}:host ::ng-deep .editor-toolbar button:after{font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:65%;vertical-align:text-bottom;position:relative;top:2px}:host ::ng-deep .editor-toolbar button.heading-1:after{content:\"1\"}:host ::ng-deep .editor-toolbar button.heading-2:after{content:\"2\"}:host ::ng-deep .editor-toolbar button.heading-3:after{content:\"3\"}:host ::ng-deep .editor-toolbar button.heading-bigger:after{content:\"\\25b2\"}:host ::ng-deep .editor-toolbar button.heading-smaller:after{content:\"\\25bc\"}:host ::ng-deep .editor-toolbar.disabled-for-preview button:not(.no-disable){opacity:.6;pointer-events:none}@media only screen and (max-width: 700px){:host ::ng-deep .editor-toolbar i.no-mobile{display:none}}:host ::ng-deep .editor-statusbar{padding:8px 10px;font-size:12px;color:#959694;text-align:right}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen .editor-statusbar{width:100%}:host ::ng-deep .editor-statusbar span{display:inline-block;min-width:4em;margin-left:1em}:host ::ng-deep .editor-statusbar .lines:before{content:\"lines: \"}:host ::ng-deep .editor-statusbar .words:before{content:\"words: \"}:host ::ng-deep .editor-statusbar .characters:before{content:\"characters: \"}:host ::ng-deep .editor-preview-full{position:absolute;width:100%;height:100%;top:0;left:0;z-index:7;overflow:auto;display:none;box-sizing:border-box}:host ::ng-deep .editor-preview-side{position:fixed;bottom:0;width:50%;top:50px;right:0;z-index:9;overflow:auto;display:none;box-sizing:border-box;border:1px solid #ddd;word-wrap:break-word}:host ::ng-deep .editor-preview-active-side{display:block}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen .editor-preview-active-side{flex:1 1 auto;height:auto;position:static}:host ::ng-deep .editor-preview-active{display:block}:host ::ng-deep .editor-preview{padding:10px;background:#fafafa}:host ::ng-deep .editor-preview>p{margin-top:0}:host ::ng-deep .editor-preview pre{background:#eee;margin-bottom:10px}:host ::ng-deep .editor-preview table td,:host ::ng-deep .editor-preview table th{border:1px solid #ddd;padding:5px}:host ::ng-deep .cm-s-easymde .cm-tag{color:#63a35c}:host ::ng-deep .cm-s-easymde .cm-attribute{color:#795da3}:host ::ng-deep .cm-s-easymde .cm-string{color:#183691}:host ::ng-deep .cm-s-easymde .cm-header-1{font-size:200%;line-height:200%}:host ::ng-deep .cm-s-easymde .cm-header-2{font-size:160%;line-height:160%}:host ::ng-deep .cm-s-easymde .cm-header-3{font-size:125%;line-height:125%}:host ::ng-deep .cm-s-easymde .cm-header-4{font-size:110%;line-height:110%}:host ::ng-deep .cm-s-easymde .cm-comment{background:rgba(0,0,0,.05);border-radius:2px}:host ::ng-deep .cm-s-easymde .cm-link{color:#7f8c8d}:host ::ng-deep .cm-s-easymde .cm-url{color:#aab2b3}:host ::ng-deep .cm-s-easymde .cm-quote{color:#7f8c8d;font-style:italic}:host ::ng-deep .editor-toolbar .easymde-dropdown{position:relative;background:linear-gradient(to bottom right,#fff 0,#fff 84%,#333 50%,#333 100%);border-radius:0;border:1px solid #fff}:host ::ng-deep .editor-toolbar .easymde-dropdown:hover{background:linear-gradient(to bottom right,#fff 0,#fff 84%,#333 50%,#333 100%)}:host ::ng-deep .easymde-dropdown-content{display:block;visibility:hidden;position:absolute;background-color:#f9f9f9;box-shadow:0 8px 16px #0003;padding:8px;z-index:2;top:30px}:host ::ng-deep .easymde-dropdown:active .easymde-dropdown-content,:host ::ng-deep .easymde-dropdown:focus .easymde-dropdown-content,:host ::ng-deep .easymde-dropdown:focus-within .easymde-dropdown-content{visibility:visible}:host ::ng-deep span[data-img-src]:after{content:\"\";background-image:var(--bg-image);display:block;max-height:100%;max-width:100%;background-size:contain;height:0;padding-top:var(--height);width:var(--width);background-repeat:no-repeat}:host ::ng-deep .CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}\n"] });
150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: TdTextEditorComponent, decorators: [{
151
+ type: Component,
152
+ args: [{ selector: 'td-text-editor', providers: [
153
+ {
154
+ provide: NG_VALUE_ACCESSOR,
155
+ useExisting: forwardRef(() => TdTextEditorComponent),
156
+ multi: true,
157
+ },
158
+ ], template: "<div>\n <textarea #easymde></textarea>\n</div>\n", styles: ["@charset \"UTF-8\";:host ::ng-deep .CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}:host ::ng-deep .CodeMirror-lines{padding:4px 0}:host ::ng-deep .CodeMirror pre.CodeMirror-line,:host ::ng-deep .CodeMirror pre.CodeMirror-line-like{padding:0 4px}:host ::ng-deep .CodeMirror-gutter-filler,:host ::ng-deep .CodeMirror-scrollbar-filler{background-color:#fff}:host ::ng-deep .CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}:host ::ng-deep .CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}:host ::ng-deep .CodeMirror-guttermarker{color:#000}:host ::ng-deep .CodeMirror-guttermarker-subtle{color:#999}:host ::ng-deep .CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}:host ::ng-deep .CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}:host ::ng-deep .cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}:host ::ng-deep .cm-fat-cursor div.CodeMirror-cursors{z-index:1}:host ::ng-deep .cm-fat-cursor .CodeMirror-line::selection,:host ::ng-deep .cm-fat-cursor .CodeMirror-line>span::selection,:host ::ng-deep .cm-fat-cursor .CodeMirror-line>span>span::selection{background:0 0}:host ::ng-deep .cm-fat-cursor .CodeMirror-line::-moz-selection,:host ::ng-deep .cm-fat-cursor .CodeMirror-line>span::-moz-selection,:host ::ng-deep .cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:0 0}:host ::ng-deep .cm-fat-cursor{caret-color:transparent}@keyframes blink{50%{background-color:transparent}}:host ::ng-deep .cm-tab{display:inline-block;text-decoration:inherit}:host ::ng-deep .CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}:host ::ng-deep .CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}:host ::ng-deep .cm-s-default .cm-header{color:#00f}:host ::ng-deep .cm-s-default .cm-quote{color:#090}:host ::ng-deep .cm-negative{color:#d44}:host ::ng-deep .cm-positive{color:#292}:host ::ng-deep .cm-header,:host ::ng-deep .cm-strong{font-weight:700}:host ::ng-deep .cm-em{font-style:italic}:host ::ng-deep .cm-link{text-decoration:underline}:host ::ng-deep .cm-strikethrough{text-decoration:line-through}:host ::ng-deep .cm-s-default .cm-keyword{color:#708}:host ::ng-deep .cm-s-default .cm-atom{color:#219}:host ::ng-deep .cm-s-default .cm-number{color:#164}:host ::ng-deep .cm-s-default .cm-def{color:#00f}:host ::ng-deep .cm-s-default .cm-variable-2{color:#05a}:host ::ng-deep .cm-s-default .cm-type,:host ::ng-deep .cm-s-default .cm-variable-3{color:#085}:host ::ng-deep .cm-s-default .cm-comment{color:#a50}:host ::ng-deep .cm-s-default .cm-string{color:#a11}:host ::ng-deep .cm-s-default .cm-string-2{color:#f50}:host ::ng-deep .cm-s-default .cm-meta{color:#555}:host ::ng-deep .cm-s-default .cm-qualifier{color:#555}:host ::ng-deep .cm-s-default .cm-builtin{color:#30a}:host ::ng-deep .cm-s-default .cm-bracket{color:#997}:host ::ng-deep .cm-s-default .cm-tag{color:#170}:host ::ng-deep .cm-s-default .cm-attribute{color:#00c}:host ::ng-deep .cm-s-default .cm-hr{color:#999}:host ::ng-deep .cm-s-default .cm-link{color:#00c}:host ::ng-deep .cm-s-default .cm-error{color:red}:host ::ng-deep .cm-invalidchar{color:red}:host ::ng-deep .CodeMirror-composing{border-bottom:2px solid}:host ::ng-deep div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}:host ::ng-deep div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}:host ::ng-deep .CodeMirror-matchingtag{background:rgba(255,150,0,.3)}:host ::ng-deep .CodeMirror-activeline-background{background:#e8f2ff}:host ::ng-deep .CodeMirror{position:relative;overflow:hidden;background:#fff}:host ::ng-deep .CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:0;position:relative}:host ::ng-deep .CodeMirror-sizer{position:relative;border-right:50px solid transparent}:host ::ng-deep .CodeMirror-gutter-filler,:host ::ng-deep .CodeMirror-hscrollbar,:host ::ng-deep .CodeMirror-scrollbar-filler,:host ::ng-deep .CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:0}:host ::ng-deep .CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}:host ::ng-deep .CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}:host ::ng-deep .CodeMirror-scrollbar-filler{right:0;bottom:0}:host ::ng-deep .CodeMirror-gutter-filler{left:0;bottom:0}:host ::ng-deep .CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}:host ::ng-deep .CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}:host ::ng-deep .CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important}:host ::ng-deep .CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}:host ::ng-deep .CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}:host ::ng-deep .CodeMirror-gutter-wrapper ::selection{background-color:transparent}:host ::ng-deep .CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}:host ::ng-deep .CodeMirror-lines{cursor:text;min-height:1px}:host ::ng-deep .CodeMirror pre.CodeMirror-line,:host ::ng-deep .CodeMirror pre.CodeMirror-line-like{border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-feature-settings:\"calt\";font-variant-ligatures:contextual}:host ::ng-deep .CodeMirror-wrap pre.CodeMirror-line,:host ::ng-deep .CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}:host ::ng-deep .CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}:host ::ng-deep .CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}:host ::ng-deep .CodeMirror-code{outline:0}:host ::ng-deep .CodeMirror-gutter,:host ::ng-deep .CodeMirror-gutters,:host ::ng-deep .CodeMirror-linenumber,:host ::ng-deep .CodeMirror-scroll,:host ::ng-deep .CodeMirror-sizer{box-sizing:content-box}:host ::ng-deep .CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}:host ::ng-deep .CodeMirror-cursor{position:absolute;pointer-events:none}:host ::ng-deep .CodeMirror-measure pre{position:static}:host ::ng-deep div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}:host ::ng-deep div.CodeMirror-dragcursors{visibility:visible}:host ::ng-deep .CodeMirror-focused div.CodeMirror-cursors{visibility:visible}:host ::ng-deep .CodeMirror-selected{background:#d9d9d9}:host ::ng-deep .CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}:host ::ng-deep .CodeMirror-crosshair{cursor:crosshair}:host ::ng-deep .CodeMirror-line::selection,:host ::ng-deep .CodeMirror-line>span::selection,:host ::ng-deep .CodeMirror-line>span>span::selection{background:#d7d4f0}:host ::ng-deep .CodeMirror-line::-moz-selection,:host ::ng-deep .CodeMirror-line>span::-moz-selection,:host ::ng-deep .CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}:host ::ng-deep .cm-searching{background-color:#ffa;background-color:#ff06}:host ::ng-deep .cm-force-border{padding-right:.1px}@media print{:host ::ng-deep .CodeMirror div.CodeMirror-cursors{visibility:hidden}}:host ::ng-deep .cm-tab-wrap-hack:after{content:\"\"}:host ::ng-deep span.CodeMirror-selectedtext{background:0 0}:host ::ng-deep .EasyMDEContainer{display:block}:host ::ng-deep .CodeMirror-rtl pre{direction:rtl}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen{display:flex;flex-direction:row;flex-wrap:wrap}:host ::ng-deep .EasyMDEContainer .CodeMirror{box-sizing:border-box;height:auto;border:1px solid #ddd;border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:10px;font:inherit;z-index:0;word-wrap:break-word}:host ::ng-deep .EasyMDEContainer .CodeMirror-scroll{cursor:text}:host ::ng-deep .EasyMDEContainer .CodeMirror-fullscreen{background:#fff;position:fixed!important;top:50px;left:0;right:0;bottom:0;height:auto;z-index:8;border-right:none!important;border-bottom-right-radius:0!important}:host ::ng-deep .EasyMDEContainer .CodeMirror-sided{width:50%!important}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen .CodeMirror-sided{border-right:none!important;border-bottom-right-radius:0;position:relative;flex:1 1 auto}:host ::ng-deep .EasyMDEContainer .CodeMirror-placeholder{opacity:.5}:host ::ng-deep .EasyMDEContainer .CodeMirror-focused .CodeMirror-selected{background:#d9d9d9}:host ::ng-deep .editor-toolbar{position:relative;-webkit-user-select:none;-o-user-select:none;user-select:none;padding:9px 10px;border-top:1px solid #bbb;border-left:1px solid #bbb;border-right:1px solid #bbb;border-top-left-radius:4px;border-top-right-radius:4px}:host ::ng-deep .editor-toolbar.fullscreen{width:100%;height:50px;padding-top:10px;padding-bottom:10px;box-sizing:border-box;background:#fff;border:0;position:fixed;top:0;left:0;opacity:1;z-index:9}:host ::ng-deep .editor-toolbar.fullscreen:before{width:20px;height:50px;background:linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);position:fixed;top:0;left:0;margin:0;padding:0}:host ::ng-deep .editor-toolbar.fullscreen:after{width:20px;height:50px;background:linear-gradient(to right,rgba(255,255,255,0) 0,#fff 100%);position:fixed;top:0;right:0;margin:0;padding:0}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen .editor-toolbar{width:100%}:host ::ng-deep .editor-toolbar .easymde-dropdown,:host ::ng-deep .editor-toolbar button{background:0 0;display:inline-block;text-align:center;text-decoration:none!important;height:30px;margin:0;padding:0;border:1px solid transparent;border-radius:3px;cursor:pointer}:host ::ng-deep .editor-toolbar button{width:30px}:host ::ng-deep .editor-toolbar button.active,:host ::ng-deep .editor-toolbar button:hover{background:#fcfcfc;border-color:#95a5a6}:host ::ng-deep .editor-toolbar i.separator{display:inline-block;width:0;border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:transparent;text-indent:-10px;margin:0 6px}:host ::ng-deep .editor-toolbar button:after{font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:65%;vertical-align:text-bottom;position:relative;top:2px}:host ::ng-deep .editor-toolbar button.heading-1:after{content:\"1\"}:host ::ng-deep .editor-toolbar button.heading-2:after{content:\"2\"}:host ::ng-deep .editor-toolbar button.heading-3:after{content:\"3\"}:host ::ng-deep .editor-toolbar button.heading-bigger:after{content:\"\\25b2\"}:host ::ng-deep .editor-toolbar button.heading-smaller:after{content:\"\\25bc\"}:host ::ng-deep .editor-toolbar.disabled-for-preview button:not(.no-disable){opacity:.6;pointer-events:none}@media only screen and (max-width: 700px){:host ::ng-deep .editor-toolbar i.no-mobile{display:none}}:host ::ng-deep .editor-statusbar{padding:8px 10px;font-size:12px;color:#959694;text-align:right}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen .editor-statusbar{width:100%}:host ::ng-deep .editor-statusbar span{display:inline-block;min-width:4em;margin-left:1em}:host ::ng-deep .editor-statusbar .lines:before{content:\"lines: \"}:host ::ng-deep .editor-statusbar .words:before{content:\"words: \"}:host ::ng-deep .editor-statusbar .characters:before{content:\"characters: \"}:host ::ng-deep .editor-preview-full{position:absolute;width:100%;height:100%;top:0;left:0;z-index:7;overflow:auto;display:none;box-sizing:border-box}:host ::ng-deep .editor-preview-side{position:fixed;bottom:0;width:50%;top:50px;right:0;z-index:9;overflow:auto;display:none;box-sizing:border-box;border:1px solid #ddd;word-wrap:break-word}:host ::ng-deep .editor-preview-active-side{display:block}:host ::ng-deep .EasyMDEContainer.sided--no-fullscreen .editor-preview-active-side{flex:1 1 auto;height:auto;position:static}:host ::ng-deep .editor-preview-active{display:block}:host ::ng-deep .editor-preview{padding:10px;background:#fafafa}:host ::ng-deep .editor-preview>p{margin-top:0}:host ::ng-deep .editor-preview pre{background:#eee;margin-bottom:10px}:host ::ng-deep .editor-preview table td,:host ::ng-deep .editor-preview table th{border:1px solid #ddd;padding:5px}:host ::ng-deep .cm-s-easymde .cm-tag{color:#63a35c}:host ::ng-deep .cm-s-easymde .cm-attribute{color:#795da3}:host ::ng-deep .cm-s-easymde .cm-string{color:#183691}:host ::ng-deep .cm-s-easymde .cm-header-1{font-size:200%;line-height:200%}:host ::ng-deep .cm-s-easymde .cm-header-2{font-size:160%;line-height:160%}:host ::ng-deep .cm-s-easymde .cm-header-3{font-size:125%;line-height:125%}:host ::ng-deep .cm-s-easymde .cm-header-4{font-size:110%;line-height:110%}:host ::ng-deep .cm-s-easymde .cm-comment{background:rgba(0,0,0,.05);border-radius:2px}:host ::ng-deep .cm-s-easymde .cm-link{color:#7f8c8d}:host ::ng-deep .cm-s-easymde .cm-url{color:#aab2b3}:host ::ng-deep .cm-s-easymde .cm-quote{color:#7f8c8d;font-style:italic}:host ::ng-deep .editor-toolbar .easymde-dropdown{position:relative;background:linear-gradient(to bottom right,#fff 0,#fff 84%,#333 50%,#333 100%);border-radius:0;border:1px solid #fff}:host ::ng-deep .editor-toolbar .easymde-dropdown:hover{background:linear-gradient(to bottom right,#fff 0,#fff 84%,#333 50%,#333 100%)}:host ::ng-deep .easymde-dropdown-content{display:block;visibility:hidden;position:absolute;background-color:#f9f9f9;box-shadow:0 8px 16px #0003;padding:8px;z-index:2;top:30px}:host ::ng-deep .easymde-dropdown:active .easymde-dropdown-content,:host ::ng-deep .easymde-dropdown:focus .easymde-dropdown-content,:host ::ng-deep .easymde-dropdown:focus-within .easymde-dropdown-content{visibility:visible}:host ::ng-deep span[data-img-src]:after{content:\"\";background-image:var(--bg-image);display:block;max-height:100%;max-width:100%;background-size:contain;height:0;padding-top:var(--height);width:var(--width);background-repeat:no-repeat}:host ::ng-deep .CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}\n"] }]
159
+ }], ctorParameters: function () { return [{ type: i0.NgZone }]; }, propDecorators: { textarea: [{
160
+ type: ViewChild,
161
+ args: ['easymde', { static: true }]
162
+ }], options: [{
163
+ type: Input
164
+ }], value: [{
165
+ type: Input
166
+ }] } });
167
+
168
+ class CovalentTextEditorModule {
169
+ }
170
+ CovalentTextEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentTextEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
171
+ CovalentTextEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentTextEditorModule, bootstrap: [TdTextEditorComponent], declarations: [TdTextEditorComponent], imports: [CommonModule], exports: [TdTextEditorComponent] });
172
+ CovalentTextEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentTextEditorModule, imports: [[CommonModule]] });
173
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentTextEditorModule, decorators: [{
174
+ type: NgModule,
175
+ args: [{
176
+ imports: [CommonModule],
177
+ declarations: [TdTextEditorComponent],
178
+ exports: [TdTextEditorComponent],
179
+ bootstrap: [TdTextEditorComponent],
180
+ }]
181
+ }] });
182
+
183
+ /**
184
+ * Generated bundle index. Do not edit.
185
+ */
186
+
187
+ export { CovalentTextEditorModule, TdTextEditorComponent };
188
+ //# sourceMappingURL=covalent-text-editor.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"covalent-text-editor.mjs","sources":["../../../../libs/angular-text-editor/src/lib/text-editor.component.ts","../../../../libs/angular-text-editor/src/lib/text-editor.component.html","../../../../libs/angular-text-editor/src/lib/text-editor.module.ts","../../../../libs/angular-text-editor/src/covalent-text-editor.ts"],"sourcesContent":["import {\n Component,\n Input,\n AfterViewInit,\n ViewChild,\n ElementRef,\n forwardRef,\n NgZone,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport * as EasyMDE from 'easymde';\n// get access to the marked class under easymde\nimport * as marked from 'marked';\n\nconst noop: any = () => {\n // empty method\n};\n\n@Component({\n selector: 'td-text-editor',\n templateUrl: './text-editor.component.html',\n styleUrls: ['./text-editor.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TdTextEditorComponent),\n multi: true,\n },\n ],\n})\nexport class TdTextEditorComponent\n implements AfterViewInit, ControlValueAccessor\n{\n private _value = '';\n private _easyMDE: any;\n private _fromEditor = false;\n\n @ViewChild('easymde', { static: true }) textarea!: ElementRef;\n @Input() options: any = {};\n\n constructor(private _zone: NgZone) {}\n\n /* tslint:disable-next-line */\n propagateChange = (_: any) => noop;\n onTouched = () => noop;\n\n /**\n * value?: string\n * Value in the Editor after async getEditorContent was called\n */\n @Input()\n set value(value: string) {\n this._value = value;\n if (this._easyMDE) {\n if (!this._fromEditor) {\n this._easyMDE.value(value);\n }\n this.propagateChange(this._value);\n this._fromEditor = false;\n this._zone.run(() => (this._value = value));\n }\n }\n\n get value(): string {\n return this._value;\n }\n\n get easyMDE(): any {\n return this._easyMDE;\n }\n\n /**\n * Implemented as part of ControlValueAccessor.\n */\n writeValue(value: any): void {\n this.value = !value ? '' : value;\n }\n registerOnChange(fn: any): void {\n this.propagateChange = fn;\n }\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n ngAfterViewInit(): void {\n this.options.element = this.textarea.nativeElement;\n\n // If content entered is html then don't evaluate it, prevent xss vulnerabilities\n marked.marked.setOptions({ sanitize: true });\n this._easyMDE = new EasyMDE(this.options);\n this._easyMDE.value(this.value);\n this._easyMDE.codemirror.on('change', () => {\n this._fromEditor = true;\n this.writeValue(this._easyMDE.value());\n });\n }\n\n /* Wrapped function provided by EasyMDE */\n\n isPreviewActive(): boolean {\n return this._easyMDE.isPreviewActive();\n }\n\n isSideBySideActive(): boolean {\n return this._easyMDE.isSideBySideActive();\n }\n\n isFullscreenActive(): boolean {\n return this._easyMDE.isFullscreenActive();\n }\n\n clearAutosavedValue(): void {\n this._easyMDE.clearAutosavedValue();\n }\n\n toTextArea(): void {\n this._easyMDE.toTextArea();\n }\n\n toggleBold(): void {\n this._easyMDE.toggleBold();\n }\n\n toggleItalic(): void {\n this._easyMDE.toggleItalic();\n }\n\n toggleStrikethrough(): void {\n this._easyMDE.toggleStrikethrough();\n }\n\n toggleHeadingSmaller(): void {\n this._easyMDE.toggleHeadingSmaller();\n }\n\n toggleHeadingBigger(): void {\n this._easyMDE.toggleHeadingBigger();\n }\n\n toggleHeading1(): void {\n this._easyMDE.toggleHeading1();\n }\n\n toggleHeading2(): void {\n this._easyMDE.toggleHeading2();\n }\n\n toggleHeading3(): void {\n this._easyMDE.toggleHeading3();\n }\n\n toggleCodeBlock(): void {\n this._easyMDE.toggleCodeBlock();\n }\n\n toggleBlockquote(): void {\n this._easyMDE.toggleBlockquote();\n }\n\n toggleUnorderedList(): void {\n this._easyMDE.toggleUnorderedList();\n }\n\n toggleOrderedList(): void {\n this._easyMDE.toggleOrderedList();\n }\n\n cleanBlock(): void {\n this._easyMDE.cleanBlock();\n }\n\n drawLink(): void {\n this._easyMDE.drawLink();\n }\n\n drawImage(): void {\n this._easyMDE.drawImage();\n }\n\n drawTable(): void {\n this._easyMDE.drawTable();\n }\n\n drawHorizontalRule(): void {\n this._easyMDE.drawHorizontalRule();\n }\n\n togglePreview(): void {\n this._easyMDE.togglePreview();\n }\n\n toggleSideBySide(): void {\n this._easyMDE.toggleSideBySide();\n }\n\n toggleFullScreen(): void {\n this._easyMDE.toggleFullScreen();\n }\n}\n","<div>\n <textarea #easymde></textarea>\n</div>\n","import { NgModule } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\n\nimport { TdTextEditorComponent } from './text-editor.component';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [TdTextEditorComponent],\n exports: [TdTextEditorComponent],\n bootstrap: [TdTextEditorComponent],\n})\nexport class CovalentTextEditorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAcA,MAAM,IAAI,GAAQ;;AAElB,CAAC,CAAC;MAcW,qBAAqB;IAUhC,YAAoB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;QAPzB,WAAM,GAAG,EAAE,CAAC;QAEZ,gBAAW,GAAG,KAAK,CAAC;QAGnB,YAAO,GAAQ,EAAE,CAAC;;QAK3B,oBAAe,GAAG,CAAC,CAAM,KAAK,IAAI,CAAC;QACnC,cAAS,GAAG,MAAM,IAA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AAwB,YAL1B,CAAC,YAAY,CAAC;2FAKZ,wBAAwB;kBANpC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;oBAChC,SAAS,EAAE,CAAC,qBAAqB,CAAC;iBACnC;;;ACXD;;;;;;"}
@@ -1,5 +1,6 @@
1
1
  import { AfterViewInit, ElementRef, NgZone } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
3
4
  export declare class TdTextEditorComponent implements AfterViewInit, ControlValueAccessor {
4
5
  private _zone;
5
6
  private _value;
@@ -8,7 +9,7 @@ export declare class TdTextEditorComponent implements AfterViewInit, ControlValu
8
9
  textarea: ElementRef;
9
10
  options: any;
10
11
  constructor(_zone: NgZone);
11
- propagateChange: (_: any) => void;
12
+ propagateChange: (_: any) => any;
12
13
  onTouched: () => any;
13
14
  /**
14
15
  * value?: string
@@ -49,4 +50,6 @@ export declare class TdTextEditorComponent implements AfterViewInit, ControlValu
49
50
  togglePreview(): void;
50
51
  toggleSideBySide(): void;
51
52
  toggleFullScreen(): void;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<TdTextEditorComponent, never>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<TdTextEditorComponent, "td-text-editor", never, { "options": "options"; "value": "value"; }, {}, never, never>;
52
55
  }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./text-editor.component";
3
+ import * as i2 from "@angular/common";
4
+ export declare class CovalentTextEditorModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<CovalentTextEditorModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CovalentTextEditorModule, [typeof i1.TdTextEditorComponent], [typeof i2.CommonModule], [typeof i1.TdTextEditorComponent]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<CovalentTextEditorModule>;
8
+ }
package/package.json CHANGED
@@ -1,50 +1,34 @@
1
1
  {
2
2
  "name": "@covalent/text-editor",
3
- "version": "4.0.0",
4
- "description": "Teradata UI Platform Text Editor Module",
5
- "keywords": [
6
- "angular",
7
- "covalent",
8
- "easymde",
9
- "markdown",
10
- "text",
11
- "editor",
12
- "electron",
13
- "reusable"
14
- ],
15
- "repository": {
16
- "type": "git",
17
- "url": "https://github.com/teradata/covalent.git"
18
- },
19
- "bugs": {
20
- "url": "https://github.com/Teradata/covalent/issues"
3
+ "version": "4.1.0-develop.2",
4
+ "peerDependencies": {
5
+ "@angular/common": "^13.2.0",
6
+ "@angular/core": "^13.2.0",
7
+ "@angular/platform-browser": "^13.2.0",
8
+ "@angular/forms": "^13.2.0",
9
+ "easymde": "^2.16.1"
21
10
  },
22
- "license": "MIT",
23
- "author": "Teradata UX",
24
- "contributors": [
25
- "Kyle Ledbetter <kyle.ledbetter@teradata.com>",
26
- "Richa Vyas <richa.vyas@teradata.com>",
27
- "Ed Morales <eduardo.morales@teradata.com>",
28
- "Jason Weaver <jason.weaver@teradata.com>",
29
- "Jeremy Wilken <jeremy.wilken@teradata.com>",
30
- "Jeremy Smartt <jeremy.smartt@teradata.com>",
31
- "Steven Ov <steven.ov@teradata.com>",
32
- "Julie Knowles <julie.knowles@teradata.com>"
33
- ],
34
11
  "dependencies": {
35
- "easymde": "2.8.0",
36
12
  "tslib": "^2.0.0"
37
13
  },
38
- "peerDependencies": {
39
- "@angular/common": "^9.0.0 || ^10.0.0-0 || ^11.0.0-0",
40
- "@angular/core": "^9.0.0 || ^10.0.0-0 || ^11.0.0-0"
41
- },
42
- "main": "bundles/covalent-text-editor.umd.js",
43
- "module": "fesm2015/covalent-text-editor.js",
44
- "es2015": "fesm2015/covalent-text-editor.js",
45
- "esm2015": "esm2015/covalent-text-editor.js",
46
- "fesm2015": "fesm2015/covalent-text-editor.js",
14
+ "module": "fesm2015/covalent-text-editor.mjs",
15
+ "es2020": "fesm2020/covalent-text-editor.mjs",
16
+ "esm2020": "esm2020/covalent-text-editor.mjs",
17
+ "fesm2020": "fesm2020/covalent-text-editor.mjs",
18
+ "fesm2015": "fesm2015/covalent-text-editor.mjs",
47
19
  "typings": "covalent-text-editor.d.ts",
48
- "metadata": "covalent-text-editor.metadata.json",
20
+ "exports": {
21
+ "./package.json": {
22
+ "default": "./package.json"
23
+ },
24
+ ".": {
25
+ "types": "./covalent-text-editor.d.ts",
26
+ "esm2020": "./esm2020/covalent-text-editor.mjs",
27
+ "es2020": "./fesm2020/covalent-text-editor.mjs",
28
+ "es2015": "./fesm2015/covalent-text-editor.mjs",
29
+ "node": "./fesm2015/covalent-text-editor.mjs",
30
+ "default": "./fesm2020/covalent-text-editor.mjs"
31
+ }
32
+ },
49
33
  "sideEffects": false
50
34
  }
@@ -0,0 +1,2 @@
1
+ export { TdTextEditorComponent } from './lib/text-editor.component';
2
+ export { CovalentTextEditorModule } from './lib/text-editor.module';