@firestitch/html-editor 9.5.8 → 12.0.1
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/app/components/html-editor/html-editor.component.d.ts +7 -4
- package/app/components/html-renderer/html-renderer.component.d.ts +4 -1
- package/app/fs-html-editor.module.d.ts +8 -0
- package/app/services/froala-loader.service.d.ts +6 -3
- package/bundles/firestitch-html-editor.umd.js +362 -246
- package/bundles/firestitch-html-editor.umd.js.map +1 -1
- package/esm2015/app/classes/plugin.js +1 -1
- package/esm2015/app/components/html-editor/html-editor.component.js +60 -51
- package/esm2015/app/components/html-renderer/html-renderer.component.js +21 -26
- package/esm2015/app/consts/paragraph-buttons.const.js +1 -1
- package/esm2015/app/consts/rich-buttons.const.js +1 -1
- package/esm2015/app/consts/text-buttons.const.js +1 -1
- package/esm2015/app/enums/default-plugin.enum.js +2 -1
- package/esm2015/app/fs-html-editor.module.js +29 -21
- package/esm2015/app/injects/config.inject.js +1 -1
- package/esm2015/app/interfaces/html-editor-config.js +2 -1
- package/esm2015/app/interfaces/plugin-button.js +2 -1
- package/esm2015/app/interfaces/plugin-config.js +2 -1
- package/esm2015/app/plugins/checklist.plugin.js +1 -1
- package/esm2015/app/plugins/code.plugin.js +1 -1
- package/esm2015/app/plugins/configs/mention-plugin.config.js +2 -1
- package/esm2015/app/plugins/configs/screen-record-plugin.config.js +2 -1
- package/esm2015/app/plugins/mention.plugin.js +1 -1
- package/esm2015/app/plugins/screen-record.plugin.js +1 -1
- package/esm2015/app/services/froala-loader.service.js +16 -17
- package/esm2015/app/utils/loader.js +1 -1
- package/esm2015/firestitch-html-editor.js +1 -5
- package/esm2015/public_api.js +1 -1
- package/fesm2015/firestitch-html-editor.js +127 -112
- package/fesm2015/firestitch-html-editor.js.map +1 -1
- package/firestitch-html-editor.d.ts +1 -5
- package/package.json +4 -7
- package/styles.scss +3 -2
- package/bundles/firestitch-html-editor.umd.min.js +0 -17
- package/bundles/firestitch-html-editor.umd.min.js.map +0 -1
- package/esm5/app/classes/plugin.js +0 -9
- package/esm5/app/components/html-editor/html-editor.component.js +0 -471
- package/esm5/app/components/html-renderer/html-renderer.component.js +0 -39
- package/esm5/app/consts/paragraph-buttons.const.js +0 -9
- package/esm5/app/consts/rich-buttons.const.js +0 -7
- package/esm5/app/consts/text-buttons.const.js +0 -19
- package/esm5/app/enums/default-plugin.enum.js +0 -1
- package/esm5/app/fs-html-editor.module.js +0 -62
- package/esm5/app/injects/config.inject.js +0 -4
- package/esm5/app/interfaces/html-editor-config.js +0 -1
- package/esm5/app/interfaces/plugin-button.js +0 -1
- package/esm5/app/interfaces/plugin-config.js +0 -1
- package/esm5/app/plugins/checklist.plugin.js +0 -41
- package/esm5/app/plugins/code.plugin.js +0 -70
- package/esm5/app/plugins/configs/mention-plugin.config.js +0 -1
- package/esm5/app/plugins/configs/screen-record-plugin.config.js +0 -1
- package/esm5/app/plugins/mention.plugin.js +0 -93
- package/esm5/app/plugins/screen-record.plugin.js +0 -106
- package/esm5/app/services/froala-loader.service.js +0 -96
- package/esm5/app/utils/loader.js +0 -83
- package/esm5/firestitch-html-editor.js +0 -9
- package/esm5/public_api.js +0 -12
- package/fesm5/firestitch-html-editor.js +0 -1074
- package/fesm5/firestitch-html-editor.js.map +0 -1
- package/firestitch-html-editor.metadata.json +0 -1
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@firestitch/skeleton'), require('@angular/forms'), require('@firestitch/file'), require('rxjs'), require('rxjs/operators'), require('lodash-es'), require('@angular/platform-browser'), require('tributejs'), require('@firestitch/common')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@firestitch/html-editor', ['exports', '@angular/core', '@angular/common', '@firestitch/skeleton', '@angular/forms', '@firestitch/file', 'rxjs', 'rxjs/operators', 'lodash-es', '@angular/platform-browser', 'tributejs', '@firestitch/common'], factory) :
|
|
4
|
-
(global = global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch[
|
|
5
|
-
}(this, (function (exports,
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["html-editor"] = {}), global.ng.core, global.ng.common, global.i4, global.ng.forms, global.file, global.rxjs, global.rxjs.operators, global.lodashEs, global.ng.platformBrowser, global.Tribute, global.common));
|
|
5
|
+
})(this, (function (exports, i0, i3, i4, forms, file, rxjs, operators, lodashEs, i1, Tribute, common) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n["default"] = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
28
|
+
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
29
|
+
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
30
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
31
|
+
var Tribute__default = /*#__PURE__*/_interopDefaultLegacy(Tribute);
|
|
8
32
|
|
|
9
33
|
/*! *****************************************************************************
|
|
10
34
|
Copyright (c) Microsoft Corporation.
|
|
@@ -21,14 +45,14 @@
|
|
|
21
45
|
PERFORMANCE OF THIS SOFTWARE.
|
|
22
46
|
***************************************************************************** */
|
|
23
47
|
/* global Reflect, Promise */
|
|
24
|
-
|
|
25
|
-
var extendStatics = function(d, b) {
|
|
48
|
+
var extendStatics = function (d, b) {
|
|
26
49
|
extendStatics = Object.setPrototypeOf ||
|
|
27
50
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
28
|
-
function (d, b) { for (var p in b)
|
|
51
|
+
function (d, b) { for (var p in b)
|
|
52
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
53
|
+
d[p] = b[p]; };
|
|
29
54
|
return extendStatics(d, b);
|
|
30
55
|
};
|
|
31
|
-
|
|
32
56
|
function __extends(d, b) {
|
|
33
57
|
if (typeof b !== "function" && b !== null)
|
|
34
58
|
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
@@ -36,22 +60,23 @@
|
|
|
36
60
|
function __() { this.constructor = d; }
|
|
37
61
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
38
62
|
}
|
|
39
|
-
|
|
40
|
-
var __assign = function() {
|
|
63
|
+
var __assign = function () {
|
|
41
64
|
__assign = Object.assign || function __assign(t) {
|
|
42
65
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
43
66
|
s = arguments[i];
|
|
44
|
-
for (var p in s)
|
|
67
|
+
for (var p in s)
|
|
68
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
69
|
+
t[p] = s[p];
|
|
45
70
|
}
|
|
46
71
|
return t;
|
|
47
72
|
};
|
|
48
73
|
return __assign.apply(this, arguments);
|
|
49
74
|
};
|
|
50
|
-
|
|
51
75
|
function __rest(s, e) {
|
|
52
76
|
var t = {};
|
|
53
|
-
for (var p in s)
|
|
54
|
-
|
|
77
|
+
for (var p in s)
|
|
78
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
79
|
+
t[p] = s[p];
|
|
55
80
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
56
81
|
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
57
82
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
@@ -59,190 +84,267 @@
|
|
|
59
84
|
}
|
|
60
85
|
return t;
|
|
61
86
|
}
|
|
62
|
-
|
|
63
87
|
function __decorate(decorators, target, key, desc) {
|
|
64
88
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
65
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
66
|
-
|
|
89
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
90
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
91
|
+
else
|
|
92
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
93
|
+
if (d = decorators[i])
|
|
94
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
67
95
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
68
96
|
}
|
|
69
|
-
|
|
70
97
|
function __param(paramIndex, decorator) {
|
|
71
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
98
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
72
99
|
}
|
|
73
|
-
|
|
74
100
|
function __metadata(metadataKey, metadataValue) {
|
|
75
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
101
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
102
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
76
103
|
}
|
|
77
|
-
|
|
78
104
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
79
105
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
80
106
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
81
|
-
function fulfilled(value) { try {
|
|
82
|
-
|
|
107
|
+
function fulfilled(value) { try {
|
|
108
|
+
step(generator.next(value));
|
|
109
|
+
}
|
|
110
|
+
catch (e) {
|
|
111
|
+
reject(e);
|
|
112
|
+
} }
|
|
113
|
+
function rejected(value) { try {
|
|
114
|
+
step(generator["throw"](value));
|
|
115
|
+
}
|
|
116
|
+
catch (e) {
|
|
117
|
+
reject(e);
|
|
118
|
+
} }
|
|
83
119
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
84
120
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
85
121
|
});
|
|
86
122
|
}
|
|
87
|
-
|
|
88
123
|
function __generator(thisArg, body) {
|
|
89
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1)
|
|
90
|
-
|
|
124
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
125
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
126
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
91
127
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
92
128
|
function step(op) {
|
|
93
|
-
if (f)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
129
|
+
if (f)
|
|
130
|
+
throw new TypeError("Generator is already executing.");
|
|
131
|
+
while (_)
|
|
132
|
+
try {
|
|
133
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
134
|
+
return t;
|
|
135
|
+
if (y = 0, t)
|
|
136
|
+
op = [op[0] & 2, t.value];
|
|
137
|
+
switch (op[0]) {
|
|
138
|
+
case 0:
|
|
139
|
+
case 1:
|
|
140
|
+
t = op;
|
|
141
|
+
break;
|
|
142
|
+
case 4:
|
|
143
|
+
_.label++;
|
|
144
|
+
return { value: op[1], done: false };
|
|
145
|
+
case 5:
|
|
146
|
+
_.label++;
|
|
147
|
+
y = op[1];
|
|
148
|
+
op = [0];
|
|
149
|
+
continue;
|
|
150
|
+
case 7:
|
|
151
|
+
op = _.ops.pop();
|
|
152
|
+
_.trys.pop();
|
|
153
|
+
continue;
|
|
154
|
+
default:
|
|
155
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
156
|
+
_ = 0;
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
160
|
+
_.label = op[1];
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
164
|
+
_.label = t[1];
|
|
165
|
+
t = op;
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
if (t && _.label < t[2]) {
|
|
169
|
+
_.label = t[2];
|
|
170
|
+
_.ops.push(op);
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
if (t[2])
|
|
174
|
+
_.ops.pop();
|
|
175
|
+
_.trys.pop();
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
op = body.call(thisArg, _);
|
|
179
|
+
}
|
|
180
|
+
catch (e) {
|
|
181
|
+
op = [6, e];
|
|
182
|
+
y = 0;
|
|
183
|
+
}
|
|
184
|
+
finally {
|
|
185
|
+
f = t = 0;
|
|
109
186
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
187
|
+
if (op[0] & 5)
|
|
188
|
+
throw op[1];
|
|
189
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
113
190
|
}
|
|
114
191
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
119
|
-
}) : (function(o, m, k, k2) {
|
|
120
|
-
if (k2 === undefined)
|
|
192
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
193
|
+
if (k2 === undefined)
|
|
194
|
+
k2 = k;
|
|
195
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
196
|
+
}) : (function (o, m, k, k2) {
|
|
197
|
+
if (k2 === undefined)
|
|
198
|
+
k2 = k;
|
|
121
199
|
o[k2] = m[k];
|
|
122
200
|
});
|
|
123
|
-
|
|
124
201
|
function __exportStar(m, o) {
|
|
125
|
-
for (var p in m)
|
|
202
|
+
for (var p in m)
|
|
203
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
204
|
+
__createBinding(o, m, p);
|
|
126
205
|
}
|
|
127
|
-
|
|
128
206
|
function __values(o) {
|
|
129
207
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
130
|
-
if (m)
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
208
|
+
if (m)
|
|
209
|
+
return m.call(o);
|
|
210
|
+
if (o && typeof o.length === "number")
|
|
211
|
+
return {
|
|
212
|
+
next: function () {
|
|
213
|
+
if (o && i >= o.length)
|
|
214
|
+
o = void 0;
|
|
215
|
+
return { value: o && o[i++], done: !o };
|
|
216
|
+
}
|
|
217
|
+
};
|
|
137
218
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
138
219
|
}
|
|
139
|
-
|
|
140
220
|
function __read(o, n) {
|
|
141
221
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
142
|
-
if (!m)
|
|
222
|
+
if (!m)
|
|
223
|
+
return o;
|
|
143
224
|
var i = m.call(o), r, ar = [], e;
|
|
144
225
|
try {
|
|
145
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
226
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
227
|
+
ar.push(r.value);
|
|
228
|
+
}
|
|
229
|
+
catch (error) {
|
|
230
|
+
e = { error: error };
|
|
146
231
|
}
|
|
147
|
-
catch (error) { e = { error: error }; }
|
|
148
232
|
finally {
|
|
149
233
|
try {
|
|
150
|
-
if (r && !r.done && (m = i["return"]))
|
|
234
|
+
if (r && !r.done && (m = i["return"]))
|
|
235
|
+
m.call(i);
|
|
236
|
+
}
|
|
237
|
+
finally {
|
|
238
|
+
if (e)
|
|
239
|
+
throw e.error;
|
|
151
240
|
}
|
|
152
|
-
finally { if (e) throw e.error; }
|
|
153
241
|
}
|
|
154
242
|
return ar;
|
|
155
243
|
}
|
|
156
|
-
|
|
157
244
|
/** @deprecated */
|
|
158
245
|
function __spread() {
|
|
159
246
|
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
160
247
|
ar = ar.concat(__read(arguments[i]));
|
|
161
248
|
return ar;
|
|
162
249
|
}
|
|
163
|
-
|
|
164
250
|
/** @deprecated */
|
|
165
251
|
function __spreadArrays() {
|
|
166
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
252
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
253
|
+
s += arguments[i].length;
|
|
167
254
|
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
168
255
|
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
169
256
|
r[k] = a[j];
|
|
170
257
|
return r;
|
|
171
258
|
}
|
|
172
|
-
|
|
173
259
|
function __spreadArray(to, from, pack) {
|
|
174
|
-
if (pack || arguments.length === 2)
|
|
175
|
-
|
|
176
|
-
if (
|
|
177
|
-
|
|
260
|
+
if (pack || arguments.length === 2)
|
|
261
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
262
|
+
if (ar || !(i in from)) {
|
|
263
|
+
if (!ar)
|
|
264
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
265
|
+
ar[i] = from[i];
|
|
266
|
+
}
|
|
178
267
|
}
|
|
179
|
-
}
|
|
180
268
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
181
269
|
}
|
|
182
|
-
|
|
183
270
|
function __await(v) {
|
|
184
271
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
185
272
|
}
|
|
186
|
-
|
|
187
273
|
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
188
|
-
if (!Symbol.asyncIterator)
|
|
274
|
+
if (!Symbol.asyncIterator)
|
|
275
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
189
276
|
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
190
277
|
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
191
|
-
function verb(n) { if (g[n])
|
|
192
|
-
|
|
278
|
+
function verb(n) { if (g[n])
|
|
279
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
280
|
+
function resume(n, v) { try {
|
|
281
|
+
step(g[n](v));
|
|
282
|
+
}
|
|
283
|
+
catch (e) {
|
|
284
|
+
settle(q[0][3], e);
|
|
285
|
+
} }
|
|
193
286
|
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
194
287
|
function fulfill(value) { resume("next", value); }
|
|
195
288
|
function reject(value) { resume("throw", value); }
|
|
196
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
289
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
290
|
+
resume(q[0][0], q[0][1]); }
|
|
197
291
|
}
|
|
198
|
-
|
|
199
292
|
function __asyncDelegator(o) {
|
|
200
293
|
var i, p;
|
|
201
294
|
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
202
295
|
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
203
296
|
}
|
|
204
|
-
|
|
205
297
|
function __asyncValues(o) {
|
|
206
|
-
if (!Symbol.asyncIterator)
|
|
298
|
+
if (!Symbol.asyncIterator)
|
|
299
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
207
300
|
var m = o[Symbol.asyncIterator], i;
|
|
208
301
|
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
209
302
|
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
210
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
303
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
211
304
|
}
|
|
212
|
-
|
|
213
305
|
function __makeTemplateObject(cooked, raw) {
|
|
214
|
-
if (Object.defineProperty) {
|
|
306
|
+
if (Object.defineProperty) {
|
|
307
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
cooked.raw = raw;
|
|
311
|
+
}
|
|
215
312
|
return cooked;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
var __setModuleDefault = Object.create ? (function(o, v) {
|
|
313
|
+
}
|
|
314
|
+
;
|
|
315
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
219
316
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
220
|
-
}) : function(o, v) {
|
|
317
|
+
}) : function (o, v) {
|
|
221
318
|
o["default"] = v;
|
|
222
319
|
};
|
|
223
|
-
|
|
224
320
|
function __importStar(mod) {
|
|
225
|
-
if (mod && mod.__esModule)
|
|
321
|
+
if (mod && mod.__esModule)
|
|
322
|
+
return mod;
|
|
226
323
|
var result = {};
|
|
227
|
-
if (mod != null)
|
|
324
|
+
if (mod != null)
|
|
325
|
+
for (var k in mod)
|
|
326
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
327
|
+
__createBinding(result, mod, k);
|
|
228
328
|
__setModuleDefault(result, mod);
|
|
229
329
|
return result;
|
|
230
330
|
}
|
|
231
|
-
|
|
232
331
|
function __importDefault(mod) {
|
|
233
332
|
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
234
333
|
}
|
|
235
|
-
|
|
236
334
|
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
237
|
-
if (kind === "a" && !f)
|
|
238
|
-
|
|
335
|
+
if (kind === "a" && !f)
|
|
336
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
337
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
338
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
239
339
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
240
340
|
}
|
|
241
|
-
|
|
242
341
|
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
243
|
-
if (kind === "m")
|
|
244
|
-
|
|
245
|
-
if (
|
|
342
|
+
if (kind === "m")
|
|
343
|
+
throw new TypeError("Private method is not writable");
|
|
344
|
+
if (kind === "a" && !f)
|
|
345
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
346
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
347
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
246
348
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
247
349
|
}
|
|
248
350
|
|
|
@@ -281,8 +383,8 @@
|
|
|
281
383
|
'outdent',
|
|
282
384
|
];
|
|
283
385
|
|
|
284
|
-
var FS_HTML_EDITOR_DEFAULT_CONFIG = new
|
|
285
|
-
var FS_HTML_EDITOR_CONFIG = new
|
|
386
|
+
var FS_HTML_EDITOR_DEFAULT_CONFIG = new i0.InjectionToken('fs-html-editor.default-config');
|
|
387
|
+
var FS_HTML_EDITOR_CONFIG = new i0.InjectionToken('fs-html-editor.config');
|
|
286
388
|
|
|
287
389
|
function resourceLoaderFactory() {
|
|
288
390
|
var resourceBase = '/assets/js/froala/';
|
|
@@ -389,21 +491,21 @@
|
|
|
389
491
|
get: function () {
|
|
390
492
|
return this._loaded$;
|
|
391
493
|
},
|
|
392
|
-
enumerable:
|
|
494
|
+
enumerable: false,
|
|
393
495
|
configurable: true
|
|
394
496
|
});
|
|
395
497
|
Object.defineProperty(FsFroalaLoaderService.prototype, "ready", {
|
|
396
498
|
get: function () {
|
|
397
499
|
return this._froalaLoaded.getValue() && this._defaultPluginsLoaded.getValue();
|
|
398
500
|
},
|
|
399
|
-
enumerable:
|
|
501
|
+
enumerable: false,
|
|
400
502
|
configurable: true
|
|
401
503
|
});
|
|
402
504
|
Object.defineProperty(FsFroalaLoaderService.prototype, "FroalaEditor", {
|
|
403
505
|
get: function () {
|
|
404
506
|
return this._FroalaEditor;
|
|
405
507
|
},
|
|
406
|
-
enumerable:
|
|
508
|
+
enumerable: false,
|
|
407
509
|
configurable: true
|
|
408
510
|
});
|
|
409
511
|
FsFroalaLoaderService.prototype._load = function () {
|
|
@@ -438,19 +540,53 @@
|
|
|
438
540
|
FsFroalaLoaderService.prototype._defaultPluginsDone = function () {
|
|
439
541
|
this._defaultPluginsLoaded.next(true);
|
|
440
542
|
};
|
|
441
|
-
FsFroalaLoaderService.ctorParameters = function () { return [
|
|
442
|
-
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FS_HTML_EDITOR_CONFIG,] }] }
|
|
443
|
-
]; };
|
|
444
|
-
FsFroalaLoaderService.ɵprov = core.ɵɵdefineInjectable({ factory: function FsFroalaLoaderService_Factory() { return new FsFroalaLoaderService(core.ɵɵinject(FS_HTML_EDITOR_CONFIG, 8)); }, token: FsFroalaLoaderService, providedIn: "root" });
|
|
445
|
-
FsFroalaLoaderService = __decorate([
|
|
446
|
-
core.Injectable({
|
|
447
|
-
providedIn: 'root',
|
|
448
|
-
}),
|
|
449
|
-
__param(0, core.Optional()), __param(0, core.Inject(FS_HTML_EDITOR_CONFIG)),
|
|
450
|
-
__metadata("design:paramtypes", [Object])
|
|
451
|
-
], FsFroalaLoaderService);
|
|
452
543
|
return FsFroalaLoaderService;
|
|
453
|
-
}());
|
|
544
|
+
}());
|
|
545
|
+
FsFroalaLoaderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFroalaLoaderService, deps: [{ token: FS_HTML_EDITOR_CONFIG, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
546
|
+
FsFroalaLoaderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFroalaLoaderService, providedIn: 'root' });
|
|
547
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsFroalaLoaderService, decorators: [{
|
|
548
|
+
type: i0.Injectable,
|
|
549
|
+
args: [{
|
|
550
|
+
providedIn: 'root',
|
|
551
|
+
}]
|
|
552
|
+
}], ctorParameters: function () {
|
|
553
|
+
return [{ type: undefined, decorators: [{
|
|
554
|
+
type: i0.Optional
|
|
555
|
+
}, {
|
|
556
|
+
type: i0.Inject,
|
|
557
|
+
args: [FS_HTML_EDITOR_CONFIG]
|
|
558
|
+
}] }];
|
|
559
|
+
} });
|
|
560
|
+
|
|
561
|
+
var FsHtmlRendererComponent = /** @class */ (function () {
|
|
562
|
+
function FsHtmlRendererComponent(sanitized, _cdRef) {
|
|
563
|
+
this.sanitized = sanitized;
|
|
564
|
+
this._cdRef = _cdRef;
|
|
565
|
+
}
|
|
566
|
+
Object.defineProperty(FsHtmlRendererComponent.prototype, "setHtml", {
|
|
567
|
+
set: function (html) {
|
|
568
|
+
this.trustedHtml = this.sanitized.bypassSecurityTrustHtml(html || '');
|
|
569
|
+
this._cdRef.markForCheck();
|
|
570
|
+
},
|
|
571
|
+
enumerable: false,
|
|
572
|
+
configurable: true
|
|
573
|
+
});
|
|
574
|
+
return FsHtmlRendererComponent;
|
|
575
|
+
}());
|
|
576
|
+
FsHtmlRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlRendererComponent, deps: [{ token: i1__namespace.DomSanitizer }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
577
|
+
FsHtmlRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsHtmlRendererComponent, selector: "fs-html-renderer", inputs: { setHtml: ["html", "setHtml"] }, ngImport: i0__namespace, template: "<div class=\"fr-view fs-html-editor-default\" [innerHtml]=\"trustedHtml\"></div>\n", styles: [""], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
578
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlRendererComponent, decorators: [{
|
|
579
|
+
type: i0.Component,
|
|
580
|
+
args: [{
|
|
581
|
+
selector: 'fs-html-renderer',
|
|
582
|
+
templateUrl: 'html-renderer.component.html',
|
|
583
|
+
styleUrls: ['html-renderer.component.scss'],
|
|
584
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
585
|
+
}]
|
|
586
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.DomSanitizer }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { setHtml: [{
|
|
587
|
+
type: i0.Input,
|
|
588
|
+
args: ['html']
|
|
589
|
+
}] } });
|
|
454
590
|
|
|
455
591
|
var FsHtmlEditorComponent = /** @class */ (function () {
|
|
456
592
|
function FsHtmlEditorComponent(_defaultConfig, _cdRef, _fr) {
|
|
@@ -467,33 +603,32 @@
|
|
|
467
603
|
this.onChange = function (data) { };
|
|
468
604
|
this.onTouched = function () { };
|
|
469
605
|
}
|
|
470
|
-
FsHtmlEditorComponent_1 = FsHtmlEditorComponent;
|
|
471
606
|
Object.defineProperty(FsHtmlEditorComponent.prototype, "el", {
|
|
472
607
|
get: function () {
|
|
473
608
|
return this.elRef.nativeElement;
|
|
474
609
|
},
|
|
475
|
-
enumerable:
|
|
610
|
+
enumerable: false,
|
|
476
611
|
configurable: true
|
|
477
612
|
});
|
|
478
613
|
Object.defineProperty(FsHtmlEditorComponent.prototype, "html", {
|
|
479
614
|
get: function () {
|
|
480
615
|
return this._html;
|
|
481
616
|
},
|
|
482
|
-
enumerable:
|
|
617
|
+
enumerable: false,
|
|
483
618
|
configurable: true
|
|
484
619
|
});
|
|
485
620
|
Object.defineProperty(FsHtmlEditorComponent.prototype, "editor", {
|
|
486
621
|
get: function () {
|
|
487
622
|
return this._editor;
|
|
488
623
|
},
|
|
489
|
-
enumerable:
|
|
624
|
+
enumerable: false,
|
|
490
625
|
configurable: true
|
|
491
626
|
});
|
|
492
627
|
Object.defineProperty(FsHtmlEditorComponent.prototype, "froalaLoaded$", {
|
|
493
628
|
get: function () {
|
|
494
629
|
return this._fr.loaded$;
|
|
495
630
|
},
|
|
496
|
-
enumerable:
|
|
631
|
+
enumerable: false,
|
|
497
632
|
configurable: true
|
|
498
633
|
});
|
|
499
634
|
FsHtmlEditorComponent.prototype.ngOnInit = function () {
|
|
@@ -578,9 +713,9 @@
|
|
|
578
713
|
var err = {};
|
|
579
714
|
if (this.config.maxLength && this._html) {
|
|
580
715
|
var maxLength = this.config.maxLength;
|
|
581
|
-
var
|
|
582
|
-
if (
|
|
583
|
-
err.maxLengthError = "Must be " + maxLength + " characters or fewer. You entered " +
|
|
716
|
+
var length = this._html.length;
|
|
717
|
+
if (length > maxLength) {
|
|
718
|
+
err.maxLengthError = "Must be " + maxLength + " characters or fewer. You entered " + length + " characters.";
|
|
584
719
|
}
|
|
585
720
|
}
|
|
586
721
|
return Object.keys(err).length ? err : null;
|
|
@@ -686,6 +821,7 @@
|
|
|
686
821
|
// For some reason editor store somewhere pointer on default config object and dublicate options each time on init
|
|
687
822
|
// Extra merge level fixed this problem and allow to init config properly without legacy data
|
|
688
823
|
{}, {
|
|
824
|
+
shortcutsEnabled: ['show', 'bold', 'italic', 'underline', 'indent', 'outdent', 'undo', 'redo', 'insertImage', 'createLink'],
|
|
689
825
|
key: config.activationKey,
|
|
690
826
|
placeholderText: config.placeholder,
|
|
691
827
|
linkAlwaysBlank: true,
|
|
@@ -801,9 +937,9 @@
|
|
|
801
937
|
div.querySelectorAll('*')
|
|
802
938
|
.forEach(function (el) {
|
|
803
939
|
for (var i = 0; i < el.attributes.length; i++) {
|
|
804
|
-
var
|
|
805
|
-
if (
|
|
806
|
-
el.removeAttribute(
|
|
940
|
+
var name = el.attributes[0].name;
|
|
941
|
+
if (name !== 'href') {
|
|
942
|
+
el.removeAttribute(name);
|
|
807
943
|
}
|
|
808
944
|
}
|
|
809
945
|
});
|
|
@@ -862,97 +998,68 @@
|
|
|
862
998
|
this.focus();
|
|
863
999
|
}
|
|
864
1000
|
};
|
|
865
|
-
var FsHtmlEditorComponent_1;
|
|
866
|
-
FsHtmlEditorComponent.ctorParameters = function () { return [
|
|
867
|
-
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [FS_HTML_EDITOR_CONFIG,] }] },
|
|
868
|
-
{ type: core.ChangeDetectorRef },
|
|
869
|
-
{ type: FsFroalaLoaderService }
|
|
870
|
-
]; };
|
|
871
|
-
__decorate([
|
|
872
|
-
core.HostBinding('class.focused'),
|
|
873
|
-
__metadata("design:type", Object)
|
|
874
|
-
], FsHtmlEditorComponent.prototype, "classFocused", void 0);
|
|
875
|
-
__decorate([
|
|
876
|
-
core.HostBinding('class.disabled'),
|
|
877
|
-
__metadata("design:type", Object)
|
|
878
|
-
], FsHtmlEditorComponent.prototype, "classDisabled", void 0);
|
|
879
|
-
__decorate([
|
|
880
|
-
core.ViewChild('elRef'),
|
|
881
|
-
__metadata("design:type", core.ElementRef)
|
|
882
|
-
], FsHtmlEditorComponent.prototype, "elRef", void 0);
|
|
883
|
-
__decorate([
|
|
884
|
-
core.Input(),
|
|
885
|
-
__metadata("design:type", Object)
|
|
886
|
-
], FsHtmlEditorComponent.prototype, "config", void 0);
|
|
887
|
-
FsHtmlEditorComponent = FsHtmlEditorComponent_1 = __decorate([
|
|
888
|
-
core.Component({
|
|
889
|
-
selector: 'fs-html-editor',
|
|
890
|
-
template: "<div class=\"fs-html-editor-default\">\n <ng-container *ngIf=\"initialized\">\n <ng-container *fsSkeleton=\"(froalaLoaded$ | async) !== false\">\n </ng-container>\n </ng-container>\n\n <div #elRef></div>\n\n <div class=\"bottom-line\"></div>\n <div class=\"disabled-line\"></div>\n <fs-html-renderer\n *ngIf=\"!initialized\"\n [html]=\"html\"\n (click)=\"uninitializedClick($event)\">\n </fs-html-renderer>\n</div>\n",
|
|
891
|
-
providers: [
|
|
892
|
-
{
|
|
893
|
-
provide: forms.NG_VALUE_ACCESSOR,
|
|
894
|
-
useExisting: core.forwardRef(function () { return FsHtmlEditorComponent_1; }),
|
|
895
|
-
multi: true
|
|
896
|
-
},
|
|
897
|
-
{
|
|
898
|
-
provide: forms.NG_VALIDATORS,
|
|
899
|
-
useExisting: core.forwardRef(function () { return FsHtmlEditorComponent_1; }),
|
|
900
|
-
multi: true
|
|
901
|
-
},
|
|
902
|
-
],
|
|
903
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
904
|
-
styles: [":host ::ng-deep .fr-box.fr-basic .fr-wrapper{border:0;border-bottom:1px solid #949494;margin-bottom:1px;background-color:transparent}:host ::ng-deep .fr-box.fr-basic .fr-element{padding:0;font-family:inherit;color:inherit;font-size:inherit;line-height:inherit;min-height:auto}:host ::ng-deep .fr-dropdown-menu .fr-dropdown-wrapper,:host ::ng-deep .fr-dropdown:after,:host ::ng-deep .fr-more-toolbar,:host ::ng-deep .fr-toolbar{transition:none!important}:host ::ng-deep .fr-toolbar.fr-top{position:-webkit-sticky;position:sticky;z-index:2;border-radius:0;background-color:#fff}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp{margin:0 20px 0 0}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:nth-child(1):after,:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:nth-child(2):after{content:\"\";position:absolute;top:9px;height:30px;border-left:1px solid #e5e5e5;margin-left:10px}:host ::ng-deep .fr-toolbar.fr-top div:first-of-type:before{border:none}:host ::ng-deep .fr-toolbar.fr-top.fr-toolbar-open .fr-newline{height:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:first-child{margin-left:0}:host ::ng-deep .fr-toolbar.fr-top.fr-top{border:0}:host ::ng-deep .fr-toolbar.fr-top .fr-newline{margin:0}:host ::ng-deep .fr-toolbar.fr-top .fr-more-toolbar{z-index:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn{z-index:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-dropdown:after{right:3px}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-dropdown.fr-selection span{margin-right:24px}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-open{border-radius:4px;margin:4px 2px}:host ::ng-deep .fr-view ol,:host ::ng-deep .fr-view ul{list-style-position:unset}:host.disabled ::ng-deep .fr-box.fr-basic{opacity:.5;pointer-events:none}:host.disabled ::ng-deep .fr-box.fr-basic .fr-wrapper{border:none}:host.disabled ::ng-deep .disabled-line{display:block}::ng-deep .fr-popup{z-index:1001!important}::ng-deep .fr-video-by-url-layer .fr-checkbox-line{display:none}.disabled-line{display:none;position:absolute;bottom:-1px;z-index:1;background-image:linear-gradient(90deg,rgba(0,0,0,.42) 0,rgba(0,0,0,.42) 33%,transparent 0);background-size:4px 100%;background-repeat:repeat-x;height:1px;width:100%}.bottom-line{opacity:0;transform-origin:50%;transform:scaleX(.5);transition:background-color .3s cubic-bezier(.55,0,.55,.2);width:100%;border-bottom:2px solid #949494;position:absolute;bottom:-1px;z-index:1}:host{position:relative;display:block}:host.focused .bottom-line{opacity:1;display:block;transform:scaleX(1);transition:transform .3s cubic-bezier(.25,.8,.25,1),opacity .1s cubic-bezier(.25,.8,.25,1),background-color .3s cubic-bezier(.25,.8,.25,1)}::ng-deep .fs-html-editor-mention-container{position:absolute;top:0;left:0;height:auto;max-height:300px;max-width:500px;overflow:auto;display:block;z-index:999999;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);border-bottom-left-radius:4px;border-bottom-right-radius:4px;background:#fff}::ng-deep .fs-html-editor-mention-container ul{margin:0;padding:0;list-style:none}::ng-deep .fs-html-editor-mention-container li{padding:0 16px;cursor:pointer;line-height:48px}::ng-deep .fs-html-editor-mention-container li.highlight,::ng-deep .fs-html-editor-mention-container li:hover{background:#f5f5f5}::ng-deep .fs-html-editor-mention-container li.no-match{cursor:default}"]
|
|
905
|
-
}),
|
|
906
|
-
__param(0, core.Optional()), __param(0, core.Inject(FS_HTML_EDITOR_CONFIG)),
|
|
907
|
-
__metadata("design:paramtypes", [Object, core.ChangeDetectorRef,
|
|
908
|
-
FsFroalaLoaderService])
|
|
909
|
-
], FsHtmlEditorComponent);
|
|
910
1001
|
return FsHtmlEditorComponent;
|
|
911
|
-
}());
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
Object.defineProperty(FsHtmlRendererComponent.prototype, "setHtml", {
|
|
919
|
-
set: function (html) {
|
|
920
|
-
this.trustedHtml = this.sanitized.bypassSecurityTrustHtml(html);
|
|
921
|
-
this._cdRef.markForCheck();
|
|
1002
|
+
}());
|
|
1003
|
+
FsHtmlEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlEditorComponent, deps: [{ token: FS_HTML_EDITOR_CONFIG, optional: true }, { token: i0__namespace.ChangeDetectorRef }, { token: FsFroalaLoaderService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1004
|
+
FsHtmlEditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsHtmlEditorComponent, selector: "fs-html-editor", inputs: { config: "config" }, host: { properties: { "class.focused": "this.classFocused", "class.disabled": "this.classDisabled" } }, providers: [
|
|
1005
|
+
{
|
|
1006
|
+
provide: forms.NG_VALUE_ACCESSOR,
|
|
1007
|
+
useExisting: i0.forwardRef(function () { return FsHtmlEditorComponent; }),
|
|
1008
|
+
multi: true
|
|
922
1009
|
},
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
1010
|
+
{
|
|
1011
|
+
provide: forms.NG_VALIDATORS,
|
|
1012
|
+
useExisting: i0.forwardRef(function () { return FsHtmlEditorComponent; }),
|
|
1013
|
+
multi: true
|
|
1014
|
+
},
|
|
1015
|
+
], viewQueries: [{ propertyName: "elRef", first: true, predicate: ["elRef"], descendants: true }], ngImport: i0__namespace, template: "<div class=\"fs-html-editor-default\">\n <ng-container *ngIf=\"initialized\">\n <ng-container *fsSkeleton=\"(froalaLoaded$ | async) !== false\">\n </ng-container>\n </ng-container>\n\n <div #elRef></div>\n\n <div class=\"bottom-line\"></div>\n <div class=\"disabled-line\"></div>\n <fs-html-renderer\n *ngIf=\"!initialized\"\n [html]=\"html\"\n (click)=\"uninitializedClick($event)\">\n </fs-html-renderer>\n</div>\n", styles: [":host ::ng-deep .fr-box.fr-basic .fr-wrapper{border:0;border-bottom:1px solid #949494;margin-bottom:1px;background-color:transparent}:host ::ng-deep .fr-box.fr-basic .fr-element{padding:0;font-family:inherit;color:inherit;font-size:inherit;line-height:inherit;min-height:auto}:host ::ng-deep .fr-more-toolbar,:host ::ng-deep .fr-toolbar,:host ::ng-deep .fr-dropdown:after,:host ::ng-deep .fr-dropdown-menu .fr-dropdown-wrapper{transition:none!important}:host ::ng-deep .fr-toolbar.fr-top{position:sticky;z-index:2;border-radius:0;background-color:#fff}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp{margin:0 20px 0 0}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:nth-child(1):after,:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:nth-child(2):after{content:\"\";position:absolute;top:9px;height:30px;border-left:1px solid #e5e5e5;margin-left:10px}:host ::ng-deep .fr-toolbar.fr-top div:first-of-type:before{border:none}:host ::ng-deep .fr-toolbar.fr-top.fr-toolbar-open .fr-newline{height:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-btn-grp:first-child{margin-left:0}:host ::ng-deep .fr-toolbar.fr-top.fr-top{border:0}:host ::ng-deep .fr-toolbar.fr-top .fr-newline{margin:0}:host ::ng-deep .fr-toolbar.fr-top .fr-more-toolbar{z-index:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn{z-index:auto}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-dropdown:after{right:3px}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-dropdown.fr-selection span{margin-right:24px}:host ::ng-deep .fr-toolbar.fr-top .fr-command.fr-btn.fr-open{border-radius:4px;margin:4px 2px}:host ::ng-deep .fr-view ol,:host ::ng-deep .fr-view ul{list-style-position:unset}:host.disabled ::ng-deep .fr-box.fr-basic{opacity:.5;pointer-events:none}:host.disabled ::ng-deep .fr-box.fr-basic .fr-wrapper{border:none}:host.disabled ::ng-deep .disabled-line{display:block}::ng-deep .fr-popup{z-index:1001!important}::ng-deep .fr-video-by-url-layer .fr-checkbox-line{display:none}.disabled-line{display:none;position:absolute;bottom:-1px;z-index:1;background-image:linear-gradient(90deg,rgba(0,0,0,.42) 0,rgba(0,0,0,.42) 33%,transparent 0);background-size:4px 100%;background-repeat:repeat-x;height:1px;width:100%}.bottom-line{opacity:0;transform-origin:50%;transform:scaleX(.5);transition:background-color .3s cubic-bezier(.55,0,.55,.2);width:100%;border-bottom:2px solid #949494;position:absolute;bottom:-1px;z-index:1}:host{position:relative;display:block}:host.focused .bottom-line{opacity:1;display:block;transform:scaleX(1);transition:transform .3s cubic-bezier(.25,.8,.25,1),opacity .1s cubic-bezier(.25,.8,.25,1),background-color .3s cubic-bezier(.25,.8,.25,1)}::ng-deep .fs-html-editor-mention-container{position:absolute;top:0;left:0;height:auto;max-height:300px;max-width:500px;overflow:auto;display:block;z-index:999999;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;border-bottom-left-radius:4px;border-bottom-right-radius:4px;background:#fff}::ng-deep .fs-html-editor-mention-container ul{margin:0;padding:0;list-style:none}::ng-deep .fs-html-editor-mention-container li{padding:0 16px;cursor:pointer;line-height:48px}::ng-deep .fs-html-editor-mention-container li.highlight,::ng-deep .fs-html-editor-mention-container li:hover{background:#F5F5F5}::ng-deep .fs-html-editor-mention-container li.no-match{cursor:default}\n"], components: [{ type: FsHtmlRendererComponent, selector: "fs-html-renderer", inputs: ["html"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }], pipes: { "async": i3__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1016
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlEditorComponent, decorators: [{
|
|
1017
|
+
type: i0.Component,
|
|
1018
|
+
args: [{
|
|
1019
|
+
selector: 'fs-html-editor',
|
|
1020
|
+
templateUrl: 'html-editor.component.html',
|
|
1021
|
+
styleUrls: ['html-editor.component.scss'],
|
|
1022
|
+
providers: [
|
|
1023
|
+
{
|
|
1024
|
+
provide: forms.NG_VALUE_ACCESSOR,
|
|
1025
|
+
useExisting: i0.forwardRef(function () { return FsHtmlEditorComponent; }),
|
|
1026
|
+
multi: true
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
provide: forms.NG_VALIDATORS,
|
|
1030
|
+
useExisting: i0.forwardRef(function () { return FsHtmlEditorComponent; }),
|
|
1031
|
+
multi: true
|
|
1032
|
+
},
|
|
1033
|
+
],
|
|
1034
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1035
|
+
}]
|
|
1036
|
+
}], ctorParameters: function () {
|
|
1037
|
+
return [{ type: undefined, decorators: [{
|
|
1038
|
+
type: i0.Optional
|
|
1039
|
+
}, {
|
|
1040
|
+
type: i0.Inject,
|
|
1041
|
+
args: [FS_HTML_EDITOR_CONFIG]
|
|
1042
|
+
}] }, { type: i0__namespace.ChangeDetectorRef }, { type: FsFroalaLoaderService }];
|
|
1043
|
+
}, propDecorators: { classFocused: [{
|
|
1044
|
+
type: i0.HostBinding,
|
|
1045
|
+
args: ['class.focused']
|
|
1046
|
+
}], classDisabled: [{
|
|
1047
|
+
type: i0.HostBinding,
|
|
1048
|
+
args: ['class.disabled']
|
|
1049
|
+
}], elRef: [{
|
|
1050
|
+
type: i0.ViewChild,
|
|
1051
|
+
args: ['elRef']
|
|
1052
|
+
}], config: [{
|
|
1053
|
+
type: i0.Input
|
|
1054
|
+
}] } });
|
|
947
1055
|
|
|
948
1056
|
var FsHtmlEditorModule = /** @class */ (function () {
|
|
949
1057
|
function FsHtmlEditorModule() {
|
|
950
1058
|
}
|
|
951
|
-
FsHtmlEditorModule_1 = FsHtmlEditorModule;
|
|
952
1059
|
FsHtmlEditorModule.forRoot = function (config) {
|
|
953
1060
|
if (config === void 0) { config = {}; }
|
|
954
1061
|
return {
|
|
955
|
-
ngModule:
|
|
1062
|
+
ngModule: FsHtmlEditorModule,
|
|
956
1063
|
providers: [
|
|
957
1064
|
{ provide: FS_HTML_EDITOR_DEFAULT_CONFIG, useValue: config },
|
|
958
1065
|
{
|
|
@@ -963,27 +1070,36 @@
|
|
|
963
1070
|
]
|
|
964
1071
|
};
|
|
965
1072
|
};
|
|
966
|
-
var FsHtmlEditorModule_1;
|
|
967
|
-
FsHtmlEditorModule = FsHtmlEditorModule_1 = __decorate([
|
|
968
|
-
core.NgModule({
|
|
969
|
-
imports: [
|
|
970
|
-
common.CommonModule,
|
|
971
|
-
skeleton.FsSkeletonModule,
|
|
972
|
-
],
|
|
973
|
-
exports: [
|
|
974
|
-
FsHtmlEditorComponent,
|
|
975
|
-
FsHtmlRendererComponent,
|
|
976
|
-
],
|
|
977
|
-
declarations: [
|
|
978
|
-
FsHtmlEditorComponent,
|
|
979
|
-
FsHtmlRendererComponent,
|
|
980
|
-
],
|
|
981
|
-
})
|
|
982
|
-
], FsHtmlEditorModule);
|
|
983
1073
|
return FsHtmlEditorModule;
|
|
984
1074
|
}());
|
|
1075
|
+
FsHtmlEditorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlEditorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1076
|
+
FsHtmlEditorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlEditorModule, declarations: [FsHtmlEditorComponent,
|
|
1077
|
+
FsHtmlRendererComponent], imports: [i3.CommonModule,
|
|
1078
|
+
i4.FsSkeletonModule], exports: [FsHtmlEditorComponent,
|
|
1079
|
+
FsHtmlRendererComponent] });
|
|
1080
|
+
FsHtmlEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlEditorModule, imports: [[
|
|
1081
|
+
i3.CommonModule,
|
|
1082
|
+
i4.FsSkeletonModule,
|
|
1083
|
+
]] });
|
|
1084
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsHtmlEditorModule, decorators: [{
|
|
1085
|
+
type: i0.NgModule,
|
|
1086
|
+
args: [{
|
|
1087
|
+
imports: [
|
|
1088
|
+
i3.CommonModule,
|
|
1089
|
+
i4.FsSkeletonModule,
|
|
1090
|
+
],
|
|
1091
|
+
exports: [
|
|
1092
|
+
FsHtmlEditorComponent,
|
|
1093
|
+
FsHtmlRendererComponent,
|
|
1094
|
+
],
|
|
1095
|
+
declarations: [
|
|
1096
|
+
FsHtmlEditorComponent,
|
|
1097
|
+
FsHtmlRendererComponent,
|
|
1098
|
+
],
|
|
1099
|
+
}]
|
|
1100
|
+
}] });
|
|
985
1101
|
function FsHtmlEditorConfigFactory(config) {
|
|
986
|
-
return
|
|
1102
|
+
return Object.assign({ defaultPlugins: [
|
|
987
1103
|
"align" /* Align */,
|
|
988
1104
|
"colors" /* Colors */,
|
|
989
1105
|
"image" /* Image */,
|
|
@@ -1012,7 +1128,7 @@
|
|
|
1012
1128
|
function MentionPlugin(config) {
|
|
1013
1129
|
var _this = _super.call(this) || this;
|
|
1014
1130
|
_this.config = config;
|
|
1015
|
-
_this._guid = common
|
|
1131
|
+
_this._guid = common.guid();
|
|
1016
1132
|
_this.selected = function (event) {
|
|
1017
1133
|
if (_this.config.selected) {
|
|
1018
1134
|
if (MentionPlugin._currentGuid === _this._guid) {
|
|
@@ -1020,7 +1136,7 @@
|
|
|
1020
1136
|
}
|
|
1021
1137
|
}
|
|
1022
1138
|
};
|
|
1023
|
-
_this.config =
|
|
1139
|
+
_this.config = Object.assign(Object.assign({}, config), { buttons: [
|
|
1024
1140
|
{
|
|
1025
1141
|
name: config.name,
|
|
1026
1142
|
tooltip: config.tooltip,
|
|
@@ -1031,7 +1147,7 @@
|
|
|
1031
1147
|
}
|
|
1032
1148
|
}
|
|
1033
1149
|
] });
|
|
1034
|
-
_this._tribute = new
|
|
1150
|
+
_this._tribute = new Tribute__default["default"]({
|
|
1035
1151
|
values: lodashEs.debounce(_this._loadValues.bind(_this), 200),
|
|
1036
1152
|
searchOpts: {
|
|
1037
1153
|
pre: '',
|
|
@@ -1089,10 +1205,10 @@
|
|
|
1089
1205
|
cb(data);
|
|
1090
1206
|
});
|
|
1091
1207
|
};
|
|
1092
|
-
MentionPlugin._currentGuid = null;
|
|
1093
|
-
MentionPlugin._tributes = [];
|
|
1094
1208
|
return MentionPlugin;
|
|
1095
|
-
}(Plugin));
|
|
1209
|
+
}(Plugin));
|
|
1210
|
+
MentionPlugin._currentGuid = null;
|
|
1211
|
+
MentionPlugin._tributes = [];
|
|
1096
1212
|
|
|
1097
1213
|
var ChecklistPlugin = /** @class */ (function (_super) {
|
|
1098
1214
|
__extends(ChecklistPlugin, _super);
|
|
@@ -1100,7 +1216,7 @@
|
|
|
1100
1216
|
if (config === void 0) { config = { name: 'checklist' }; }
|
|
1101
1217
|
var _this = _super.call(this) || this;
|
|
1102
1218
|
_this.config = config;
|
|
1103
|
-
_this.config =
|
|
1219
|
+
_this.config = Object.assign(Object.assign({}, config), { name: 'checklist', buttons: [
|
|
1104
1220
|
{
|
|
1105
1221
|
name: 'checklist',
|
|
1106
1222
|
svgPath: 'M8.4,10.3l-1.2,1.2l4,4L20,6.7l-1.2-1.2l-7.6,7.6L8.4,10.3z M18.2,18.2H5.8V5.8h8.9V4H5.8C4.8,4,4,4.8,4,5.8v12.4c0,1,0.8,1.8,1.8,1.8h12.4c1,0,1.8-0.8,1.8-1.8v-7.1h-1.8V18.2z',
|
|
@@ -1115,7 +1231,7 @@
|
|
|
1115
1231
|
this.editor.events.on('click', function (e) {
|
|
1116
1232
|
var li = e.target;
|
|
1117
1233
|
if (li.nodeName === 'LI' && e.offsetX < 0) {
|
|
1118
|
-
var items =
|
|
1234
|
+
var items = __spreadArray([li], __read(li.querySelectorAll('li')));
|
|
1119
1235
|
if (li.classList.contains('checked')) {
|
|
1120
1236
|
items.forEach(function (item) {
|
|
1121
1237
|
item.classList.remove('checked');
|
|
@@ -1138,7 +1254,7 @@
|
|
|
1138
1254
|
if (config === void 0) { config = { name: 'code' }; }
|
|
1139
1255
|
var _this = _super.call(this) || this;
|
|
1140
1256
|
_this.config = config;
|
|
1141
|
-
_this.config =
|
|
1257
|
+
_this.config = Object.assign(Object.assign({}, config), { name: 'code', buttons: [
|
|
1142
1258
|
{
|
|
1143
1259
|
name: 'code',
|
|
1144
1260
|
svgPath: 'M8.9,7.3L4.2,12l4.7,4.7l1.1-1.1L6.4,12L10,8.4L8.9,7.3z M15.1,7.3L14,8.4l3.6,3.6L14,15.6l1.1,1.1l4.7-4.7L15.1,7.3z',
|
|
@@ -1205,7 +1321,7 @@
|
|
|
1205
1321
|
if (config === void 0) { config = {}; }
|
|
1206
1322
|
var _this = _super.call(this) || this;
|
|
1207
1323
|
_this.config = config;
|
|
1208
|
-
_this.config =
|
|
1324
|
+
_this.config = Object.assign(Object.assign({}, config), { name: config.name || 'screenRecord', buttons: [
|
|
1209
1325
|
{
|
|
1210
1326
|
name: 'screenRecord',
|
|
1211
1327
|
svgPath: "M14.7,7.7v6.1H7.1V7.7H14.7 M16.3,9.6V6.9c0-0.4-0.3-0.8-0.8-0.8H6.4c-0.4,0-0.8,0.3-0.8,0.8v7.6c0,0.4,0.3,0.8,0.8,0.8h9.1c0.4,0,0.8-0.3,0.8-0.8v-2.7l1.7,1.7c0.3,0.3,0.8,0.3,1.1,0c0.1-0.1,0.2-0.3,0.2-0.5V8.4c0-0.4-0.3-0.8-0.8-0.8\n\tc-0.2,0-0.4,0.1-0.5,0.2L16.3,9.6z M21.5,1.6H2.9c-0.7,0-1.3,0.7-1.3,1.6v14.6c0,0.9,0.6,1.6,1.3,1.6h7.6v1.1l-5,1c-0.2,0-0.4,0.3-0.4,0.6c0,0.3,0.2,0.4,0.4,0.4c0,0,0,0,0.1,0l5.3-1h2.6l5.3,1c0,0,0,0,0.1,0c0.2,0,0.4-0.2,0.4-0.4\n c0-0.3-0.1-0.6-0.4-0.6l-5-1v-1.1h7.6c0.7,0,1.3-0.7,1.3-1.6V3.2C22.9,2.3,22.3,1.6,21.5,1.6z M21.1,17.3H3.3V3.7h17.8L21.1,17.3L21.1,17.3z",
|
|
@@ -1301,6 +1417,10 @@
|
|
|
1301
1417
|
return ScreenRecordPlugin;
|
|
1302
1418
|
}(Plugin));
|
|
1303
1419
|
|
|
1420
|
+
/**
|
|
1421
|
+
* Generated bundle index. Do not edit.
|
|
1422
|
+
*/
|
|
1423
|
+
|
|
1304
1424
|
exports.ChecklistPlugin = ChecklistPlugin;
|
|
1305
1425
|
exports.CodePlugin = CodePlugin;
|
|
1306
1426
|
exports.FS_HTML_EDITOR_CONFIG = FS_HTML_EDITOR_CONFIG;
|
|
@@ -1312,12 +1432,8 @@
|
|
|
1312
1432
|
exports.RichButtons = RichButtons;
|
|
1313
1433
|
exports.ScreenRecordPlugin = ScreenRecordPlugin;
|
|
1314
1434
|
exports.TextButtons = TextButtons;
|
|
1315
|
-
exports.ɵa = FsHtmlEditorConfigFactory;
|
|
1316
|
-
exports.ɵb = FS_HTML_EDITOR_DEFAULT_CONFIG;
|
|
1317
|
-
exports.ɵc = FsFroalaLoaderService;
|
|
1318
|
-
exports.ɵe = Plugin;
|
|
1319
1435
|
|
|
1320
1436
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1321
1437
|
|
|
1322
|
-
}))
|
|
1438
|
+
}));
|
|
1323
1439
|
//# sourceMappingURL=firestitch-html-editor.umd.js.map
|