@hmcts/ccd-case-ui-toolkit 7.3.89-4951 → 7.3.89-exui-5101-rc-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.
@@ -25910,6 +25910,9 @@ function sanitiseRichTextDocument(documentElement) {
25910
25910
  const listStart = tagName === 'ol' && /^\d{1,6}$/.test(element.getAttribute('start') || '')
25911
25911
  ? element.getAttribute('start')
25912
25912
  : null;
25913
+ const listType = tagName === 'ol' && /^[ai]$/.test(element.getAttribute('type') || '')
25914
+ ? element.getAttribute('type')
25915
+ : null;
25913
25916
  while (element.attributes.length > 0) {
25914
25917
  element.removeAttribute(element.attributes[0].name);
25915
25918
  }
@@ -25922,6 +25925,9 @@ function sanitiseRichTextDocument(documentElement) {
25922
25925
  if (listStart) {
25923
25926
  element.setAttribute('start', listStart);
25924
25927
  }
25928
+ if (listType) {
25929
+ element.setAttribute('type', listType);
25930
+ }
25925
25931
  });
25926
25932
  return documentElement.body.innerHTML;
25927
25933
  }
@@ -25952,11 +25958,11 @@ class ReadRichTextAreaFieldComponent extends AbstractFieldReadComponent {
25952
25958
  i0.ɵɵelement(0, "div", 0);
25953
25959
  } if (rf & 2) {
25954
25960
  i0.ɵɵproperty("innerHTML", ctx.sanitisedValue(), i0.ɵɵsanitizeHtml);
25955
- } }, styles: ["@charset \"UTF-8\";.ccd-rich-text-area-read{overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal}.ccd-rich-text-area-read strong,.ccd-rich-text-area-read strong *,.ccd-rich-text-area-read b,.ccd-rich-text-area-read b *{font-weight:700}.ccd-rich-text-area-read strong u,.ccd-rich-text-area-read u strong,.ccd-rich-text-area-read b u,.ccd-rich-text-area-read u b{font-weight:700!important;text-decoration:underline}.ccd-rich-text-area-read p,.ccd-rich-text-area-read ul,.ccd-rich-text-area-read ol{margin-top:0;overflow-wrap:anywhere;word-break:normal}.ccd-rich-text-area-read p:empty:before{content:\"\\a0\"}.ccd-rich-text-area-read ul{list-style:disc outside;padding-left:25px}.ccd-rich-text-area-read ol{list-style:decimal outside;padding-left:25px}.ccd-rich-text-area-read li{display:list-item;margin-bottom:5px}.ccd-rich-text-area-read li>p{margin:0}.ccd-rich-text-area-read .ccd-rich-text-indent-1{margin-left:40px}.ccd-rich-text-area-read .ccd-rich-text-indent-2{margin-left:80px}.ccd-rich-text-area-read .ccd-rich-text-indent-3{margin-left:120px}.ccd-rich-text-area-read .ccd-rich-text-indent-4{margin-left:160px}.ccd-rich-text-area-read .ccd-rich-text-indent-5{margin-left:200px}.ccd-rich-text-area-read .ccd-rich-text-indent-6{margin-left:240px}\n"], encapsulation: 2 });
25961
+ } }, styles: ["@charset \"UTF-8\";.ccd-rich-text-area-read{overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal}.ccd-rich-text-area-read strong,.ccd-rich-text-area-read strong *,.ccd-rich-text-area-read b,.ccd-rich-text-area-read b *{font-weight:700}.ccd-rich-text-area-read strong u,.ccd-rich-text-area-read u strong,.ccd-rich-text-area-read b u,.ccd-rich-text-area-read u b{font-weight:700!important;text-decoration:underline}.ccd-rich-text-area-read p,.ccd-rich-text-area-read ul,.ccd-rich-text-area-read ol{margin-top:0;overflow-wrap:anywhere;word-break:normal}.ccd-rich-text-area-read p:empty:before{content:\"\\a0\"}.ccd-rich-text-area-read ul{list-style:disc outside;padding-left:25px}.ccd-rich-text-area-read ol{list-style:decimal outside;padding-left:25px}.ccd-rich-text-area-read ol[type=a]{list-style-type:lower-alpha}.ccd-rich-text-area-read ol[type=i]{list-style-type:lower-roman}.ccd-rich-text-area-read ol[type=i]>li::marker{content:\"(\" counter(list-item,lower-roman) \") \"}.ccd-rich-text-area-read li{display:list-item;margin-bottom:5px}.ccd-rich-text-area-read li>p{margin:0}.ccd-rich-text-area-read .ccd-rich-text-indent-1{margin-left:40px}.ccd-rich-text-area-read .ccd-rich-text-indent-2{margin-left:80px}.ccd-rich-text-area-read .ccd-rich-text-indent-3{margin-left:120px}.ccd-rich-text-area-read .ccd-rich-text-indent-4{margin-left:160px}.ccd-rich-text-area-read .ccd-rich-text-indent-5{margin-left:200px}.ccd-rich-text-area-read .ccd-rich-text-indent-6{margin-left:240px}\n"], encapsulation: 2 });
25956
25962
  }
25957
25963
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadRichTextAreaFieldComponent, [{
25958
25964
  type: Component,
25959
- args: [{ selector: 'ccd-read-rich-text-area-field', template: `<div class="ccd-rich-text-area-read" [innerHTML]="sanitisedValue()"></div>`, encapsulation: ViewEncapsulation.None, standalone: false, styles: ["@charset \"UTF-8\";.ccd-rich-text-area-read{overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal}.ccd-rich-text-area-read strong,.ccd-rich-text-area-read strong *,.ccd-rich-text-area-read b,.ccd-rich-text-area-read b *{font-weight:700}.ccd-rich-text-area-read strong u,.ccd-rich-text-area-read u strong,.ccd-rich-text-area-read b u,.ccd-rich-text-area-read u b{font-weight:700!important;text-decoration:underline}.ccd-rich-text-area-read p,.ccd-rich-text-area-read ul,.ccd-rich-text-area-read ol{margin-top:0;overflow-wrap:anywhere;word-break:normal}.ccd-rich-text-area-read p:empty:before{content:\"\\a0\"}.ccd-rich-text-area-read ul{list-style:disc outside;padding-left:25px}.ccd-rich-text-area-read ol{list-style:decimal outside;padding-left:25px}.ccd-rich-text-area-read li{display:list-item;margin-bottom:5px}.ccd-rich-text-area-read li>p{margin:0}.ccd-rich-text-area-read .ccd-rich-text-indent-1{margin-left:40px}.ccd-rich-text-area-read .ccd-rich-text-indent-2{margin-left:80px}.ccd-rich-text-area-read .ccd-rich-text-indent-3{margin-left:120px}.ccd-rich-text-area-read .ccd-rich-text-indent-4{margin-left:160px}.ccd-rich-text-area-read .ccd-rich-text-indent-5{margin-left:200px}.ccd-rich-text-area-read .ccd-rich-text-indent-6{margin-left:240px}\n"] }]
25965
+ args: [{ selector: 'ccd-read-rich-text-area-field', template: `<div class="ccd-rich-text-area-read" [innerHTML]="sanitisedValue()"></div>`, encapsulation: ViewEncapsulation.None, standalone: false, styles: ["@charset \"UTF-8\";.ccd-rich-text-area-read{overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal}.ccd-rich-text-area-read strong,.ccd-rich-text-area-read strong *,.ccd-rich-text-area-read b,.ccd-rich-text-area-read b *{font-weight:700}.ccd-rich-text-area-read strong u,.ccd-rich-text-area-read u strong,.ccd-rich-text-area-read b u,.ccd-rich-text-area-read u b{font-weight:700!important;text-decoration:underline}.ccd-rich-text-area-read p,.ccd-rich-text-area-read ul,.ccd-rich-text-area-read ol{margin-top:0;overflow-wrap:anywhere;word-break:normal}.ccd-rich-text-area-read p:empty:before{content:\"\\a0\"}.ccd-rich-text-area-read ul{list-style:disc outside;padding-left:25px}.ccd-rich-text-area-read ol{list-style:decimal outside;padding-left:25px}.ccd-rich-text-area-read ol[type=a]{list-style-type:lower-alpha}.ccd-rich-text-area-read ol[type=i]{list-style-type:lower-roman}.ccd-rich-text-area-read ol[type=i]>li::marker{content:\"(\" counter(list-item,lower-roman) \") \"}.ccd-rich-text-area-read li{display:list-item;margin-bottom:5px}.ccd-rich-text-area-read li>p{margin:0}.ccd-rich-text-area-read .ccd-rich-text-indent-1{margin-left:40px}.ccd-rich-text-area-read .ccd-rich-text-indent-2{margin-left:80px}.ccd-rich-text-area-read .ccd-rich-text-indent-3{margin-left:120px}.ccd-rich-text-area-read .ccd-rich-text-indent-4{margin-left:160px}.ccd-rich-text-area-read .ccd-rich-text-indent-5{margin-left:200px}.ccd-rich-text-area-read .ccd-rich-text-indent-6{margin-left:240px}\n"] }]
25960
25966
  }], () => [{ type: i1$5.DomSanitizer }], null); })();
25961
25967
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ReadRichTextAreaFieldComponent, { className: "ReadRichTextAreaFieldComponent", filePath: "lib/shared/components/palette/rich-text-area/read-rich-text-area-field.component.ts", lineNumber: 13 }); })();
25962
25968
 
@@ -25965,7 +25971,7 @@ const _c1$e = a0 => ({ "form-group-error": a0 });
25965
25971
  const _c2$3 = a0 => ({ "ccd-rich-text-area__editor--error": a0 });
25966
25972
  const _c3 = a0 => ({ "ccd-rich-text-area__toolbar-button--active": a0 });
25967
25973
  function WriteRichTextAreaFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
25968
- i0.ɵɵelementStart(0, "span", 37);
25974
+ i0.ɵɵelementStart(0, "span", 39);
25969
25975
  i0.ɵɵtext(1);
25970
25976
  i0.ɵɵpipe(2, "ccdFieldLabel");
25971
25977
  i0.ɵɵelementEnd();
@@ -25975,7 +25981,7 @@ function WriteRichTextAreaFieldComponent_span_2_Template(rf, ctx) { if (rf & 1)
25975
25981
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r1.caseField));
25976
25982
  } }
25977
25983
  function WriteRichTextAreaFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
25978
- i0.ɵɵelementStart(0, "span", 38);
25984
+ i0.ɵɵelementStart(0, "span", 40);
25979
25985
  i0.ɵɵtext(1);
25980
25986
  i0.ɵɵpipe(2, "rpxTranslate");
25981
25987
  i0.ɵɵelementEnd();
@@ -25986,7 +25992,7 @@ function WriteRichTextAreaFieldComponent_span_3_Template(rf, ctx) { if (rf & 1)
25986
25992
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 2, ctx_r1.caseField.hint_text));
25987
25993
  } }
25988
25994
  function WriteRichTextAreaFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
25989
- i0.ɵɵelementStart(0, "span", 39);
25995
+ i0.ɵɵelementStart(0, "span", 41);
25990
25996
  i0.ɵɵtext(1);
25991
25997
  i0.ɵɵpipe(2, "ccdFirstError");
25992
25998
  i0.ɵɵelementEnd();
@@ -25996,6 +26002,24 @@ function WriteRichTextAreaFieldComponent_span_4_Template(rf, ctx) { if (rf & 1)
25996
26002
  i0.ɵɵadvance();
25997
26003
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 2, ctx_r1.richTextAreaControl.errors, ctx_r1.caseField.label), " ");
25998
26004
  } }
26005
+ function orderedListStyleForType(type) {
26006
+ if (type === 'a') {
26007
+ return 'lower-alpha';
26008
+ }
26009
+ if (type === 'i') {
26010
+ return 'lower-roman';
26011
+ }
26012
+ return null;
26013
+ }
26014
+ function orderedListTypeForStyle(style) {
26015
+ if (style === 'lower-alpha') {
26016
+ return 'a';
26017
+ }
26018
+ if (style === 'lower-roman') {
26019
+ return 'i';
26020
+ }
26021
+ return null;
26022
+ }
25999
26023
  const WORD_COLUMN_SPACING = 12;
26000
26024
  const MAX_INDENT = 6;
26001
26025
  const CSS_LENGTH_UNITS = ['rem', 'px', 'pt', 'in', 'cm', 'mm', 'em'];
@@ -26009,7 +26033,8 @@ const richTextNodes = {
26009
26033
  ...nodes.ordered_list,
26010
26034
  attrs: {
26011
26035
  order: { default: 1 },
26012
- indent: { default: null }
26036
+ indent: { default: null },
26037
+ listStyle: { default: null }
26013
26038
  },
26014
26039
  parseDOM: [{
26015
26040
  tag: 'ol',
@@ -26017,13 +26042,15 @@ const richTextNodes = {
26017
26042
  const list = element;
26018
26043
  return {
26019
26044
  order: list.hasAttribute('start') ? Number(list.getAttribute('start')) : 1,
26020
- indent: Number(list.getAttribute('data-indent')) || null
26045
+ indent: Number(list.dataset.indent) || null,
26046
+ listStyle: orderedListStyleForType(list.getAttribute('type'))
26021
26047
  };
26022
26048
  }
26023
26049
  }],
26024
26050
  toDOM: (node) => ['ol', {
26025
26051
  start: node.attrs.order === 1 ? null : node.attrs.order,
26026
- 'data-indent': node.attrs.indent
26052
+ 'data-indent': node.attrs.indent,
26053
+ type: orderedListTypeForStyle(node.attrs.listStyle)
26027
26054
  }, 0]
26028
26055
  },
26029
26056
  bullet_list: {
@@ -26064,7 +26091,10 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26064
26091
  plugins: [
26065
26092
  new Plugin({
26066
26093
  props: {
26067
- handlePaste: (_view, event) => this.handleEditorPaste(event)
26094
+ handlePaste: (_view, event) => this.handleEditorPaste(event),
26095
+ handleDOMEvents: {
26096
+ keydown: (_view, event) => this.handleEditorKeyDown(event)
26097
+ }
26068
26098
  }
26069
26099
  })
26070
26100
  ],
@@ -26111,6 +26141,9 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26111
26141
  errorId() {
26112
26142
  return `${this.id()}_error`;
26113
26143
  }
26144
+ listStyleId() {
26145
+ return `${this.id()}_list_style`;
26146
+ }
26114
26147
  toolbarLabel() {
26115
26148
  return `${this.caseField.label || this.caseField.id} formatting options`;
26116
26149
  }
@@ -26124,6 +26157,13 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26124
26157
  onToolbarButtonMouseDown(event) {
26125
26158
  event.preventDefault();
26126
26159
  }
26160
+ handleEditorKeyDown(event) {
26161
+ if (event.key !== 'Tab' || !this.isNodeActive('list_item')) {
26162
+ return false;
26163
+ }
26164
+ this.executeToolbarCommand(event, event.shiftKey ? 'outdent' : 'indent');
26165
+ return true;
26166
+ }
26127
26167
  executeToolbarCommand(event, command) {
26128
26168
  event.preventDefault();
26129
26169
  event.stopPropagation();
@@ -26153,11 +26193,11 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26153
26193
  this.changeIndent(false);
26154
26194
  break;
26155
26195
  case 'ordered_list':
26156
- this.editor.commands.toggleOrderedList().exec();
26196
+ this.applyListStyleSelection('ordered_list');
26157
26197
  this.paragraphCommandApplied = false;
26158
26198
  break;
26159
26199
  case 'bullet_list':
26160
- this.editor.commands.toggleBulletList().exec();
26200
+ this.toggleBulletList();
26161
26201
  this.paragraphCommandApplied = false;
26162
26202
  break;
26163
26203
  default:
@@ -26171,6 +26211,174 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26171
26211
  isToolbarCommandActive(command) {
26172
26212
  return !!this.activeToolbarCommands[command];
26173
26213
  }
26214
+ currentListStyle() {
26215
+ if (this.isToolbarCommandActive('ordered_list')) {
26216
+ const orderedListStyle = this.activeOrderedListStyle();
26217
+ if (orderedListStyle === 'lower-alpha') {
26218
+ return 'ordered_alpha';
26219
+ }
26220
+ if (orderedListStyle === 'lower-roman') {
26221
+ return 'ordered_roman';
26222
+ }
26223
+ return 'ordered_list';
26224
+ }
26225
+ if (this.isToolbarCommandActive('bullet_list')) {
26226
+ return 'bullet_list';
26227
+ }
26228
+ return '';
26229
+ }
26230
+ currentListSelectValue() {
26231
+ const currentListStyle = this.currentListStyle();
26232
+ return currentListStyle === 'bullet_list' ? '' : currentListStyle;
26233
+ }
26234
+ onListStyleChange(event) {
26235
+ const listStyle = event.target.value;
26236
+ this.applyListStyleSelection(listStyle);
26237
+ this.richTextAreaControl.markAsDirty();
26238
+ this.editor.view.focus();
26239
+ this.updateToolbarState();
26240
+ this.syncAccessibilityLater();
26241
+ }
26242
+ applyListStyleSelection(listStyle) {
26243
+ const currentListStyle = this.currentListStyle();
26244
+ if (listStyle === currentListStyle) {
26245
+ return;
26246
+ }
26247
+ const currentListType = this.listType(currentListStyle);
26248
+ const nextListType = this.listType(listStyle);
26249
+ if (currentListType && nextListType && currentListType !== nextListType) {
26250
+ this.changeActiveListType(nextListType, this.orderedListStyle(listStyle));
26251
+ }
26252
+ else if (nextListType === 'ordered_list') {
26253
+ if (currentListType !== 'ordered_list') {
26254
+ this.editor.commands.toggleOrderedList().exec();
26255
+ }
26256
+ this.applyOrderedListStyle(this.orderedListStyle(listStyle));
26257
+ }
26258
+ else if (listStyle === 'bullet_list') {
26259
+ if (currentListType !== 'bullet_list') {
26260
+ this.editor.commands.toggleBulletList().exec();
26261
+ }
26262
+ }
26263
+ else {
26264
+ this.applyParagraph();
26265
+ this.paragraphCommandApplied = true;
26266
+ }
26267
+ }
26268
+ changeActiveListType(listType, orderedListStyle) {
26269
+ const { state, dispatch } = this.editor.view;
26270
+ const { $from } = state.selection;
26271
+ const targetType = state.schema.nodes[listType];
26272
+ for (let depth = $from.depth; depth > 0; depth--) {
26273
+ const node = $from.node(depth);
26274
+ if (node.type.name !== 'ordered_list' && node.type.name !== 'bullet_list') {
26275
+ continue;
26276
+ }
26277
+ const transaction = state.tr;
26278
+ this.contiguousListPositions(depth).forEach(({ position, list }) => {
26279
+ const indent = Number(list.attrs.indent) || null;
26280
+ const attrs = listType === 'ordered_list'
26281
+ ? {
26282
+ order: 1,
26283
+ indent,
26284
+ listStyle: orderedListStyle === 'decimal' ? null : orderedListStyle
26285
+ }
26286
+ : { indent };
26287
+ transaction.setNodeMarkup(position, targetType, attrs);
26288
+ });
26289
+ dispatch(transaction);
26290
+ return;
26291
+ }
26292
+ }
26293
+ contiguousListPositions(depth) {
26294
+ const { $from } = this.editor.view.state.selection;
26295
+ const parentDepth = depth - 1;
26296
+ const parent = $from.node(parentDepth);
26297
+ const activeList = $from.node(depth);
26298
+ const activeIndex = $from.index(parentDepth);
26299
+ const includedIndexes = new Set([activeIndex]);
26300
+ this.collectContiguousListIndexes(parent, activeList, activeIndex, -1, includedIndexes);
26301
+ this.collectContiguousListIndexes(parent, activeList, activeIndex, 1, includedIndexes);
26302
+ const positions = [];
26303
+ parent.forEach((child, childOffset, index) => {
26304
+ if (includedIndexes.has(index) && this.hasMatchingListType(child, activeList)) {
26305
+ positions.push({ position: $from.start(parentDepth) + childOffset, list: child });
26306
+ }
26307
+ });
26308
+ return positions;
26309
+ }
26310
+ collectContiguousListIndexes(parent, activeList, activeIndex, direction, includedIndexes) {
26311
+ for (let index = activeIndex + direction; index >= 0 && index < parent.childCount; index += direction) {
26312
+ const child = parent.child(index);
26313
+ if (this.isEmptyParagraph(child)) {
26314
+ continue;
26315
+ }
26316
+ if (!this.hasMatchingListType(child, activeList)) {
26317
+ return;
26318
+ }
26319
+ includedIndexes.add(index);
26320
+ }
26321
+ }
26322
+ hasMatchingListType(node, activeList) {
26323
+ if (node.type !== activeList.type) {
26324
+ return false;
26325
+ }
26326
+ return node.type.name !== 'ordered_list' ||
26327
+ (node.attrs.listStyle || 'decimal') === (activeList.attrs.listStyle || 'decimal');
26328
+ }
26329
+ isEmptyParagraph(node) {
26330
+ return node.type.name === 'paragraph' && !node.textContent.trim();
26331
+ }
26332
+ toggleBulletList() {
26333
+ const currentListStyle = this.currentListStyle();
26334
+ const currentListType = this.listType(currentListStyle);
26335
+ if (currentListType === 'ordered_list') {
26336
+ this.changeActiveListType('bullet_list', 'decimal');
26337
+ }
26338
+ else {
26339
+ this.editor.commands.toggleBulletList().exec();
26340
+ }
26341
+ }
26342
+ listType(listStyle) {
26343
+ if (listStyle === 'bullet_list') {
26344
+ return 'bullet_list';
26345
+ }
26346
+ return listStyle ? 'ordered_list' : '';
26347
+ }
26348
+ orderedListStyle(listStyle) {
26349
+ if (listStyle === 'ordered_alpha') {
26350
+ return 'lower-alpha';
26351
+ }
26352
+ if (listStyle === 'ordered_roman') {
26353
+ return 'lower-roman';
26354
+ }
26355
+ return 'decimal';
26356
+ }
26357
+ activeOrderedListStyle() {
26358
+ const { $from } = this.editor.view.state.selection;
26359
+ for (let depth = $from.depth; depth > 0; depth--) {
26360
+ const node = $from.node(depth);
26361
+ if (node.type.name === 'ordered_list') {
26362
+ return node.attrs.listStyle || 'decimal';
26363
+ }
26364
+ }
26365
+ return 'decimal';
26366
+ }
26367
+ applyOrderedListStyle(listStyle) {
26368
+ const { state, dispatch } = this.editor.view;
26369
+ const { $from } = state.selection;
26370
+ for (let depth = $from.depth; depth > 0; depth--) {
26371
+ const node = $from.node(depth);
26372
+ if (node.type.name !== 'ordered_list') {
26373
+ continue;
26374
+ }
26375
+ dispatch(state.tr.setNodeMarkup($from.before(depth), node.type, {
26376
+ ...node.attrs,
26377
+ listStyle: listStyle === 'decimal' ? null : listStyle
26378
+ }));
26379
+ return;
26380
+ }
26381
+ }
26174
26382
  onPaste(event) {
26175
26383
  if (event.defaultPrevented) {
26176
26384
  return;
@@ -26225,11 +26433,13 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26225
26433
  normalisePastedHtml(html) {
26226
26434
  const documentElement = new DOMParser().parseFromString(html, 'text/html');
26227
26435
  removeUnsafeRichTextElements(documentElement);
26436
+ this.normaliseWordStylesheetFormatting(documentElement);
26228
26437
  this.removeWordNoise(documentElement);
26229
26438
  this.normaliseWordSpacing(documentElement);
26230
26439
  this.normaliseWordTables(documentElement);
26231
26440
  this.normaliseWordSemanticBlocks(documentElement);
26232
26441
  this.convertWordLists(documentElement);
26442
+ this.normaliseNestedListStructure(documentElement);
26233
26443
  this.normaliseSupportedInlineFormatting(documentElement);
26234
26444
  this.normaliseBlockFormatting(documentElement);
26235
26445
  this.normalisePastedListSpacing(documentElement);
@@ -26244,6 +26454,7 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26244
26454
  }
26245
26455
  const documentElement = new DOMParser().parseFromString(value, 'text/html');
26246
26456
  removeUnsafeRichTextElements(documentElement);
26457
+ this.normaliseWordStylesheetFormatting(documentElement);
26247
26458
  this.normaliseWordSpacing(documentElement);
26248
26459
  this.normaliseWordTables(documentElement);
26249
26460
  this.normaliseWordSemanticBlocks(documentElement);
@@ -26310,15 +26521,25 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26310
26521
  Italic: 'Control+I',
26311
26522
  Underline: 'Control+U'
26312
26523
  };
26313
- const toggleLabels = new Set(['Bold', 'Italic', 'Underline', 'Paragraph', 'Ordered List', 'Bullet List']);
26524
+ const toggleCommands = {
26525
+ Bold: 'bold',
26526
+ Italic: 'italic',
26527
+ Underline: 'underline',
26528
+ Paragraph: 'paragraph',
26529
+ 'Bullet List': 'bullet_list',
26530
+ 'Numbered List': 'ordered_list'
26531
+ };
26314
26532
  const buttons = this.editorHost.nativeElement.querySelectorAll('button');
26315
26533
  buttons.forEach((button) => {
26316
26534
  const label = button.getAttribute('aria-label') || button.title;
26317
26535
  if (shortcutLabels[label]) {
26318
26536
  button.setAttribute('aria-keyshortcuts', shortcutLabels[label]);
26319
26537
  }
26320
- if (toggleLabels.has(label)) {
26321
- button.setAttribute('aria-pressed', `${button.classList.contains('ccd-rich-text-area__toolbar-button--active')}`);
26538
+ if (toggleCommands[label]) {
26539
+ const isActive = label === 'Numbered List'
26540
+ ? this.currentListStyle() === 'ordered_list'
26541
+ : this.isToolbarCommandActive(toggleCommands[label]);
26542
+ button.setAttribute('aria-pressed', `${isActive}`);
26322
26543
  }
26323
26544
  });
26324
26545
  }
@@ -26371,6 +26592,58 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26371
26592
  const officeParagraphs = Array.prototype.slice.call(documentElement.getElementsByTagName('o:p'));
26372
26593
  officeParagraphs.forEach((element) => element.remove());
26373
26594
  }
26595
+ normaliseWordStylesheetFormatting(documentElement) {
26596
+ const styleElements = Array.prototype.slice.call(documentElement.querySelectorAll('style'));
26597
+ styleElements.forEach((styleElement) => {
26598
+ const stylesheet = (styleElement.textContent || '').replace(/<!--|-->/g, '');
26599
+ const rules = this.stylesheetRules(stylesheet);
26600
+ rules.forEach(([selectors, declarations]) => {
26601
+ const hasBoldStyle = this.hasBoldStyle(declarations);
26602
+ const headingLevel = this.wordOutlineLevel(declarations);
26603
+ if (!hasBoldStyle && !headingLevel) {
26604
+ return;
26605
+ }
26606
+ selectors.split(',').forEach((selector) => {
26607
+ const normalisedSelector = selector.trim();
26608
+ if (!normalisedSelector || normalisedSelector.startsWith('@')) {
26609
+ return;
26610
+ }
26611
+ try {
26612
+ const matchingElements = documentElement.body.querySelectorAll(normalisedSelector);
26613
+ matchingElements.forEach((element) => {
26614
+ if (headingLevel) {
26615
+ element.dataset.wordHeadingLevel = headingLevel.toString();
26616
+ }
26617
+ if (hasBoldStyle) {
26618
+ this.wrapBoldInlineContents(documentElement, element);
26619
+ }
26620
+ });
26621
+ }
26622
+ catch {
26623
+ // Ignore Microsoft Office selectors that are not valid browser CSS selectors.
26624
+ }
26625
+ });
26626
+ });
26627
+ });
26628
+ }
26629
+ stylesheetRules(stylesheet) {
26630
+ const rules = [];
26631
+ let searchFrom = 0;
26632
+ let openingBrace = stylesheet.indexOf('{', searchFrom);
26633
+ while (openingBrace !== -1) {
26634
+ const closingBrace = stylesheet.indexOf('}', openingBrace + 1);
26635
+ if (closingBrace === -1) {
26636
+ break;
26637
+ }
26638
+ rules.push([
26639
+ stylesheet.slice(searchFrom, openingBrace),
26640
+ stylesheet.slice(openingBrace + 1, closingBrace)
26641
+ ]);
26642
+ searchFrom = closingBrace + 1;
26643
+ openingBrace = stylesheet.indexOf('{', searchFrom);
26644
+ }
26645
+ return rules;
26646
+ }
26374
26647
  normaliseWordSpacing(documentElement) {
26375
26648
  const spacerElements = Array.prototype.slice.call(documentElement.body.querySelectorAll('[style*="mso-spacerun"]'));
26376
26649
  spacerElements.forEach((spacerElement) => {
@@ -26432,18 +26705,29 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26432
26705
  });
26433
26706
  }
26434
26707
  normaliseWordSemanticBlocks(documentElement) {
26435
- const paragraphs = Array.prototype.slice.call(documentElement.body.querySelectorAll('p'));
26436
- paragraphs.forEach((paragraph) => {
26437
- const headingLevel = this.wordHeadingLevel(paragraph);
26708
+ const blocks = Array.prototype.slice.call(documentElement.body.querySelectorAll('p, h1, h2, h3, h4, h5, h6'));
26709
+ blocks.forEach((block) => {
26710
+ const namedHeadingLevel = this.namedWordHeadingLevel(block);
26711
+ const existingHeadingLevel = /^h([1-6])$/i.exec(block.tagName)?.[1];
26712
+ if (existingHeadingLevel) {
26713
+ if (namedHeadingLevel) {
26714
+ this.wrapBoldInlineContents(documentElement, block);
26715
+ }
26716
+ return;
26717
+ }
26718
+ const headingLevel = this.wordHeadingLevel(block);
26438
26719
  if (headingLevel) {
26439
- this.replaceElementTag(documentElement, paragraph, `h${headingLevel}`);
26720
+ const heading = this.replaceElementTag(documentElement, block, `h${headingLevel}`);
26721
+ if (namedHeadingLevel) {
26722
+ this.wrapBoldInlineContents(documentElement, heading);
26723
+ }
26440
26724
  }
26441
26725
  });
26442
26726
  }
26443
26727
  wordHeadingLevel(element) {
26444
- const headingClass = /MsoHeading([1-6])/i.exec(element.className || '');
26445
- if (headingClass) {
26446
- return Number(headingClass[1]);
26728
+ const namedHeadingLevel = this.namedWordHeadingLevel(element);
26729
+ if (namedHeadingLevel) {
26730
+ return namedHeadingLevel;
26447
26731
  }
26448
26732
  if (/MsoTitle/i.test(element.className || '')) {
26449
26733
  return 1;
@@ -26455,6 +26739,31 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26455
26739
  }, 0);
26456
26740
  return largestFontSize >= 24 ? 1 : null;
26457
26741
  }
26742
+ namedWordHeadingLevel(element) {
26743
+ const styledElements = [element].concat(Array.prototype.slice.call(element.querySelectorAll('*')));
26744
+ for (const styledElement of styledElements) {
26745
+ const storedHeadingLevel = Number(styledElement.dataset.wordHeadingLevel);
26746
+ if (storedHeadingLevel >= 1 && storedHeadingLevel <= 6) {
26747
+ return storedHeadingLevel;
26748
+ }
26749
+ const className = styledElement.className || '';
26750
+ const style = styledElement.getAttribute('style') || '';
26751
+ const headingDescription = `${className} ${style}`;
26752
+ const namedHeadingLevel = /(?:Mso)?Heading\s*([1-6])(?:Char)?/i.exec(headingDescription);
26753
+ if (namedHeadingLevel) {
26754
+ return Number(namedHeadingLevel[1]);
26755
+ }
26756
+ const outlineLevel = this.wordOutlineLevel(style);
26757
+ if (outlineLevel) {
26758
+ return outlineLevel;
26759
+ }
26760
+ }
26761
+ return null;
26762
+ }
26763
+ wordOutlineLevel(style) {
26764
+ const outlineLevel = /mso-outline-level\s*:\s*([1-6])/i.exec(style || '');
26765
+ return outlineLevel ? Number(outlineLevel[1]) : null;
26766
+ }
26458
26767
  replaceElementTag(documentElement, element, tagName) {
26459
26768
  const replacement = documentElement.createElement(tagName);
26460
26769
  Array.prototype.slice.call(element.attributes).forEach((attribute) => {
@@ -26507,6 +26816,9 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26507
26816
  const listStart = element.tagName.toLowerCase() === 'ol'
26508
26817
  ? this.normaliseListStart(element.getAttribute('start'))
26509
26818
  : null;
26819
+ const listType = element.tagName.toLowerCase() === 'ol' && /^[ai]$/.test(element.getAttribute('type') || '')
26820
+ ? element.getAttribute('type')
26821
+ : null;
26510
26822
  while (element.attributes.length > 0) {
26511
26823
  element.removeAttribute(element.attributes[0].name);
26512
26824
  }
@@ -26519,6 +26831,9 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26519
26831
  if (listStart) {
26520
26832
  element.setAttribute('start', listStart);
26521
26833
  }
26834
+ if (listType) {
26835
+ element.setAttribute('type', listType);
26836
+ }
26522
26837
  });
26523
26838
  }
26524
26839
  normaliseListStart(value) {
@@ -26619,7 +26934,7 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26619
26934
  hasBoldStyle(style) {
26620
26935
  const fontWeightMatch = /(?:mso-bidi-)?font-weight\s*:\s*([^;]+)/i.exec(style);
26621
26936
  if (!fontWeightMatch) {
26622
- return false;
26937
+ return /(?:^|;)\s*font\s*:[^;]*\bbold\b/i.test(style);
26623
26938
  }
26624
26939
  const fontWeight = fontWeightMatch[1].trim().toLowerCase();
26625
26940
  return fontWeight === 'bold' || fontWeight === 'bolder' || Number(fontWeight) >= 600;
@@ -26886,61 +27201,96 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26886
27201
  convertWordLists(documentElement) {
26887
27202
  const childNodes = Array.prototype.slice.call(documentElement.body.querySelectorAll('p'));
26888
27203
  const wordListIndents = this.wordListIndents(childNodes);
26889
- const listStack = [];
26890
- const listParents = [];
26891
- const resetListLevels = new Map();
26892
- let previousListId = null;
27204
+ const orderedListTypes = this.wordOrderedListTypes(childNodes);
27205
+ const state = {
27206
+ listStack: [],
27207
+ listParents: [],
27208
+ resetListLevels: new Map(),
27209
+ previousListId: null
27210
+ };
26893
27211
  childNodes.forEach((node) => {
26894
- if (!this.isWordListParagraph(node)) {
26895
- listStack.length = 0;
26896
- listParents.length = 0;
26897
- resetListLevels.clear();
26898
- previousListId = null;
26899
- return;
26900
- }
26901
- const paragraph = node;
26902
- const listType = this.wordListType(paragraph);
26903
- const listId = this.wordListId(paragraph);
26904
- const declaredLevel = this.wordListDeclaredLevel(paragraph);
26905
- let requestedLevel = this.wordListLevel(paragraph, wordListIndents);
26906
- const rememberedResetLevel = declaredLevel === 1 ? resetListLevels.get(listId) : null;
26907
- if (rememberedResetLevel) {
26908
- requestedLevel = Math.max(requestedLevel, rememberedResetLevel);
26909
- }
26910
- else if (declaredLevel === 1 && listId !== previousListId && listStack.length > 1 && requestedLevel === listStack.length) {
26911
- requestedLevel++;
26912
- resetListLevels.set(listId, requestedLevel);
26913
- }
26914
- else if (declaredLevel === 1 && listId) {
26915
- resetListLevels.set(listId, requestedLevel);
26916
- }
26917
- const level = Math.min(requestedLevel, listStack.length + 1);
26918
- const stackIndex = level - 1;
26919
- const parentListItem = stackIndex > 0 ? listStack[stackIndex - 1]?.lastElementChild : null;
26920
- const listParent = parentListItem || paragraph.parentNode;
26921
- const listItem = documentElement.createElement('li');
26922
- this.copyListItemContents(documentElement, paragraph, listItem);
26923
- let currentList = listStack[stackIndex];
26924
- if (currentList?.tagName.toLowerCase() !== listType || listParents[stackIndex] !== listParent) {
26925
- currentList = documentElement.createElement(listType);
26926
- const listStart = this.wordListStart(paragraph);
26927
- if (listType === 'ol' && listStart > 1) {
26928
- currentList.setAttribute('start', listStart.toString());
26929
- }
26930
- if (parentListItem) {
26931
- parentListItem.appendChild(currentList);
26932
- }
26933
- else {
26934
- paragraph.parentNode.insertBefore(currentList, paragraph);
26935
- }
26936
- listStack[stackIndex] = currentList;
26937
- listParents[stackIndex] = listParent;
27212
+ this.convertWordListParagraph(documentElement, node, wordListIndents, orderedListTypes, state);
27213
+ });
27214
+ }
27215
+ convertWordListParagraph(documentElement, node, wordListIndents, orderedListTypes, state) {
27216
+ if (!this.isWordListParagraph(node)) {
27217
+ this.resetWordListConversionState(state);
27218
+ return;
27219
+ }
27220
+ const paragraph = node;
27221
+ const listType = this.wordListType(paragraph);
27222
+ const orderedListType = listType === 'ol' ? orderedListTypes.get(this.wordListLevelKey(paragraph)) || null : null;
27223
+ const listId = this.wordListId(paragraph);
27224
+ const requestedLevel = this.wordListRequestedLevel(paragraph, listId, wordListIndents, state);
27225
+ const level = Math.min(requestedLevel, state.listStack.length + 1);
27226
+ const currentList = this.wordListForParagraph(documentElement, paragraph, listType, orderedListType, level, state);
27227
+ const listItem = documentElement.createElement('li');
27228
+ this.copyListItemContents(documentElement, paragraph, listItem);
27229
+ currentList.appendChild(listItem);
27230
+ paragraph.remove();
27231
+ state.previousListId = listId;
27232
+ }
27233
+ resetWordListConversionState(state) {
27234
+ state.listStack.length = 0;
27235
+ state.listParents.length = 0;
27236
+ state.resetListLevels.clear();
27237
+ state.previousListId = null;
27238
+ }
27239
+ wordListRequestedLevel(paragraph, listId, wordListIndents, state) {
27240
+ const declaredLevel = this.wordListDeclaredLevel(paragraph);
27241
+ let requestedLevel = this.wordListLevel(paragraph, wordListIndents);
27242
+ const rememberedResetLevel = declaredLevel === 1 ? state.resetListLevels.get(listId) : null;
27243
+ if (rememberedResetLevel) {
27244
+ return Math.max(requestedLevel, rememberedResetLevel);
27245
+ }
27246
+ if (declaredLevel === 1 && listId !== state.previousListId && state.listStack.length > 1 && requestedLevel === state.listStack.length) {
27247
+ requestedLevel++;
27248
+ state.resetListLevels.set(listId, requestedLevel);
27249
+ }
27250
+ else if (declaredLevel === 1 && listId) {
27251
+ state.resetListLevels.set(listId, requestedLevel);
27252
+ }
27253
+ return requestedLevel;
27254
+ }
27255
+ wordListForParagraph(documentElement, paragraph, listType, orderedListType, level, state) {
27256
+ const stackIndex = level - 1;
27257
+ const parentListItem = stackIndex > 0 ? state.listStack[stackIndex - 1]?.lastElementChild : null;
27258
+ const listParent = parentListItem || paragraph.parentNode;
27259
+ let currentList = state.listStack[stackIndex];
27260
+ if (currentList?.tagName.toLowerCase() !== listType || currentList?.getAttribute('type') !== orderedListType ||
27261
+ state.listParents[stackIndex] !== listParent) {
27262
+ currentList = this.createWordList(documentElement, paragraph, listType, orderedListType, parentListItem);
27263
+ state.listStack[stackIndex] = currentList;
27264
+ state.listParents[stackIndex] = listParent;
27265
+ }
27266
+ state.listStack.length = level;
27267
+ state.listParents.length = level;
27268
+ return currentList;
27269
+ }
27270
+ createWordList(documentElement, paragraph, listType, orderedListType, parentListItem) {
27271
+ const list = documentElement.createElement(listType);
27272
+ const listStart = this.wordListStart(paragraph);
27273
+ if (listType === 'ol' && listStart > 1) {
27274
+ list.setAttribute('start', listStart.toString());
27275
+ }
27276
+ if (orderedListType) {
27277
+ list.setAttribute('type', orderedListType);
27278
+ }
27279
+ if (parentListItem) {
27280
+ parentListItem.appendChild(list);
27281
+ }
27282
+ else {
27283
+ paragraph.parentNode.insertBefore(list, paragraph);
27284
+ }
27285
+ return list;
27286
+ }
27287
+ normaliseNestedListStructure(documentElement) {
27288
+ const orphanedNestedLists = Array.prototype.slice.call(documentElement.body.querySelectorAll('ol > ol, ol > ul, ul > ol, ul > ul'));
27289
+ orphanedNestedLists.forEach((nestedList) => {
27290
+ const previousListItem = nestedList.previousElementSibling;
27291
+ if (previousListItem?.tagName.toLowerCase() === 'li') {
27292
+ previousListItem.appendChild(nestedList);
26938
27293
  }
26939
- listStack.length = level;
26940
- listParents.length = level;
26941
- currentList.appendChild(listItem);
26942
- paragraph.remove();
26943
- previousListId = listId;
26944
27294
  });
26945
27295
  }
26946
27296
  isWordListParagraph(node) {
@@ -26950,8 +27300,39 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26950
27300
  return /MsoListParagraph/i.test(node.className) || /mso-list/i.test(node.getAttribute('style') || '');
26951
27301
  }
26952
27302
  wordListType(paragraph) {
26953
- const marker = paragraph.textContent.trim();
26954
- return /^(\d+|[a-z]|[ivxlcdm]+)[.)]/i.test(marker) ? 'ol' : 'ul';
27303
+ return /^\(?(?:\d+|[a-z]+)[.)]/i.test(this.wordListMarker(paragraph)) ? 'ol' : 'ul';
27304
+ }
27305
+ wordOrderedListTypes(nodes) {
27306
+ const markersByLevel = new Map();
27307
+ nodes.filter((node) => this.isWordListParagraph(node)).forEach((node) => {
27308
+ const marker = this.wordListMarker(node);
27309
+ if (!/^\(?(?:\d+|[a-z]+)[.)]/i.test(marker)) {
27310
+ return;
27311
+ }
27312
+ const key = this.wordListLevelKey(node);
27313
+ markersByLevel.set(key, [...(markersByLevel.get(key) || []), marker]);
27314
+ });
27315
+ const listTypes = new Map();
27316
+ markersByLevel.forEach((markers, key) => {
27317
+ const markerPattern = /^\(?([a-z]+|\d+)[.)]/i;
27318
+ const markerTokens = markers.map((marker) => markerPattern.exec(marker)?.[1]?.toLowerCase());
27319
+ if (markers.some((marker) => /^\([ivxlcdm]+\)/i.test(marker)) ||
27320
+ markerTokens.some((token) => token?.length > 1 && /^[ivxlcdm]+$/.test(token))) {
27321
+ listTypes.set(key, 'i');
27322
+ }
27323
+ else if (markerTokens.every((token) => /^[a-z]$/.test(token || ''))) {
27324
+ listTypes.set(key, 'a');
27325
+ }
27326
+ });
27327
+ return listTypes;
27328
+ }
27329
+ wordListLevelKey(paragraph) {
27330
+ return `${this.wordListId(paragraph) || ''}:${this.wordListDeclaredLevel(paragraph)}`;
27331
+ }
27332
+ wordListMarker(paragraph) {
27333
+ const markerElement = Array.prototype.slice.call(paragraph.querySelectorAll('[style]'))
27334
+ .find((element) => /mso-list:\s*Ignore/i.test(element.getAttribute('style') || ''));
27335
+ return (markerElement ? markerElement.textContent : paragraph.textContent).trim();
26955
27336
  }
26956
27337
  wordListLevel(paragraph, wordListIndents) {
26957
27338
  const declaredLevel = this.wordListDeclaredLevel(paragraph);
@@ -26970,8 +27351,7 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26970
27351
  wordListIndents(nodes) {
26971
27352
  const indents = nodes
26972
27353
  .filter((node) => this.isWordListParagraph(node))
26973
- .map((node) => this.wordListIndent(node))
26974
- .filter((indent) => indent > 0);
27354
+ .map((node) => this.wordListIndent(node));
26975
27355
  return Array.from(new Set(indents)).sort((left, right) => left - right);
26976
27356
  }
26977
27357
  wordListIndent(paragraph) {
@@ -26980,10 +27360,7 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
26980
27360
  return Math.round(indent);
26981
27361
  }
26982
27362
  wordListStart(paragraph) {
26983
- const markerElement = Array.prototype.slice.call(paragraph.querySelectorAll('[style]'))
26984
- .find((element) => /mso-list:\s*Ignore/i.test(element.getAttribute('style') || ''));
26985
- const marker = (markerElement ? markerElement.textContent : paragraph.textContent).trim();
26986
- const match = marker.match(/^(\d+)[.)]/);
27363
+ const match = /^(\d+)[.)]/.exec(this.wordListMarker(paragraph));
26987
27364
  return match ? Number(match[1]) : 1;
26988
27365
  }
26989
27366
  copyListItemContents(documentElement, paragraph, listItem) {
@@ -27077,6 +27454,7 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
27077
27454
  }
27078
27455
  const listCommand = increase ? sinkListItem(listItemType) : liftListItem(listItemType);
27079
27456
  if (listCommand(state, dispatch)) {
27457
+ this.applyOrderedListStyleForCurrentDepth();
27080
27458
  return;
27081
27459
  }
27082
27460
  if (increase && this.changeListIndent(true, state, dispatch)) {
@@ -27090,6 +27468,33 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
27090
27468
  this.editor.commands.outdent().exec();
27091
27469
  }
27092
27470
  }
27471
+ applyOrderedListStyleForCurrentDepth() {
27472
+ const { state, dispatch } = this.editor.view;
27473
+ const { $from } = state.selection;
27474
+ let orderedListDepth = 0;
27475
+ let activeOrderedListDepth = null;
27476
+ for (let depth = 1; depth <= $from.depth; depth++) {
27477
+ if ($from.node(depth).type.name === 'ordered_list') {
27478
+ orderedListDepth++;
27479
+ activeOrderedListDepth = depth;
27480
+ }
27481
+ }
27482
+ if (activeOrderedListDepth === null) {
27483
+ return;
27484
+ }
27485
+ const activeList = $from.node(activeOrderedListDepth);
27486
+ let listStyle = 'lower-roman';
27487
+ if (orderedListDepth === 1) {
27488
+ listStyle = 'decimal';
27489
+ }
27490
+ else if (orderedListDepth === 2) {
27491
+ listStyle = 'lower-alpha';
27492
+ }
27493
+ dispatch(state.tr.setNodeMarkup($from.before(activeOrderedListDepth), activeList.type, {
27494
+ ...activeList.attrs,
27495
+ listStyle: listStyle === 'decimal' ? null : listStyle
27496
+ }));
27497
+ }
27093
27498
  changeListIndent(increase, state, dispatch) {
27094
27499
  const { $from } = state.selection;
27095
27500
  for (let depth = $from.depth; depth > 0; depth--) {
@@ -27191,7 +27596,7 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
27191
27596
  } if (rf & 2) {
27192
27597
  let _t;
27193
27598
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.editorHost = _t.first);
27194
- } }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 63, vars: 37, consts: [["editorHost", ""], [1, "form-group", "ccd-rich-text-area", 3, "ngClass"], [3, "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 3, "id", 4, "ngIf"], ["class", "error-message", 3, "id", 4, "ngIf"], [1, "ccd-rich-text-area__editor", 3, "click", "keydown", "keyup", "paste", "ngClass"], ["role", "toolbar", 1, "ccd-rich-text-area__toolbar"], ["type", "button", "aria-label", "Undo", "title", "Undo", "aria-keyshortcuts", "Control+Z", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click"], ["aria-hidden", "true", 1, "ccd-rich-text-area__toolbar-icon", "ccd-rich-text-area__toolbar-icon--undo"], ["type", "button", "aria-label", "Redo", "title", "Redo", "aria-keyshortcuts", "Control+Y", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click"], ["aria-hidden", "true", 1, "ccd-rich-text-area__toolbar-icon", "ccd-rich-text-area__toolbar-icon--redo"], ["aria-hidden", "true", 1, "ccd-rich-text-area__toolbar-separator"], ["type", "button", "aria-label", "Bold", "title", "Bold", "aria-keyshortcuts", "Control+B", 1, "ccd-rich-text-area__toolbar-button", "ccd-rich-text-area__toolbar-button--bold", 3, "mousedown", "click", "ngClass"], ["aria-hidden", "true", 1, "ccd-rich-text-area__toolbar-icon", "ccd-rich-text-area__toolbar-icon--bold"], ["type", "button", "aria-label", "Italic", "title", "Italic", "aria-keyshortcuts", "Control+I", 1, "ccd-rich-text-area__toolbar-button", "ccd-rich-text-area__toolbar-button--italic", 3, "mousedown", "click", "ngClass"], ["aria-hidden", "true", 1, "ccd-rich-text-area__toolbar-icon", "ccd-rich-text-area__toolbar-icon--italic"], ["type", "button", "aria-label", "Underline", "title", "Underline", "aria-keyshortcuts", "Control+U", 1, "ccd-rich-text-area__toolbar-button", "ccd-rich-text-area__toolbar-button--underline", 3, "mousedown", "click", "ngClass"], ["aria-hidden", "true", 1, "ccd-rich-text-area__toolbar-icon", "ccd-rich-text-area__toolbar-icon--underline"], ["type", "button", "aria-label", "Paragraph", "title", "Paragraph", 1, "ccd-rich-text-area__toolbar-button", "ccd-rich-text-area__toolbar-button--paragraph", 3, "mousedown", "click", "ngClass"], ["aria-hidden", "true", 1, "ccd-rich-text-area__toolbar-icon", "ccd-rich-text-area__toolbar-icon--paragraph"], ["type", "button", "aria-label", "Ordered List", "title", "Ordered List", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click", "ngClass"], ["aria-hidden", "true", 1, "ccd-rich-text-area__list-icon", "ccd-rich-text-area__list-icon--ordered"], [1, "ccd-rich-text-area__list-marker"], [1, "ccd-rich-text-area__list-line"], ["type", "button", "aria-label", "Bullet List", "title", "Bullet List", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click", "ngClass"], ["aria-hidden", "true", 1, "ccd-rich-text-area__list-icon", "ccd-rich-text-area__list-icon--bullet"], ["type", "button", "aria-label", "Decrease Indent", "title", "Decrease Indent", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click"], ["aria-hidden", "true", 1, "ccd-rich-text-area__indent-icon", "ccd-rich-text-area__indent-icon--outdent"], [1, "ccd-rich-text-area__indent-line", "ccd-rich-text-area__indent-line--top"], [1, "ccd-rich-text-area__indent-line", "ccd-rich-text-area__indent-line--middle"], [1, "ccd-rich-text-area__indent-line", "ccd-rich-text-area__indent-line--bottom"], [1, "ccd-rich-text-area__indent-arrow"], ["type", "button", "aria-label", "Increase Indent", "title", "Increase Indent", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click"], ["aria-hidden", "true", 1, "ccd-rich-text-area__indent-icon", "ccd-rich-text-area__indent-icon--indent"], [1, "NgxEditor__Wrapper"], ["outputFormat", "html", 3, "focusIn", "focusOut", "editor", "formControl"], [1, "form-label"], [1, "form-hint", 3, "id"], [1, "error-message", 3, "id"]], template: function WriteRichTextAreaFieldComponent_Template(rf, ctx) { if (rf & 1) {
27599
+ } }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 55, vars: 40, consts: [["editorHost", ""], [1, "form-group", "ccd-rich-text-area", 3, "ngClass"], [3, "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 3, "id", 4, "ngIf"], ["class", "error-message", 3, "id", 4, "ngIf"], [1, "ccd-rich-text-area__editor", 3, "click", "keydown", "keyup", "paste", "ngClass"], ["role", "toolbar", 1, "ccd-rich-text-area__toolbar"], ["type", "button", "aria-label", "Undo", "title", "Undo", "aria-keyshortcuts", "Control+Z", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click"], ["viewBox", "0 0 24 24", "aria-hidden", "true", "focusable", "false", 1, "ccd-rich-text-area__toolbar-icon"], ["d", "M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"], ["type", "button", "aria-label", "Redo", "title", "Redo", "aria-keyshortcuts", "Control+Y", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click"], ["d", "M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"], ["aria-hidden", "true", 1, "ccd-rich-text-area__toolbar-separator"], ["type", "button", "aria-label", "Bold", "title", "Bold", "aria-keyshortcuts", "Control+B", 1, "ccd-rich-text-area__toolbar-button", "ccd-rich-text-area__toolbar-button--bold", 3, "mousedown", "click", "ngClass"], ["d", "M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5S13.83 9.5 13 9.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"], ["type", "button", "aria-label", "Italic", "title", "Italic", "aria-keyshortcuts", "Control+I", 1, "ccd-rich-text-area__toolbar-button", "ccd-rich-text-area__toolbar-button--italic", 3, "mousedown", "click", "ngClass"], ["d", "M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"], ["type", "button", "aria-label", "Underline", "title", "Underline", "aria-keyshortcuts", "Control+U", 1, "ccd-rich-text-area__toolbar-button", "ccd-rich-text-area__toolbar-button--underline", 3, "mousedown", "click", "ngClass"], ["d", "M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z"], ["type", "button", "aria-label", "Paragraph", "title", "Paragraph", 1, "ccd-rich-text-area__toolbar-button", "ccd-rich-text-area__toolbar-button--paragraph", 3, "mousedown", "click", "ngClass"], ["aria-hidden", "true", 1, "ccd-rich-text-area__toolbar-icon", "ccd-rich-text-area__toolbar-icon--paragraph"], ["type", "button", "aria-label", "Bullet List", "title", "Bullet List", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click", "ngClass"], ["d", "M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6C3.17 4.5 2.5 5.17 2.5 6S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zM7 13h14v-2H7v2zm0 6h14v-2H7v2zM7 5v2h14V5H7z"], ["type", "button", "aria-label", "Numbered List", "title", "Numbered List", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click", "ngClass"], ["d", "M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1V14h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z"], [1, "ccd-rich-text-area__list-style"], [1, "ccd-rich-text-area__list-style-label", 3, "for"], [1, "ccd-rich-text-area__list-style-select", 3, "change", "id", "value"], ["value", ""], ["value", "ordered_list"], ["value", "ordered_alpha"], ["value", "ordered_roman"], ["type", "button", "aria-label", "Decrease Indent", "title", "Decrease Indent", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click"], ["d", "M11 17h10v-2H11v2zm-8-5 4 4V8l-4 4zm0 9h18v-2H3v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"], ["type", "button", "aria-label", "Increase Indent", "title", "Increase Indent", 1, "ccd-rich-text-area__toolbar-button", 3, "mousedown", "click"], ["d", "M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"], [1, "NgxEditor__Wrapper"], ["outputFormat", "html", 3, "focusIn", "focusOut", "editor", "formControl"], [1, "form-label"], [1, "form-hint", 3, "id"], [1, "error-message", 3, "id"]], template: function WriteRichTextAreaFieldComponent_Template(rf, ctx) { if (rf & 1) {
27195
27600
  const _r1 = i0.ɵɵgetCurrentView();
27196
27601
  i0.ɵɵelementStart(0, "div", 1)(1, "div", 2);
27197
27602
  i0.ɵɵtemplate(2, WriteRichTextAreaFieldComponent_span_2_Template, 3, 3, "span", 3);
@@ -27201,80 +27606,97 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
27201
27606
  i0.ɵɵlistener("click", function WriteRichTextAreaFieldComponent_Template_div_click_5_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.syncAccessibilityLater()); })("keydown", function WriteRichTextAreaFieldComponent_Template_div_keydown_5_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onEditorKeyDown($event)); })("keyup", function WriteRichTextAreaFieldComponent_Template_div_keyup_5_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.syncAccessibilityLater()); })("paste", function WriteRichTextAreaFieldComponent_Template_div_paste_5_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onPaste($event)); });
27202
27607
  i0.ɵɵelementStart(7, "div", 7)(8, "button", 8);
27203
27608
  i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_8_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_8_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "undo")); });
27204
- i0.ɵɵelementStart(9, "span", 9);
27205
- i0.ɵɵtext(10, "\u21B6");
27609
+ i0.ɵɵnamespaceSVG();
27610
+ i0.ɵɵelementStart(9, "svg", 9);
27611
+ i0.ɵɵelement(10, "path", 10);
27206
27612
  i0.ɵɵelementEnd()();
27207
- i0.ɵɵelementStart(11, "button", 10);
27613
+ i0.ɵɵnamespaceHTML();
27614
+ i0.ɵɵelementStart(11, "button", 11);
27208
27615
  i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_11_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_11_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "redo")); });
27209
- i0.ɵɵelementStart(12, "span", 11);
27210
- i0.ɵɵtext(13, "\u21B7");
27616
+ i0.ɵɵnamespaceSVG();
27617
+ i0.ɵɵelementStart(12, "svg", 9);
27618
+ i0.ɵɵelement(13, "path", 12);
27211
27619
  i0.ɵɵelementEnd()();
27212
- i0.ɵɵelement(14, "span", 12);
27213
- i0.ɵɵelementStart(15, "button", 13);
27620
+ i0.ɵɵnamespaceHTML();
27621
+ i0.ɵɵelement(14, "span", 13);
27622
+ i0.ɵɵelementStart(15, "button", 14);
27214
27623
  i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_15_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_15_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "bold")); });
27215
- i0.ɵɵelementStart(16, "span", 14);
27216
- i0.ɵɵtext(17, "B");
27624
+ i0.ɵɵnamespaceSVG();
27625
+ i0.ɵɵelementStart(16, "svg", 9);
27626
+ i0.ɵɵelement(17, "path", 15);
27217
27627
  i0.ɵɵelementEnd()();
27218
- i0.ɵɵelementStart(18, "button", 15);
27628
+ i0.ɵɵnamespaceHTML();
27629
+ i0.ɵɵelementStart(18, "button", 16);
27219
27630
  i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_18_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_18_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "italic")); });
27220
- i0.ɵɵelementStart(19, "span", 16);
27221
- i0.ɵɵtext(20, "I");
27631
+ i0.ɵɵnamespaceSVG();
27632
+ i0.ɵɵelementStart(19, "svg", 9);
27633
+ i0.ɵɵelement(20, "path", 17);
27222
27634
  i0.ɵɵelementEnd()();
27223
- i0.ɵɵelementStart(21, "button", 17);
27635
+ i0.ɵɵnamespaceHTML();
27636
+ i0.ɵɵelementStart(21, "button", 18);
27224
27637
  i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_21_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_21_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "underline")); });
27225
- i0.ɵɵelementStart(22, "span", 18);
27226
- i0.ɵɵtext(23, "U");
27638
+ i0.ɵɵnamespaceSVG();
27639
+ i0.ɵɵelementStart(22, "svg", 9);
27640
+ i0.ɵɵelement(23, "path", 19);
27227
27641
  i0.ɵɵelementEnd()();
27228
- i0.ɵɵelementStart(24, "button", 19);
27642
+ i0.ɵɵnamespaceHTML();
27643
+ i0.ɵɵelementStart(24, "button", 20);
27229
27644
  i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_24_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_24_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "paragraph")); });
27230
- i0.ɵɵelementStart(25, "span", 20);
27645
+ i0.ɵɵelementStart(25, "span", 21);
27231
27646
  i0.ɵɵtext(26, "P");
27232
27647
  i0.ɵɵelementEnd()();
27233
- i0.ɵɵelementStart(27, "button", 21);
27234
- i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_27_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_27_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "ordered_list")); });
27235
- i0.ɵɵelementStart(28, "span", 22)(29, "span", 23);
27236
- i0.ɵɵtext(30, "1");
27237
- i0.ɵɵelementEnd();
27238
- i0.ɵɵelement(31, "span", 24);
27239
- i0.ɵɵelementStart(32, "span", 23);
27240
- i0.ɵɵtext(33, "2");
27241
- i0.ɵɵelementEnd();
27242
- i0.ɵɵelement(34, "span", 24);
27243
- i0.ɵɵelementStart(35, "span", 23);
27244
- i0.ɵɵtext(36, "3");
27245
- i0.ɵɵelementEnd();
27246
- i0.ɵɵelement(37, "span", 24);
27648
+ i0.ɵɵelement(27, "span", 13);
27649
+ i0.ɵɵelementStart(28, "button", 22);
27650
+ i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_28_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_28_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "bullet_list")); });
27651
+ i0.ɵɵnamespaceSVG();
27652
+ i0.ɵɵelementStart(29, "svg", 9);
27653
+ i0.ɵɵelement(30, "path", 23);
27654
+ i0.ɵɵelementEnd()();
27655
+ i0.ɵɵnamespaceHTML();
27656
+ i0.ɵɵelementStart(31, "button", 24);
27657
+ i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_31_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_31_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "ordered_list")); });
27658
+ i0.ɵɵnamespaceSVG();
27659
+ i0.ɵɵelementStart(32, "svg", 9);
27660
+ i0.ɵɵelement(33, "path", 25);
27247
27661
  i0.ɵɵelementEnd()();
27248
- i0.ɵɵelementStart(38, "button", 25);
27249
- i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_38_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_38_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "bullet_list")); });
27250
- i0.ɵɵelementStart(39, "span", 26)(40, "span", 23);
27251
- i0.ɵɵtext(41, "\u2022");
27662
+ i0.ɵɵnamespaceHTML();
27663
+ i0.ɵɵelementStart(34, "div", 26)(35, "label", 27);
27664
+ i0.ɵɵtext(36, "List style");
27252
27665
  i0.ɵɵelementEnd();
27253
- i0.ɵɵelement(42, "span", 24);
27254
- i0.ɵɵelementStart(43, "span", 23);
27255
- i0.ɵɵtext(44, "\u2022");
27666
+ i0.ɵɵelementStart(37, "select", 28);
27667
+ i0.ɵɵlistener("change", function WriteRichTextAreaFieldComponent_Template_select_change_37_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onListStyleChange($event)); });
27668
+ i0.ɵɵelementStart(38, "option", 29);
27669
+ i0.ɵɵtext(39, "No list");
27256
27670
  i0.ɵɵelementEnd();
27257
- i0.ɵɵelement(45, "span", 24);
27258
- i0.ɵɵelementStart(46, "span", 23);
27259
- i0.ɵɵtext(47, "\u2022");
27671
+ i0.ɵɵelementStart(40, "option", 30);
27672
+ i0.ɵɵtext(41, "Numbers (1, 2, 3)");
27260
27673
  i0.ɵɵelementEnd();
27261
- i0.ɵɵelement(48, "span", 24);
27262
- i0.ɵɵelementEnd()();
27263
- i0.ɵɵelementStart(49, "button", 27);
27264
- i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_49_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_49_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "outdent")); });
27265
- i0.ɵɵelementStart(50, "span", 28);
27266
- i0.ɵɵelement(51, "span", 29)(52, "span", 30)(53, "span", 31)(54, "span", 32);
27674
+ i0.ɵɵelementStart(42, "option", 31);
27675
+ i0.ɵɵtext(43, "Letters (a, b, c)");
27676
+ i0.ɵɵelementEnd();
27677
+ i0.ɵɵelementStart(44, "option", 32);
27678
+ i0.ɵɵtext(45, "Roman numerals (i), (ii), (iii)");
27679
+ i0.ɵɵelementEnd()()();
27680
+ i0.ɵɵelement(46, "span", 13);
27681
+ i0.ɵɵelementStart(47, "button", 33);
27682
+ i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_47_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_47_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "outdent")); });
27683
+ i0.ɵɵnamespaceSVG();
27684
+ i0.ɵɵelementStart(48, "svg", 9);
27685
+ i0.ɵɵelement(49, "path", 34);
27267
27686
  i0.ɵɵelementEnd()();
27268
- i0.ɵɵelementStart(55, "button", 33);
27269
- i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_55_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_55_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "indent")); });
27270
- i0.ɵɵelementStart(56, "span", 34);
27271
- i0.ɵɵelement(57, "span", 29)(58, "span", 30)(59, "span", 31)(60, "span", 32);
27687
+ i0.ɵɵnamespaceHTML();
27688
+ i0.ɵɵelementStart(50, "button", 35);
27689
+ i0.ɵɵlistener("mousedown", function WriteRichTextAreaFieldComponent_Template_button_mousedown_50_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onToolbarButtonMouseDown($event)); })("click", function WriteRichTextAreaFieldComponent_Template_button_click_50_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.executeToolbarCommand($event, "indent")); });
27690
+ i0.ɵɵnamespaceSVG();
27691
+ i0.ɵɵelementStart(51, "svg", 9);
27692
+ i0.ɵɵelement(52, "path", 36);
27272
27693
  i0.ɵɵelementEnd()()();
27273
- i0.ɵɵelementStart(61, "div", 35)(62, "ngx-editor", 36);
27274
- i0.ɵɵlistener("focusIn", function WriteRichTextAreaFieldComponent_Template_ngx_editor_focusIn_62_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.syncAccessibilityLater()); })("focusOut", function WriteRichTextAreaFieldComponent_Template_ngx_editor_focusOut_62_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onEditorFocusOut()); });
27694
+ i0.ɵɵnamespaceHTML();
27695
+ i0.ɵɵelementStart(53, "div", 37)(54, "ngx-editor", 38);
27696
+ i0.ɵɵlistener("focusIn", function WriteRichTextAreaFieldComponent_Template_ngx_editor_focusIn_54_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.syncAccessibilityLater()); })("focusOut", function WriteRichTextAreaFieldComponent_Template_ngx_editor_focusOut_54_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onEditorFocusOut()); });
27275
27697
  i0.ɵɵelementEnd()()()();
27276
27698
  } if (rf & 2) {
27277
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(21, _c1$e, !ctx.richTextAreaControl.valid && ctx.richTextAreaControl.dirty));
27699
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(24, _c1$e, !ctx.richTextAreaControl.valid && ctx.richTextAreaControl.dirty));
27278
27700
  i0.ɵɵadvance();
27279
27701
  i0.ɵɵproperty("id", ctx.labelId());
27280
27702
  i0.ɵɵadvance();
@@ -27284,39 +27706,43 @@ class WriteRichTextAreaFieldComponent extends AbstractFieldWriteComponent {
27284
27706
  i0.ɵɵadvance();
27285
27707
  i0.ɵɵproperty("ngIf", ctx.isInvalid());
27286
27708
  i0.ɵɵadvance();
27287
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(23, _c2$3, ctx.isInvalid()));
27709
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(26, _c2$3, ctx.isInvalid()));
27288
27710
  i0.ɵɵadvance(2);
27289
27711
  i0.ɵɵattribute("aria-label", ctx.toolbarLabel());
27290
27712
  i0.ɵɵadvance(8);
27291
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(25, _c3, ctx.isToolbarCommandActive("bold")));
27713
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(28, _c3, ctx.isToolbarCommandActive("bold")));
27292
27714
  i0.ɵɵattribute("aria-pressed", ctx.isToolbarCommandActive("bold"));
27293
27715
  i0.ɵɵadvance(3);
27294
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(27, _c3, ctx.isToolbarCommandActive("italic")));
27716
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(30, _c3, ctx.isToolbarCommandActive("italic")));
27295
27717
  i0.ɵɵattribute("aria-pressed", ctx.isToolbarCommandActive("italic"));
27296
27718
  i0.ɵɵadvance(3);
27297
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(29, _c3, ctx.isToolbarCommandActive("underline")));
27719
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(32, _c3, ctx.isToolbarCommandActive("underline")));
27298
27720
  i0.ɵɵattribute("aria-pressed", ctx.isToolbarCommandActive("underline"));
27299
27721
  i0.ɵɵadvance(3);
27300
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(31, _c3, ctx.isToolbarCommandActive("paragraph")));
27722
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(34, _c3, ctx.isToolbarCommandActive("paragraph")));
27301
27723
  i0.ɵɵattribute("aria-pressed", ctx.isToolbarCommandActive("paragraph"));
27302
- i0.ɵɵadvance(3);
27303
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(33, _c3, ctx.isToolbarCommandActive("ordered_list")));
27304
- i0.ɵɵattribute("aria-pressed", ctx.isToolbarCommandActive("ordered_list"));
27305
- i0.ɵɵadvance(11);
27306
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(35, _c3, ctx.isToolbarCommandActive("bullet_list")));
27724
+ i0.ɵɵadvance(4);
27725
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(36, _c3, ctx.isToolbarCommandActive("bullet_list")));
27307
27726
  i0.ɵɵattribute("aria-pressed", ctx.isToolbarCommandActive("bullet_list"));
27308
- i0.ɵɵadvance(24);
27727
+ i0.ɵɵadvance(3);
27728
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(38, _c3, ctx.currentListStyle() === "ordered_list"));
27729
+ i0.ɵɵattribute("aria-pressed", ctx.currentListStyle() === "ordered_list");
27730
+ i0.ɵɵadvance(4);
27731
+ i0.ɵɵproperty("for", ctx.listStyleId());
27732
+ i0.ɵɵadvance(2);
27733
+ i0.ɵɵproperty("id", ctx.listStyleId())("value", ctx.currentListSelectValue());
27734
+ i0.ɵɵadvance(17);
27309
27735
  i0.ɵɵproperty("editor", ctx.editor)("formControl", ctx.richTextAreaControl);
27310
- } }, dependencies: [i5.NgClass, i5.NgIf, i4.NgControlStatus, i4.FormControlDirective, i3$1.NgxEditorComponent, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], styles: [".ccd-rich-text-area{margin-bottom:30px}.ccd-rich-text-area__editor{max-width:100%}.ccd-rich-text-area__toolbar{align-items:center;display:flex;flex-wrap:wrap;gap:0 4px;margin-bottom:6px}.ccd-rich-text-area .NgxEditor__Wrapper{border:1px solid #000;border-radius:0;max-width:100%;width:100%}.ccd-rich-text-area .NgxEditor__Wrapper:focus-within{outline:3px solid #ffdd00;outline-offset:0}.ccd-rich-text-area__toolbar-button{background:#fff;align-items:center;border:1px solid #0b0c0c;border-radius:0;color:#0b0c0c;display:inline-flex;font-family:inherit;font-size:18px;font-weight:700;height:36px;justify-content:center;min-width:36px;padding:4px;width:36px}.ccd-rich-text-area__toolbar-button:hover{background:#f3f2f1}.ccd-rich-text-area__toolbar-button:focus{background:#fd0;box-shadow:0 0 0 2px #0b0c0c;outline:3px solid #ffdd00;outline-offset:0}.ccd-rich-text-area__toolbar-button--active{background:#1d70b8;color:#fff}.ccd-rich-text-area__toolbar-button--italic{font-style:italic}.ccd-rich-text-area__toolbar-button--underline{text-decoration:underline}.ccd-rich-text-area__toolbar-separator{border-left:1px solid #b1b4b6;height:36px;margin:0 8px 0 6px}.ccd-rich-text-area__toolbar-icon{display:inline-flex;line-height:1}.ccd-rich-text-area__toolbar-icon--undo,.ccd-rich-text-area__toolbar-icon--redo{font-size:23px;font-weight:400;transform:translateY(-1px)}.ccd-rich-text-area__toolbar-icon--bold{font-size:18px}.ccd-rich-text-area__toolbar-icon--italic{color:inherit;font-size:18px;font-style:italic}.ccd-rich-text-area__toolbar-icon--underline{font-size:18px;text-decoration:underline;text-underline-offset:3px}.ccd-rich-text-area__toolbar-icon--paragraph{font-size:18px}.ccd-rich-text-area__list-icon{column-gap:2px;display:grid;grid-template-columns:8px 13px;grid-template-rows:repeat(3,5px);height:17px;width:23px}.ccd-rich-text-area__list-marker{align-self:center;font-size:9px;font-weight:700;line-height:1;text-align:right}.ccd-rich-text-area__list-icon--ordered .ccd-rich-text-area__list-marker:after{content:\".\"}.ccd-rich-text-area__list-icon--bullet .ccd-rich-text-area__list-marker{font-size:14px;line-height:.5}.ccd-rich-text-area__list-line{align-self:center;border-top:2px solid currentColor;display:block;width:12px}.ccd-rich-text-area__indent-icon{display:block;height:18px;position:relative;width:23px}.ccd-rich-text-area__indent-line{background:currentColor;display:block;height:2px;position:absolute;right:0}.ccd-rich-text-area__indent-line--top{top:3px;width:18px}.ccd-rich-text-area__indent-line--middle{top:8px;width:13px}.ccd-rich-text-area__indent-line--bottom{top:13px;width:18px}.ccd-rich-text-area__indent-arrow{background:currentColor;display:block;height:2px;left:1px;position:absolute;top:8px;width:9px}.ccd-rich-text-area__indent-arrow:before,.ccd-rich-text-area__indent-arrow:after{background:currentColor;content:\"\";display:block;height:2px;position:absolute;top:0;width:6px}.ccd-rich-text-area__indent-icon--outdent .ccd-rich-text-area__indent-arrow:before{left:-1px;transform:rotate(45deg);transform-origin:left center}.ccd-rich-text-area__indent-icon--outdent .ccd-rich-text-area__indent-arrow:after{left:-1px;transform:rotate(-45deg);transform-origin:left center}.ccd-rich-text-area__indent-icon--indent .ccd-rich-text-area__indent-arrow:before{right:-1px;transform:rotate(45deg);transform-origin:right center}.ccd-rich-text-area__indent-icon--indent .ccd-rich-text-area__indent-arrow:after{right:-1px;transform:rotate(-45deg);transform-origin:right center}.ccd-rich-text-area .NgxEditor__Wrapper .NgxEditor{border:0;border-radius:0;height:255px;min-height:255px;overflow:hidden;width:100%}.ccd-rich-text-area__editor--error .NgxEditor__Wrapper{border-color:#d4351c}.ccd-rich-text-area .NgxEditor__Content{box-sizing:border-box;height:255px;min-height:255px;overflow-x:hidden;overflow-y:auto;padding:12px 14px}.ccd-rich-text-area .ProseMirror{min-height:231px;outline:0;overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal}.ccd-rich-text-area .ProseMirror [data-indent=\"1\"]{margin-left:40px}.ccd-rich-text-area .ProseMirror [data-indent=\"2\"]{margin-left:80px}.ccd-rich-text-area .ProseMirror [data-indent=\"3\"]{margin-left:120px}.ccd-rich-text-area .ProseMirror [data-indent=\"4\"]{margin-left:160px}.ccd-rich-text-area .ProseMirror [data-indent=\"5\"]{margin-left:200px}.ccd-rich-text-area .ProseMirror [data-indent=\"6\"]{margin-left:240px}.ccd-rich-text-area .ProseMirror strong,.ccd-rich-text-area .ProseMirror strong *,.ccd-rich-text-area .ProseMirror b,.ccd-rich-text-area .ProseMirror b *{font-weight:700}.ccd-rich-text-area .ProseMirror strong u,.ccd-rich-text-area .ProseMirror u strong,.ccd-rich-text-area .ProseMirror b u,.ccd-rich-text-area .ProseMirror u b{font-weight:700!important;text-decoration:underline}.ccd-rich-text-area .ProseMirror:focus{box-shadow:none;outline:0}.ccd-rich-text-area .ProseMirror p,.ccd-rich-text-area .ProseMirror ul,.ccd-rich-text-area .ProseMirror ol{margin-top:0;overflow-wrap:anywhere;word-break:normal}.ccd-rich-text-area .ProseMirror ul{list-style:disc outside;padding-left:25px}.ccd-rich-text-area .ProseMirror ol{list-style:decimal outside;padding-left:25px}.ccd-rich-text-area .ProseMirror li{display:list-item;margin-bottom:5px}.ccd-rich-text-area .ProseMirror li>p{margin:0}\n"], encapsulation: 2 });
27736
+ } }, dependencies: [i5.NgClass, i5.NgIf, i4.NgSelectOption, i4.ɵNgSelectMultipleOption, i4.NgControlStatus, i4.FormControlDirective, i3$1.NgxEditorComponent, FieldLabelPipe, FirstErrorPipe, i1.RpxTranslatePipe], styles: [".ccd-rich-text-area{margin-bottom:30px}.ccd-rich-text-area__editor{max-width:100%}.ccd-rich-text-area__toolbar{align-items:center;background:#fff;border:1px solid #d8dde0;border-radius:6px;display:flex;flex-wrap:wrap;gap:2px;margin-bottom:10px;padding:6px 8px;width:fit-content}.ccd-rich-text-area .NgxEditor__Wrapper{border:1px solid #000;border-radius:0;max-width:100%;width:100%}.ccd-rich-text-area .NgxEditor__Wrapper:focus-within{outline:3px solid #ffdd00;outline-offset:0}.ccd-rich-text-area__toolbar-button{background:#fff;align-items:center;border:0;border-radius:2px;color:#0b0c0c;display:inline-flex;font-family:inherit;font-size:18px;font-weight:700;height:28px;justify-content:center;min-width:28px;padding:4px;width:28px}.ccd-rich-text-area__toolbar-button:hover{background:#f3f2f1}.ccd-rich-text-area__toolbar-button:focus{background:#fd0;box-shadow:0 0 0 2px #0b0c0c;outline:2px solid #ffdd00;outline-offset:0}.ccd-rich-text-area__toolbar-button--active{background:#1d70b8;color:#fff}.ccd-rich-text-area__toolbar-button--italic{font-style:italic}.ccd-rich-text-area__toolbar-button--underline{text-decoration:underline}.ccd-rich-text-area__toolbar-separator{border-left:1px solid #b1b4b6;height:24px;margin:0 5px 0 3px}.ccd-rich-text-area__list-style{align-items:center;display:inline-flex;gap:8px;margin:0 4px}.ccd-rich-text-area__list-style-label{font-weight:700;white-space:nowrap}.ccd-rich-text-area__list-style-select{background-color:#fff;border:1px solid #0b0c0c;border-radius:0;color:#0b0c0c;font-family:inherit;font-size:16px;height:32px;min-width:190px;padding:2px 28px 2px 8px}.ccd-rich-text-area__list-style-select:focus{box-shadow:0 0 0 2px #0b0c0c;outline:3px solid #ffdd00;outline-offset:0}.ccd-rich-text-area__toolbar-icon{display:block;fill:currentColor;height:20px;width:20px}.ccd-rich-text-area__toolbar-icon--paragraph{display:inline-flex;font-size:18px;line-height:1;width:auto}.ccd-rich-text-area .NgxEditor__Wrapper .NgxEditor{border:0;border-radius:0;height:255px;min-height:255px;overflow:hidden;width:100%}.ccd-rich-text-area__editor--error .NgxEditor__Wrapper{border-color:#d4351c}.ccd-rich-text-area .NgxEditor__Content{box-sizing:border-box;height:255px;min-height:255px;overflow-x:hidden;overflow-y:auto;padding:12px 14px}.ccd-rich-text-area .ProseMirror{min-height:231px;outline:0;overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal}.ccd-rich-text-area .ProseMirror [data-indent=\"1\"]{margin-left:40px}.ccd-rich-text-area .ProseMirror [data-indent=\"2\"]{margin-left:80px}.ccd-rich-text-area .ProseMirror [data-indent=\"3\"]{margin-left:120px}.ccd-rich-text-area .ProseMirror [data-indent=\"4\"]{margin-left:160px}.ccd-rich-text-area .ProseMirror [data-indent=\"5\"]{margin-left:200px}.ccd-rich-text-area .ProseMirror [data-indent=\"6\"]{margin-left:240px}.ccd-rich-text-area .ProseMirror strong,.ccd-rich-text-area .ProseMirror strong *,.ccd-rich-text-area .ProseMirror b,.ccd-rich-text-area .ProseMirror b *{font-weight:700}.ccd-rich-text-area .ProseMirror strong u,.ccd-rich-text-area .ProseMirror u strong,.ccd-rich-text-area .ProseMirror b u,.ccd-rich-text-area .ProseMirror u b{font-weight:700!important;text-decoration:underline}.ccd-rich-text-area .ProseMirror:focus{box-shadow:none;outline:0}.ccd-rich-text-area .ProseMirror p,.ccd-rich-text-area .ProseMirror ul,.ccd-rich-text-area .ProseMirror ol{margin-top:0;overflow-wrap:anywhere;word-break:normal}.ccd-rich-text-area .ProseMirror ul{list-style:disc outside;padding-left:25px}.ccd-rich-text-area .ProseMirror ol{list-style:decimal outside;padding-left:25px}.ccd-rich-text-area .ProseMirror ol[type=a]{list-style-type:lower-alpha}.ccd-rich-text-area .ProseMirror ol[type=i]{list-style-type:lower-roman}.ccd-rich-text-area .ProseMirror ol[type=i]>li::marker{content:\"(\" counter(list-item,lower-roman) \") \"}.ccd-rich-text-area .ProseMirror li{display:list-item;margin-bottom:5px}.ccd-rich-text-area .ProseMirror li>p{margin:0}\n"], encapsulation: 2 });
27311
27737
  }
27312
27738
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteRichTextAreaFieldComponent, [{
27313
27739
  type: Component,
27314
- args: [{ selector: 'ccd-write-rich-text-area-field', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"form-group ccd-rich-text-area\" [ngClass]=\"{'form-group-error': !richTextAreaControl.valid && richTextAreaControl.dirty}\">\n <div [id]=\"labelId()\">\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{caseField | ccdFieldLabel}}</span>\n </div>\n <span [id]=\"hintId()\" class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span [id]=\"errorId()\" class=\"error-message\" *ngIf=\"isInvalid()\">\n {{richTextAreaControl.errors | ccdFirstError:caseField.label}}\n </span>\n\n <div\n #editorHost\n class=\"ccd-rich-text-area__editor\"\n [ngClass]=\"{'ccd-rich-text-area__editor--error': isInvalid()}\"\n (click)=\"syncAccessibilityLater()\"\n (keydown)=\"onEditorKeyDown($event)\"\n (keyup)=\"syncAccessibilityLater()\"\n (paste)=\"onPaste($event)\">\n <div\n class=\"ccd-rich-text-area__toolbar\"\n role=\"toolbar\"\n [attr.aria-label]=\"toolbarLabel()\">\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n aria-label=\"Undo\"\n title=\"Undo\"\n aria-keyshortcuts=\"Control+Z\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'undo')\">\n <span class=\"ccd-rich-text-area__toolbar-icon ccd-rich-text-area__toolbar-icon--undo\" aria-hidden=\"true\">&#8630;</span>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n aria-label=\"Redo\"\n title=\"Redo\"\n aria-keyshortcuts=\"Control+Y\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'redo')\">\n <span class=\"ccd-rich-text-area__toolbar-icon ccd-rich-text-area__toolbar-icon--redo\" aria-hidden=\"true\">&#8631;</span>\n </button>\n <span class=\"ccd-rich-text-area__toolbar-separator\" aria-hidden=\"true\"></span>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button ccd-rich-text-area__toolbar-button--bold\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('bold')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('bold')\"\n aria-label=\"Bold\"\n title=\"Bold\"\n aria-keyshortcuts=\"Control+B\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'bold')\">\n <span class=\"ccd-rich-text-area__toolbar-icon ccd-rich-text-area__toolbar-icon--bold\" aria-hidden=\"true\">B</span>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button ccd-rich-text-area__toolbar-button--italic\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('italic')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('italic')\"\n aria-label=\"Italic\"\n title=\"Italic\"\n aria-keyshortcuts=\"Control+I\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'italic')\">\n <span class=\"ccd-rich-text-area__toolbar-icon ccd-rich-text-area__toolbar-icon--italic\" aria-hidden=\"true\">I</span>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button ccd-rich-text-area__toolbar-button--underline\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('underline')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('underline')\"\n aria-label=\"Underline\"\n title=\"Underline\"\n aria-keyshortcuts=\"Control+U\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'underline')\">\n <span class=\"ccd-rich-text-area__toolbar-icon ccd-rich-text-area__toolbar-icon--underline\" aria-hidden=\"true\">U</span>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button ccd-rich-text-area__toolbar-button--paragraph\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('paragraph')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('paragraph')\"\n aria-label=\"Paragraph\"\n title=\"Paragraph\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'paragraph')\">\n <span class=\"ccd-rich-text-area__toolbar-icon ccd-rich-text-area__toolbar-icon--paragraph\" aria-hidden=\"true\">P</span>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('ordered_list')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('ordered_list')\"\n aria-label=\"Ordered List\"\n title=\"Ordered List\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'ordered_list')\">\n <span class=\"ccd-rich-text-area__list-icon ccd-rich-text-area__list-icon--ordered\" aria-hidden=\"true\">\n <span class=\"ccd-rich-text-area__list-marker\">1</span>\n <span class=\"ccd-rich-text-area__list-line\"></span>\n <span class=\"ccd-rich-text-area__list-marker\">2</span>\n <span class=\"ccd-rich-text-area__list-line\"></span>\n <span class=\"ccd-rich-text-area__list-marker\">3</span>\n <span class=\"ccd-rich-text-area__list-line\"></span>\n </span>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('bullet_list')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('bullet_list')\"\n aria-label=\"Bullet List\"\n title=\"Bullet List\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'bullet_list')\">\n <span class=\"ccd-rich-text-area__list-icon ccd-rich-text-area__list-icon--bullet\" aria-hidden=\"true\">\n <span class=\"ccd-rich-text-area__list-marker\">&#8226;</span>\n <span class=\"ccd-rich-text-area__list-line\"></span>\n <span class=\"ccd-rich-text-area__list-marker\">&#8226;</span>\n <span class=\"ccd-rich-text-area__list-line\"></span>\n <span class=\"ccd-rich-text-area__list-marker\">&#8226;</span>\n <span class=\"ccd-rich-text-area__list-line\"></span>\n </span>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n aria-label=\"Decrease Indent\"\n title=\"Decrease Indent\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'outdent')\">\n <span class=\"ccd-rich-text-area__indent-icon ccd-rich-text-area__indent-icon--outdent\" aria-hidden=\"true\">\n <span class=\"ccd-rich-text-area__indent-line ccd-rich-text-area__indent-line--top\"></span>\n <span class=\"ccd-rich-text-area__indent-line ccd-rich-text-area__indent-line--middle\"></span>\n <span class=\"ccd-rich-text-area__indent-line ccd-rich-text-area__indent-line--bottom\"></span>\n <span class=\"ccd-rich-text-area__indent-arrow\"></span>\n </span>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n aria-label=\"Increase Indent\"\n title=\"Increase Indent\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'indent')\">\n <span class=\"ccd-rich-text-area__indent-icon ccd-rich-text-area__indent-icon--indent\" aria-hidden=\"true\">\n <span class=\"ccd-rich-text-area__indent-line ccd-rich-text-area__indent-line--top\"></span>\n <span class=\"ccd-rich-text-area__indent-line ccd-rich-text-area__indent-line--middle\"></span>\n <span class=\"ccd-rich-text-area__indent-line ccd-rich-text-area__indent-line--bottom\"></span>\n <span class=\"ccd-rich-text-area__indent-arrow\"></span>\n </span>\n </button>\n </div>\n\n <div class=\"NgxEditor__Wrapper\">\n <ngx-editor\n [editor]=\"editor\"\n [formControl]=\"richTextAreaControl\"\n outputFormat=\"html\"\n (focusIn)=\"syncAccessibilityLater()\"\n (focusOut)=\"onEditorFocusOut()\">\n </ngx-editor>\n </div>\n </div>\n</div>\n", styles: [".ccd-rich-text-area{margin-bottom:30px}.ccd-rich-text-area__editor{max-width:100%}.ccd-rich-text-area__toolbar{align-items:center;display:flex;flex-wrap:wrap;gap:0 4px;margin-bottom:6px}.ccd-rich-text-area .NgxEditor__Wrapper{border:1px solid #000;border-radius:0;max-width:100%;width:100%}.ccd-rich-text-area .NgxEditor__Wrapper:focus-within{outline:3px solid #ffdd00;outline-offset:0}.ccd-rich-text-area__toolbar-button{background:#fff;align-items:center;border:1px solid #0b0c0c;border-radius:0;color:#0b0c0c;display:inline-flex;font-family:inherit;font-size:18px;font-weight:700;height:36px;justify-content:center;min-width:36px;padding:4px;width:36px}.ccd-rich-text-area__toolbar-button:hover{background:#f3f2f1}.ccd-rich-text-area__toolbar-button:focus{background:#fd0;box-shadow:0 0 0 2px #0b0c0c;outline:3px solid #ffdd00;outline-offset:0}.ccd-rich-text-area__toolbar-button--active{background:#1d70b8;color:#fff}.ccd-rich-text-area__toolbar-button--italic{font-style:italic}.ccd-rich-text-area__toolbar-button--underline{text-decoration:underline}.ccd-rich-text-area__toolbar-separator{border-left:1px solid #b1b4b6;height:36px;margin:0 8px 0 6px}.ccd-rich-text-area__toolbar-icon{display:inline-flex;line-height:1}.ccd-rich-text-area__toolbar-icon--undo,.ccd-rich-text-area__toolbar-icon--redo{font-size:23px;font-weight:400;transform:translateY(-1px)}.ccd-rich-text-area__toolbar-icon--bold{font-size:18px}.ccd-rich-text-area__toolbar-icon--italic{color:inherit;font-size:18px;font-style:italic}.ccd-rich-text-area__toolbar-icon--underline{font-size:18px;text-decoration:underline;text-underline-offset:3px}.ccd-rich-text-area__toolbar-icon--paragraph{font-size:18px}.ccd-rich-text-area__list-icon{column-gap:2px;display:grid;grid-template-columns:8px 13px;grid-template-rows:repeat(3,5px);height:17px;width:23px}.ccd-rich-text-area__list-marker{align-self:center;font-size:9px;font-weight:700;line-height:1;text-align:right}.ccd-rich-text-area__list-icon--ordered .ccd-rich-text-area__list-marker:after{content:\".\"}.ccd-rich-text-area__list-icon--bullet .ccd-rich-text-area__list-marker{font-size:14px;line-height:.5}.ccd-rich-text-area__list-line{align-self:center;border-top:2px solid currentColor;display:block;width:12px}.ccd-rich-text-area__indent-icon{display:block;height:18px;position:relative;width:23px}.ccd-rich-text-area__indent-line{background:currentColor;display:block;height:2px;position:absolute;right:0}.ccd-rich-text-area__indent-line--top{top:3px;width:18px}.ccd-rich-text-area__indent-line--middle{top:8px;width:13px}.ccd-rich-text-area__indent-line--bottom{top:13px;width:18px}.ccd-rich-text-area__indent-arrow{background:currentColor;display:block;height:2px;left:1px;position:absolute;top:8px;width:9px}.ccd-rich-text-area__indent-arrow:before,.ccd-rich-text-area__indent-arrow:after{background:currentColor;content:\"\";display:block;height:2px;position:absolute;top:0;width:6px}.ccd-rich-text-area__indent-icon--outdent .ccd-rich-text-area__indent-arrow:before{left:-1px;transform:rotate(45deg);transform-origin:left center}.ccd-rich-text-area__indent-icon--outdent .ccd-rich-text-area__indent-arrow:after{left:-1px;transform:rotate(-45deg);transform-origin:left center}.ccd-rich-text-area__indent-icon--indent .ccd-rich-text-area__indent-arrow:before{right:-1px;transform:rotate(45deg);transform-origin:right center}.ccd-rich-text-area__indent-icon--indent .ccd-rich-text-area__indent-arrow:after{right:-1px;transform:rotate(-45deg);transform-origin:right center}.ccd-rich-text-area .NgxEditor__Wrapper .NgxEditor{border:0;border-radius:0;height:255px;min-height:255px;overflow:hidden;width:100%}.ccd-rich-text-area__editor--error .NgxEditor__Wrapper{border-color:#d4351c}.ccd-rich-text-area .NgxEditor__Content{box-sizing:border-box;height:255px;min-height:255px;overflow-x:hidden;overflow-y:auto;padding:12px 14px}.ccd-rich-text-area .ProseMirror{min-height:231px;outline:0;overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal}.ccd-rich-text-area .ProseMirror [data-indent=\"1\"]{margin-left:40px}.ccd-rich-text-area .ProseMirror [data-indent=\"2\"]{margin-left:80px}.ccd-rich-text-area .ProseMirror [data-indent=\"3\"]{margin-left:120px}.ccd-rich-text-area .ProseMirror [data-indent=\"4\"]{margin-left:160px}.ccd-rich-text-area .ProseMirror [data-indent=\"5\"]{margin-left:200px}.ccd-rich-text-area .ProseMirror [data-indent=\"6\"]{margin-left:240px}.ccd-rich-text-area .ProseMirror strong,.ccd-rich-text-area .ProseMirror strong *,.ccd-rich-text-area .ProseMirror b,.ccd-rich-text-area .ProseMirror b *{font-weight:700}.ccd-rich-text-area .ProseMirror strong u,.ccd-rich-text-area .ProseMirror u strong,.ccd-rich-text-area .ProseMirror b u,.ccd-rich-text-area .ProseMirror u b{font-weight:700!important;text-decoration:underline}.ccd-rich-text-area .ProseMirror:focus{box-shadow:none;outline:0}.ccd-rich-text-area .ProseMirror p,.ccd-rich-text-area .ProseMirror ul,.ccd-rich-text-area .ProseMirror ol{margin-top:0;overflow-wrap:anywhere;word-break:normal}.ccd-rich-text-area .ProseMirror ul{list-style:disc outside;padding-left:25px}.ccd-rich-text-area .ProseMirror ol{list-style:decimal outside;padding-left:25px}.ccd-rich-text-area .ProseMirror li{display:list-item;margin-bottom:5px}.ccd-rich-text-area .ProseMirror li>p{margin:0}\n"] }]
27740
+ args: [{ selector: 'ccd-write-rich-text-area-field', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"form-group ccd-rich-text-area\" [ngClass]=\"{'form-group-error': !richTextAreaControl.valid && richTextAreaControl.dirty}\">\n <div [id]=\"labelId()\">\n <span class=\"form-label\" *ngIf=\"caseField.label\">{{caseField | ccdFieldLabel}}</span>\n </div>\n <span [id]=\"hintId()\" class=\"form-hint\" *ngIf=\"caseField.hint_text\">{{caseField.hint_text | rpxTranslate}}</span>\n <span [id]=\"errorId()\" class=\"error-message\" *ngIf=\"isInvalid()\">\n {{richTextAreaControl.errors | ccdFirstError:caseField.label}}\n </span>\n\n <div\n #editorHost\n class=\"ccd-rich-text-area__editor\"\n [ngClass]=\"{'ccd-rich-text-area__editor--error': isInvalid()}\"\n (click)=\"syncAccessibilityLater()\"\n (keydown)=\"onEditorKeyDown($event)\"\n (keyup)=\"syncAccessibilityLater()\"\n (paste)=\"onPaste($event)\">\n <div\n class=\"ccd-rich-text-area__toolbar\"\n role=\"toolbar\"\n [attr.aria-label]=\"toolbarLabel()\">\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n aria-label=\"Undo\"\n title=\"Undo\"\n aria-keyshortcuts=\"Control+Z\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'undo')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z\"></path>\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n aria-label=\"Redo\"\n title=\"Redo\"\n aria-keyshortcuts=\"Control+Y\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'redo')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z\"></path>\n </svg>\n </button>\n <span class=\"ccd-rich-text-area__toolbar-separator\" aria-hidden=\"true\"></span>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button ccd-rich-text-area__toolbar-button--bold\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('bold')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('bold')\"\n aria-label=\"Bold\"\n title=\"Bold\"\n aria-keyshortcuts=\"Control+B\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'bold')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5S13.83 9.5 13 9.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z\"></path>\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button ccd-rich-text-area__toolbar-button--italic\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('italic')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('italic')\"\n aria-label=\"Italic\"\n title=\"Italic\"\n aria-keyshortcuts=\"Control+I\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'italic')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z\"></path>\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button ccd-rich-text-area__toolbar-button--underline\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('underline')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('underline')\"\n aria-label=\"Underline\"\n title=\"Underline\"\n aria-keyshortcuts=\"Control+U\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'underline')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z\"></path>\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button ccd-rich-text-area__toolbar-button--paragraph\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('paragraph')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('paragraph')\"\n aria-label=\"Paragraph\"\n title=\"Paragraph\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'paragraph')\">\n <span class=\"ccd-rich-text-area__toolbar-icon ccd-rich-text-area__toolbar-icon--paragraph\" aria-hidden=\"true\">P</span>\n </button>\n <span class=\"ccd-rich-text-area__toolbar-separator\" aria-hidden=\"true\"></span>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': isToolbarCommandActive('bullet_list')}\"\n [attr.aria-pressed]=\"isToolbarCommandActive('bullet_list')\"\n aria-label=\"Bullet List\"\n title=\"Bullet List\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'bullet_list')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6C3.17 4.5 2.5 5.17 2.5 6S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zM7 13h14v-2H7v2zm0 6h14v-2H7v2zM7 5v2h14V5H7z\"></path>\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n [ngClass]=\"{'ccd-rich-text-area__toolbar-button--active': currentListStyle() === 'ordered_list'}\"\n [attr.aria-pressed]=\"currentListStyle() === 'ordered_list'\"\n aria-label=\"Numbered List\"\n title=\"Numbered List\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'ordered_list')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1V14h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z\"></path>\n </svg>\n </button>\n <div class=\"ccd-rich-text-area__list-style\">\n <label class=\"ccd-rich-text-area__list-style-label\" [for]=\"listStyleId()\">List style</label>\n <select\n class=\"ccd-rich-text-area__list-style-select\"\n [id]=\"listStyleId()\"\n [value]=\"currentListSelectValue()\"\n (change)=\"onListStyleChange($event)\">\n <option value=\"\">No list</option>\n <option value=\"ordered_list\">Numbers (1, 2, 3)</option>\n <option value=\"ordered_alpha\">Letters (a, b, c)</option>\n <option value=\"ordered_roman\">Roman numerals (i), (ii), (iii)</option>\n </select>\n </div>\n <span class=\"ccd-rich-text-area__toolbar-separator\" aria-hidden=\"true\"></span>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n aria-label=\"Decrease Indent\"\n title=\"Decrease Indent\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'outdent')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M11 17h10v-2H11v2zm-8-5 4 4V8l-4 4zm0 9h18v-2H3v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z\"></path>\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"ccd-rich-text-area__toolbar-button\"\n aria-label=\"Increase Indent\"\n title=\"Increase Indent\"\n (mousedown)=\"onToolbarButtonMouseDown($event)\"\n (click)=\"executeToolbarCommand($event, 'indent')\">\n <svg class=\"ccd-rich-text-area__toolbar-icon\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"NgxEditor__Wrapper\">\n <ngx-editor\n [editor]=\"editor\"\n [formControl]=\"richTextAreaControl\"\n outputFormat=\"html\"\n (focusIn)=\"syncAccessibilityLater()\"\n (focusOut)=\"onEditorFocusOut()\">\n </ngx-editor>\n </div>\n </div>\n</div>\n", styles: [".ccd-rich-text-area{margin-bottom:30px}.ccd-rich-text-area__editor{max-width:100%}.ccd-rich-text-area__toolbar{align-items:center;background:#fff;border:1px solid #d8dde0;border-radius:6px;display:flex;flex-wrap:wrap;gap:2px;margin-bottom:10px;padding:6px 8px;width:fit-content}.ccd-rich-text-area .NgxEditor__Wrapper{border:1px solid #000;border-radius:0;max-width:100%;width:100%}.ccd-rich-text-area .NgxEditor__Wrapper:focus-within{outline:3px solid #ffdd00;outline-offset:0}.ccd-rich-text-area__toolbar-button{background:#fff;align-items:center;border:0;border-radius:2px;color:#0b0c0c;display:inline-flex;font-family:inherit;font-size:18px;font-weight:700;height:28px;justify-content:center;min-width:28px;padding:4px;width:28px}.ccd-rich-text-area__toolbar-button:hover{background:#f3f2f1}.ccd-rich-text-area__toolbar-button:focus{background:#fd0;box-shadow:0 0 0 2px #0b0c0c;outline:2px solid #ffdd00;outline-offset:0}.ccd-rich-text-area__toolbar-button--active{background:#1d70b8;color:#fff}.ccd-rich-text-area__toolbar-button--italic{font-style:italic}.ccd-rich-text-area__toolbar-button--underline{text-decoration:underline}.ccd-rich-text-area__toolbar-separator{border-left:1px solid #b1b4b6;height:24px;margin:0 5px 0 3px}.ccd-rich-text-area__list-style{align-items:center;display:inline-flex;gap:8px;margin:0 4px}.ccd-rich-text-area__list-style-label{font-weight:700;white-space:nowrap}.ccd-rich-text-area__list-style-select{background-color:#fff;border:1px solid #0b0c0c;border-radius:0;color:#0b0c0c;font-family:inherit;font-size:16px;height:32px;min-width:190px;padding:2px 28px 2px 8px}.ccd-rich-text-area__list-style-select:focus{box-shadow:0 0 0 2px #0b0c0c;outline:3px solid #ffdd00;outline-offset:0}.ccd-rich-text-area__toolbar-icon{display:block;fill:currentColor;height:20px;width:20px}.ccd-rich-text-area__toolbar-icon--paragraph{display:inline-flex;font-size:18px;line-height:1;width:auto}.ccd-rich-text-area .NgxEditor__Wrapper .NgxEditor{border:0;border-radius:0;height:255px;min-height:255px;overflow:hidden;width:100%}.ccd-rich-text-area__editor--error .NgxEditor__Wrapper{border-color:#d4351c}.ccd-rich-text-area .NgxEditor__Content{box-sizing:border-box;height:255px;min-height:255px;overflow-x:hidden;overflow-y:auto;padding:12px 14px}.ccd-rich-text-area .ProseMirror{min-height:231px;outline:0;overflow-wrap:anywhere;white-space:pre-wrap;word-break:normal}.ccd-rich-text-area .ProseMirror [data-indent=\"1\"]{margin-left:40px}.ccd-rich-text-area .ProseMirror [data-indent=\"2\"]{margin-left:80px}.ccd-rich-text-area .ProseMirror [data-indent=\"3\"]{margin-left:120px}.ccd-rich-text-area .ProseMirror [data-indent=\"4\"]{margin-left:160px}.ccd-rich-text-area .ProseMirror [data-indent=\"5\"]{margin-left:200px}.ccd-rich-text-area .ProseMirror [data-indent=\"6\"]{margin-left:240px}.ccd-rich-text-area .ProseMirror strong,.ccd-rich-text-area .ProseMirror strong *,.ccd-rich-text-area .ProseMirror b,.ccd-rich-text-area .ProseMirror b *{font-weight:700}.ccd-rich-text-area .ProseMirror strong u,.ccd-rich-text-area .ProseMirror u strong,.ccd-rich-text-area .ProseMirror b u,.ccd-rich-text-area .ProseMirror u b{font-weight:700!important;text-decoration:underline}.ccd-rich-text-area .ProseMirror:focus{box-shadow:none;outline:0}.ccd-rich-text-area .ProseMirror p,.ccd-rich-text-area .ProseMirror ul,.ccd-rich-text-area .ProseMirror ol{margin-top:0;overflow-wrap:anywhere;word-break:normal}.ccd-rich-text-area .ProseMirror ul{list-style:disc outside;padding-left:25px}.ccd-rich-text-area .ProseMirror ol{list-style:decimal outside;padding-left:25px}.ccd-rich-text-area .ProseMirror ol[type=a]{list-style-type:lower-alpha}.ccd-rich-text-area .ProseMirror ol[type=i]{list-style-type:lower-roman}.ccd-rich-text-area .ProseMirror ol[type=i]>li::marker{content:\"(\" counter(list-item,lower-roman) \") \"}.ccd-rich-text-area .ProseMirror li{display:list-item;margin-bottom:5px}.ccd-rich-text-area .ProseMirror li>p{margin:0}\n"] }]
27315
27741
  }], null, { editorHost: [{
27316
27742
  type: ViewChild,
27317
27743
  args: ['editorHost']
27318
27744
  }] }); })();
27319
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteRichTextAreaFieldComponent, { className: "WriteRichTextAreaFieldComponent", filePath: "lib/shared/components/palette/rich-text-area/write-rich-text-area-field.component.ts", lineNumber: 75 }); })();
27745
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(WriteRichTextAreaFieldComponent, { className: "WriteRichTextAreaFieldComponent", filePath: "lib/shared/components/palette/rich-text-area/write-rich-text-area-field.component.ts", lineNumber: 107 }); })();
27320
27746
 
27321
27747
  class ReadTextFieldComponent extends AbstractFieldReadComponent {
27322
27748
  static ɵfac = /*@__PURE__*/ (() => { let ɵReadTextFieldComponent_BaseFactory; return function ReadTextFieldComponent_Factory(__ngFactoryType__) { return (ɵReadTextFieldComponent_BaseFactory || (ɵReadTextFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadTextFieldComponent)))(__ngFactoryType__ || ReadTextFieldComponent); }; })();