@mediafly/js-ui 50.2.1-1 → 50.2.1-3

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.
@@ -1,29 +1,10 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
2
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
15
3
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
4
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
5
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
19
7
  };
20
- var __importStar = (this && this.__importStar) || function (mod) {
21
- if (mod && mod.__esModule) return mod;
22
- var result = {};
23
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
24
- __setModuleDefault(result, mod);
25
- return result;
26
- };
27
8
  var __metadata = (this && this.__metadata) || function (k, v) {
28
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
29
10
  };
@@ -34,12 +15,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
34
15
  return (mod && mod.__esModule) ? mod : { "default": mod };
35
16
  };
36
17
  Object.defineProperty(exports, "__esModule", { value: true });
37
- // tslint:disable: max-file-line-count
38
18
  const angular_1 = __importDefault(require("angular"));
39
19
  const lodash_1 = __importDefault(require("lodash"));
40
- const quill_1 = __importStar(require("quill"));
20
+ const quill_1 = __importDefault(require("quill"));
21
+ const jquery_1 = __importDefault(require("jquery"));
41
22
  const decorators_1 = require("../decorators");
42
- const uuid_1 = require("uuid");
43
23
  // text editor requires sanitization but also needs to allow for style attributes which are removed by default
44
24
  angular_1.default.module('app').config(['$sanitizeProvider', ($sanitizeProvider) => {
45
25
  $sanitizeProvider.addValidAttrs(['style']);
@@ -51,16 +31,10 @@ let RichTextComponentController = class RichTextComponentController {
51
31
  this.$sanitize = $sanitize;
52
32
  this.$timeout = $timeout;
53
33
  this.translateFactory = translateFactory;
54
- this.debouncedSanitizeAndValidate = lodash_1.default.debounce(() => this.sanitizeAndValidate(), 250);
34
+ this.debouncedOnTextChange = lodash_1.default.debounce((delta, oldContents, source) => this.onTextChange(delta, oldContents, source), 250);
55
35
  this.DEFAULT_COLOR = '#535353';
56
36
  this.DEFAULT_FONT = 'Roboto';
57
37
  this.DEFAULT_SIZE = '14px';
58
- this.HEADING_1_COLOR = '#535353';
59
- this.HEADING_1_FONT = 'Poppins';
60
- this.HEADING_1_SIZE = '24px';
61
- this.HEADING_2_COLOR = '#535353';
62
- this.HEADING_2_FONT = 'Poppins';
63
- this.HEADING_2_SIZE = '14px';
64
38
  }
65
39
  $onChanges(changes) {
66
40
  if (!changes.isRequired) {
@@ -69,319 +43,177 @@ let RichTextComponentController = class RichTextComponentController {
69
43
  if (changes.isRequired.currentValue === changes.isRequired.previousValue) {
70
44
  return;
71
45
  }
72
- this.checkValidity();
46
+ this.manageValidity();
73
47
  }
74
48
  $onDestroy() {
75
- var _a, _b;
76
- this.editor.off('text-change', (delta, oldContents, source) => { this.onTextChange(delta, oldContents, source); });
77
- (_a = this.colorPicker) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this.colorChanged.bind(this));
78
- (_b = this.colorPicker) === null || _b === void 0 ? void 0 : _b.removeEventListener('click', this.colorInputOpened.bind(this));
49
+ this.editor.off('text-change', this.debouncedOnTextChange);
50
+ this.colorPicker.removeEventListener('change', this.colorChanged.bind(this));
51
+ this.colorPicker.removeEventListener('click', this.colorInputOpened.bind(this));
79
52
  }
80
53
  $onInit() {
81
54
  this.requiredText = this.translateFactory.instant('JSUI.REQUIRED');
82
- this.colorInputId = 'rteColorInput-' + uuid_1.v4();
83
- this.editorSizeId = 'rteEditorSize-' + uuid_1.v4();
84
- this.fontSelectorId = 'rteFontSelector-' + uuid_1.v4();
85
- this.toolbarId = 'rteToolbar-' + uuid_1.v4();
86
- this.$timeout(() => {
87
- var _a, _b;
88
- this.colorPicker = document.getElementById(this.colorInputId);
89
- (_a = this.colorPicker) === null || _a === void 0 ? void 0 : _a.addEventListener('change', this.colorChanged.bind(this));
90
- (_b = this.colorPicker) === null || _b === void 0 ? void 0 : _b.addEventListener('click', this.colorInputOpened.bind(this));
91
- this.updateFontPicker(this.DEFAULT_FONT);
92
- this.updateSizePicker(this.DEFAULT_SIZE);
93
- this.updateColorPicker(this.DEFAULT_COLOR);
94
- });
55
+ this.selectedColor = this.DEFAULT_COLOR;
56
+ this.selectedFont = this.DEFAULT_FONT;
57
+ this.fontSelectorId = 'rteFontSelector' + Math.floor(Math.random() * 1000 + 1);
58
+ this.colorPicker = document.getElementById('rteColorInput');
59
+ this.colorPicker.addEventListener('change', this.colorChanged.bind(this));
60
+ this.colorPicker.addEventListener('click', this.colorInputOpened.bind(this));
61
+ // programatically reset size
62
+ jquery_1.default('.ql-size').val(this.DEFAULT_SIZE);
95
63
  }
96
64
  $postLink() {
97
65
  quill_1.default.register(quill_1.default.import('attributors/class/background'), true);
98
66
  quill_1.default.register(quill_1.default.import('attributors/style/color'), true);
99
67
  const fontStyle = quill_1.default.import('attributors/style/font');
100
- // Setting the whitelist to undefined allows all fonts. (We don't know what fonts Google Fonts will give us.)
101
- fontStyle.whitelist = undefined;
68
+ fontStyle.whitelist = null; // fonts not in the allow-list get dropped on other edits (CE-6314)
102
69
  quill_1.default.register(fontStyle, true);
103
70
  const fontSizeArr = ['10px', '12px', '14px', '16px', '20px', '24px', '32px', '42px', '54px', '68px', '84px', '98px'];
104
- const size = quill_1.default.import('attributors/style/size');
105
- size.whitelist = fontSizeArr;
106
- quill_1.default.register(size, true);
71
+ const Size = quill_1.default.import('attributors/style/size');
72
+ Size.whitelist = fontSizeArr;
73
+ quill_1.default.register(Size, true);
107
74
  const options = {
108
75
  modules: {
109
- toolbar: `#${this.toolbarId}`,
76
+ toolbar: '#toolbar'
110
77
  },
111
78
  theme: 'snow',
112
79
  };
113
- this.$timeout(() => {
114
- this.editor = new quill_1.default(this.$element.find('.js-rich-text-target')[0], options);
115
- // Disable spellcheck because of a bad bug that deletes text (CE-4692).
116
- this.editor.root.setAttribute('spellcheck', 'false');
117
- this.editor.on('text-change', (delta, oldContents, source) => { this.onTextChange(delta, oldContents, source); });
118
- this.editor.on('selection-change', this.selectionChange.bind(this));
119
- });
80
+ this.editor = new quill_1.default(this.$element.find('.js-rich-text-target')[0], options);
81
+ // Disable spellcheck because of a bad bug that deletes text (CE-4692).
82
+ this.editor.root.setAttribute('spellcheck', false);
83
+ this.editor.on('text-change', this.debouncedOnTextChange);
84
+ this.editor.on('selection-change', this.selectionChange.bind(this));
120
85
  this.ngModelCtrl.$render = () => {
121
- this.$timeout(() => {
122
- if (!this.ngModelCtrl.$viewValue) {
123
- this.editor.setText('\n');
124
- return;
125
- }
126
- this.editor.root.innerHTML = this.ngModelCtrl.$viewValue;
127
- });
86
+ if (!this.ngModelCtrl.$viewValue) {
87
+ this.editor.setText('\n');
88
+ return;
89
+ }
90
+ this.editor.root.innerHTML = this.ngModelCtrl.$viewValue;
128
91
  };
129
92
  }
130
93
  colorChanged() {
131
- // Re-apply the text selection that was made before selecting a color,
132
- // as the act of hiding some browsers' color inputs can change the selected text
133
- if (this.cachedSelection) {
134
- this.editor.setSelection(this.cachedSelection.index, this.cachedSelection.length);
135
- }
136
- this.editor.format('color', this.selectedColor);
137
- this.debouncedSanitizeAndValidate();
94
+ this.applyColor();
138
95
  }
139
96
  colorInputOpened() {
140
- this.cachedSelection = this.editor.getSelection();
97
+ this.cacheSelection();
141
98
  }
142
99
  fontSelected(fontFamily) {
143
100
  if (!fontFamily) {
144
101
  return;
145
102
  }
146
103
  this.$rootScope.$broadcast('richTextToolbarContainer:closeContainer');
104
+ const fontAtributor = quill_1.default.import('attributors/style/font');
105
+ fontAtributor.whitelist = [fontFamily];
106
+ this.updateFontDisplay(fontFamily);
107
+ quill_1.default.register(fontAtributor, true);
147
108
  this.editor.format('font', fontFamily);
148
- this.debouncedSanitizeAndValidate();
109
+ this.sanitizeContents();
149
110
  }
150
- /** The user entered/deleted/modified some text. Handle any formatting issues, then store the model. */
151
- onTextChange(delta, _oldContents, source) {
152
- if (source !== 'user') {
153
- return;
154
- }
155
- this.$timeout(() => {
156
- // When we choose "Heading 1" or "Heading 2", we also need to set the font, size, and color.
157
- this.fixHeadingFormat(delta);
158
- // Quill's "Clear formatting" button leaves us inheriting styles from the CSS. We want to keep things explicit.
159
- this.fixClearFormatting(delta);
160
- // Also, things like adding a line break can leave us with no style.
161
- this.fixMissingFormats();
162
- });
163
- this.debouncedSanitizeAndValidate();
111
+ manageValidity() {
112
+ const isValid = !this.isRequired || !!this.ngModelCtrl.$viewValue;
113
+ this.ngModelCtrl.$setValidity('required', isValid);
164
114
  }
165
- /** The user moved the cursor. Fix missing formats and update the toolbar to reflect the current selection. */
166
- selectionChange(range, _oldRange, source) {
115
+ onTextChange(_delta, _oldContents, source) {
167
116
  if (source !== 'user') {
168
117
  return;
169
118
  }
170
- if (!range) {
171
- return;
172
- }
173
- this.fixMissingFormats();
174
- this.$timeout(() => {
175
- // Quill updates the toolbar to reflect most formatting (bold, italics, bullet points, etc.), but
176
- // fonts, text size, and color are handled by plugins so we need to update those ourselves.
177
- const format = this.editor.getFormat(range);
178
- this.updateFontPicker(this.getFontFromFormat(format));
179
- this.updateColorPicker(this.getColorFromFormat(format));
180
- this.updateSizePicker(this.getSizeFromFormat(format));
181
- });
182
- }
183
- checkValidity() {
184
- const isValid = !this.isRequired || !!this.ngModelCtrl.$viewValue;
185
- this.$timeout(() => {
186
- this.ngModelCtrl.$setValidity('required', isValid);
187
- });
188
- }
189
- /**
190
- * Quill's "Clear formatting" button leaves us with no font, size, or color, so the style is inherited from the CSS.
191
- * We don't want that: we want everything to be fully defined, so that the user-entered text can be faithfully
192
- * reproduced elsewhere.
193
- */
194
- fixClearFormatting(delta) {
195
- // Using the "Clear formatting" button creates a delta that sets font, size, and color to `null`. Detect any of those.
196
- // (Usually you'd get all three together, but some might be missing from the delta if they were already clear,
197
- // for example if we were editing an old Workspace Text Section that was created using an older version of this component.)
198
- if (delta.ops.some((op) => {
199
- var _a, _b, _c;
200
- return op.retain && (((_a = op.attributes) === null || _a === void 0 ? void 0 : _a.font) === null || ((_b = op.attributes) === null || _b === void 0 ? void 0 : _b.size) === null || ((_c = op.attributes) === null || _c === void 0 ? void 0 : _c.color) === null);
201
- })) {
202
- this.editor.format('font', this.DEFAULT_FONT);
203
- this.updateFontPicker(this.DEFAULT_FONT);
204
- this.editor.format('size', this.DEFAULT_SIZE);
205
- this.updateSizePicker(this.DEFAULT_SIZE);
206
- this.editor.format('color', this.DEFAULT_COLOR);
207
- this.updateColorPicker(this.DEFAULT_COLOR);
208
- }
209
- }
210
- /**
211
- * Quill's "Heading 1" and "Heading 2" just change the <p> to <h1> or <h2>. The inner <span> will still have a `style` on it,
212
- * setting the font, size, and color. Quill prefers no `style` tags, so it expects the CSS to cover that. We use `style` for
213
- * all our formatting, so we also need to define appropriate values for the Headings.
214
- */
215
- fixHeadingFormat(delta) {
216
- var _a;
217
- // Look for an operation that sets a heading style (header = 1 or 2), or clears it (header = null)
218
- const headingOp = delta.ops.find((op) => { var _a; return ((_a = op.attributes) === null || _a === void 0 ? void 0 : _a.header) !== undefined; });
219
- if (!headingOp) {
119
+ const userClearedEditor = (this.editor.root.innerHTML === `<p><br></p>`);
120
+ if (userClearedEditor) {
121
+ // reset the color picker to the default by passing an undefined range
122
+ this.editor.root.innerHTML = '';
123
+ this.updateColorDisplay(undefined);
124
+ this.ngModelCtrl.$setViewValue(undefined);
125
+ this.manageValidity();
126
+ this.formatToDefaults();
220
127
  return;
221
128
  }
129
+ this.sanitizeContents();
222
130
  const selection = this.editor.getSelection();
223
131
  if (!selection) {
224
132
  return;
225
133
  }
226
- // The selection might cover multiple paragraphs, so get them all
227
- let lines = this.editor.getLines(selection);
228
- if (lines.length === 0) {
229
- // The selection has zero length, so get the current paragraph
230
- const line = this.editor.getLine(selection.index);
231
- // (Perversely, `line` is an array, containing the actual line followed by a number :shrug:)
232
- if (!line || !line[0]) {
233
- return;
234
- }
235
- lines = [line[0]];
236
- }
237
- let font = this.DEFAULT_FONT;
238
- let size = this.DEFAULT_SIZE;
239
- let color = this.DEFAULT_COLOR;
240
- switch ((_a = headingOp.attributes) === null || _a === void 0 ? void 0 : _a.header) {
241
- case 1:
242
- font = this.HEADING_1_FONT;
243
- size = this.HEADING_1_SIZE;
244
- color = this.HEADING_1_COLOR;
245
- break;
246
- case 2:
247
- font = this.HEADING_2_FONT;
248
- size = this.HEADING_2_SIZE;
249
- color = this.HEADING_2_COLOR;
250
- break;
134
+ const format = this.editor.getFormat(selection.index, 0);
135
+ // the following checks for an empty formatting
136
+ if (lodash_1.default.isEmpty(format)) {
137
+ // if format is empty then set back to default styles
138
+ this.formatToDefaults();
251
139
  }
252
- for (const line of lines) {
253
- const range = new quill_1.Range(line.offset(), line.length());
254
- this.editor.formatText(range, 'font', font);
255
- this.editor.formatText(range, 'size', size);
256
- this.editor.formatText(range, 'color', color);
257
- }
258
- this.updateFontPicker(font);
259
- this.updateSizePicker(size);
260
- this.updateColorPicker(color);
261
140
  }
262
- /**
263
- * Quill likes to default to no formatting: an empty paragraph has no font, size, or color, so the style is inherited
264
- * from the CSS.
265
- * We don't want that: we want everything to be fully defined, so that the user-entered text can be faithfully
266
- * reproduced elsewhere.
267
- * We try to get the format from the previous line, or fall back to the default.
268
- */
269
- fixMissingFormats() {
270
- // When debugging this, it can be useful to add this to your CSS to highlight problems:
271
- // .ql-editor { color: #f0f; font-family: 'Wingdings', sans-serif; font-size: 9px; }
272
- const selection = this.editor.getSelection();
273
- if (!selection || selection.length) {
274
- // Some text is selected; we don't want to change this
141
+ selectionChange(range, oldRange, source) {
142
+ if (source !== 'user') {
275
143
  return;
276
144
  }
277
- const format = this.editor.getFormat();
278
- if (format.font && format.size && format.color) {
279
- // We are fully formatted; nothing more to do
145
+ if (!range) {
280
146
  return;
281
147
  }
282
- // Copy missing format from the previous character (or the next, if we're at the start of the document)
283
- const nearbyCharIndex = selection.index === 0 ? 1 : selection.index - 1;
284
- const nearbyRange = {
285
- index: nearbyCharIndex,
286
- length: 0,
287
- };
288
- const nearbyFormat = this.editor.getFormat(nearbyRange);
289
- this.editor.format('bold', nearbyFormat.bold);
290
- this.editor.format('italic', nearbyFormat.italic);
291
- this.editor.format('underline', nearbyFormat.underline);
292
- if (!format.font) {
293
- const font = this.getFontFromFormat(nearbyFormat);
294
- this.editor.format('font', font);
295
- this.updateFontPicker(font);
296
- }
148
+ const leaf = this.editor.getLeaf(range.index);
149
+ const font = this.getFontFromLeaf(leaf);
150
+ const format = this.editor.getFormat(range);
151
+ this.updateColorDisplay(range);
152
+ // if get format is empty we can switch to the defaults
297
153
  if (!format.size) {
298
- const size = this.getSizeFromFormat(nearbyFormat);
299
- this.editor.format('size', size);
300
- this.updateSizePicker(size);
154
+ jquery_1.default('.ql-size').val(this.DEFAULT_SIZE);
155
+ jquery_1.default('#editorSize .ql-picker-label').attr('data-value', this.DEFAULT_SIZE);
156
+ jquery_1.default('#editorSize .ql-picker-label').attr('data-label', this.DEFAULT_SIZE);
301
157
  }
302
- if (!format.color) {
303
- const color = this.getColorFromFormat(nearbyFormat);
304
- this.editor.format('color', color);
305
- this.updateColorPicker(color);
306
- }
307
- }
308
- getColorFromFormat(format) {
309
- if (!format.color) {
310
- // We get no color if the default color is selected; or if the selection contains multiple colors, one of which is the default.
311
- return this.DEFAULT_COLOR;
312
- }
313
- if (typeof format.color === 'string') {
314
- // The selected range is all the same color, which is not the default.
315
- return format.color;
316
- }
317
- if (Array.isArray(format.color)) {
318
- // The selected range contains multiple colors, none of which are the default. Return the default, to be consistent with other multi-color selections.
319
- return this.DEFAULT_COLOR;
158
+ if (font) {
159
+ this.updateFontDisplay(font.replace(/"/g, ''));
160
+ return;
320
161
  }
321
- // Fall back to the default (should never get here)
322
- return this.DEFAULT_COLOR;
323
- }
324
- getFontFromFormat(format) {
325
162
  if (!format.font) {
326
- // No font is defined for the selection, so show the default. This can happen if you're on a new empty line.
327
- return this.DEFAULT_FONT;
328
- }
329
- if (typeof format.font === 'string') {
330
- // The range uses a single font.
331
- return format.font;
332
- }
333
- if (Array.isArray(format.font)) {
334
- // The selected range contains multiple fonts, so show blank.
335
- return '';
163
+ this.editor.format('font', this.DEFAULT_FONT);
336
164
  }
337
- // Fall back to the default (should never get here)
338
- return this.DEFAULT_FONT;
339
165
  }
340
- getSizeFromFormat(format) {
341
- if (!format.size) {
342
- // We get no size if the default size is selected; or if the selection contains multiple sizes, one of which is the default.
343
- return this.DEFAULT_SIZE;
344
- }
345
- if (typeof format.size === 'string') {
346
- // The selected range is all the same size, which is not the default.
347
- return format.size;
348
- }
349
- if (Array.isArray(format.size)) {
350
- // The selected range contains multiple sizes, none of which are the default. Return the first size in the array.
351
- return format.size[0];
166
+ applyColor() {
167
+ // CE-3031: Re-apply the text selection that was made before selecting a color
168
+ // as the act of hiding some browsers color inputs can change the selected text
169
+ if (this.cachedSelection) {
170
+ this.editor.setSelection(this.cachedSelection.index, this.cachedSelection.length);
352
171
  }
353
- // Fall back to the default (should never get here)
354
- return this.DEFAULT_FONT;
172
+ this.editor.format('color', this.selectedColor);
173
+ this.sanitizeContents();
355
174
  }
356
- sanitizeAndValidate() {
357
- let html;
358
- // An empty Quill editor's html might be like:
359
- // <p><span style="font-family: Roboto; font-size: 14px; color: rgb(83, 83, 83);"><span class="ql-cursor">&#65279;</span></span></p>
360
- // Detect emptiness and return `undefined` instead, for easier "Required" validation.
361
- if (!this.editor.getText().trim()) {
362
- html = undefined;
363
- }
364
- else {
365
- // Sometimes Quill's inner HTML includes its own cursor. We don't want to save that.
366
- const withoutCursor = this.editor.root.innerHTML.replace(/\<span class="ql-cursor"\>.?\<\/span\>/, '');
367
- html = this.$sanitize(withoutCursor);
368
- }
175
+ cacheSelection() {
176
+ this.cachedSelection = this.editor.getSelection();
177
+ }
178
+ sanitizeContents() {
179
+ const html = this.$sanitize(this.editor.root.innerHTML);
369
180
  this.ngModelCtrl.$setViewValue(html);
370
- this.checkValidity();
181
+ this.manageValidity();
371
182
  }
372
- /** Updates the color shown in the toolbar. Does not change the color being used in the text. */
373
- updateColorPicker(color) {
374
- this.selectedColor = color;
183
+ formatToDefaults() {
184
+ this.updateFontDisplay(this.DEFAULT_FONT);
185
+ this.editor.format('color', this.DEFAULT_COLOR);
186
+ this.editor.format('size', this.DEFAULT_SIZE);
187
+ }
188
+ getFontFromLeaf(leaf) {
189
+ if (!leaf) {
190
+ return;
191
+ }
192
+ if (!leaf[0].parent.domNode.style.fontFamily) {
193
+ return;
194
+ }
195
+ return leaf[0].parent.domNode.style.fontFamily;
375
196
  }
376
- /** Updates the font shown in the toolbar. Does not change the font being used in the text. */
377
- updateFontPicker(font) {
378
- this.selectedFont = font;
197
+ updateFontDisplay(fontFamily) {
198
+ this.selectedFont = fontFamily;
199
+ this.fontStyle = {
200
+ 'font-family': fontFamily
201
+ };
379
202
  }
380
- /** Updates the size shown in the toolbar. Does not change the size being used in the text. */
381
- updateSizePicker(size) {
382
- this.$element.find('.ql-size').val(size);
383
- this.$element.find(`#${this.editorSizeId} .ql-picker-label`).attr('data-value', size);
384
- this.$element.find(`#${this.editorSizeId} .ql-picker-label`).attr('data-label', size);
203
+ updateColorDisplay(range) {
204
+ this.$timeout(() => {
205
+ const format = this.editor.getFormat(range);
206
+ const color = format.color;
207
+ if (!color || lodash_1.default.isEmpty(color)) {
208
+ this.selectedColor = this.DEFAULT_COLOR;
209
+ return;
210
+ }
211
+ if (lodash_1.default.isArray(color)) {
212
+ this.selectedColor = color[0];
213
+ return;
214
+ }
215
+ this.selectedColor = color;
216
+ });
385
217
  }
386
218
  };
387
219
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"rich-text.component.js","sourceRoot":"","sources":["../../src/components/rich-text/rich-text.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sCAAsC;AACtC,sDAA2C;AAC3C,oDAAsB;AACtB,+CAA+C;AAE/C,8CAAwD;AAExD,+BAAmC;AAEnC,8GAA8G;AAC9G,iBAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,mBAAmB,EAAE,CAAC,iBAAgD,EAAE,EAAE;QACvG,iBAAiB,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;IAC3C,CAAC,CAAC,CAAC,CAAA;AAUH,IAAqB,2BAA2B,GAAhD,MAAqB,2BAA2B;IAkC/C,YAC6B,QAA6B,EAC3B,UAAyB,EAC1B,SAAoC,EACrC,QAA4B,EACpB,gBAAkC;QAJ1C,aAAQ,GAAR,QAAQ,CAAqB;QAC3B,eAAU,GAAV,UAAU,CAAe;QAC1B,cAAS,GAAT,SAAS,CAA2B;QACrC,aAAQ,GAAR,QAAQ,CAAoB;QACpB,qBAAgB,GAAhB,gBAAgB,CAAkB;QAnB/D,iCAA4B,GAAG,gBAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,GAAG,CAAC,CAAA;QAEhF,kBAAa,GAAG,SAAS,CAAA;QACzB,iBAAY,GAAG,QAAQ,CAAA;QACvB,iBAAY,GAAG,MAAM,CAAA;QAErB,oBAAe,GAAG,SAAS,CAAA;QAC3B,mBAAc,GA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