@alfresco/adf-process-services-cloud 8.4.0-17436326136 → 8.4.0-17439184033

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.
@@ -69,8 +69,8 @@ import * as i5$3 from '@angular/material/table';
69
69
  import { MatTableModule } from '@angular/material/table';
70
70
  import * as i3$3 from '@angular/material/radio';
71
71
  import { MatRadioModule } from '@angular/material/radio';
72
+ import { DomSanitizer } from '@angular/platform-browser';
72
73
  import edjsHTML from 'editorjs-html';
73
- import * as i2$5 from '@angular/platform-browser';
74
74
 
75
75
  /*!
76
76
  * @license
@@ -14373,10 +14373,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
14373
14373
  * See the License for the specific language governing permissions and
14374
14374
  * limitations under the License.
14375
14375
  */
14376
- /* eslint-disable @angular-eslint/component-selector */
14377
- class DisplayRichTextWidgetComponent extends WidgetComponent {
14376
+ class RichTextParserService {
14378
14377
  static { this.CUSTOM_PARSER = {
14379
14378
  header: (block) => {
14379
+ if (!block.data || !block.data.text || !block.data.level) {
14380
+ return '';
14381
+ }
14380
14382
  const paragraphAlign = block.data.alignment || block.data.align || block.tunes?.anyTuneName?.alignment;
14381
14383
  if (typeof paragraphAlign !== 'undefined' && ['left', 'right', 'center'].includes(paragraphAlign)) {
14382
14384
  return `<h${block.data.level} class="ce-tune-alignment--${paragraphAlign}">${block.data.text}</h${block.data.level}>`;
@@ -14386,6 +14388,9 @@ class DisplayRichTextWidgetComponent extends WidgetComponent {
14386
14388
  }
14387
14389
  },
14388
14390
  paragraph: (block) => {
14391
+ if (!block.data || !block.data.text) {
14392
+ return '';
14393
+ }
14389
14394
  const paragraphAlign = block.data.alignment || block.data.align || block.tunes?.anyTuneName?.alignment;
14390
14395
  if (typeof paragraphAlign !== 'undefined' && ['left', 'right', 'center', 'justify'].includes(paragraphAlign)) {
14391
14396
  return `<p class="ce-tune-alignment--${paragraphAlign}">${block.data.text}</p>`;
@@ -14395,24 +14400,50 @@ class DisplayRichTextWidgetComponent extends WidgetComponent {
14395
14400
  }
14396
14401
  }
14397
14402
  }; }
14398
- constructor(formService, sanitizer) {
14403
+ parse(richText) {
14404
+ return edjsHTML(RichTextParserService.CUSTOM_PARSER, { strict: true }).parse(richText);
14405
+ }
14406
+ }
14407
+
14408
+ /*!
14409
+ * @license
14410
+ * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
14411
+ *
14412
+ * Licensed under the Apache License, Version 2.0 (the "License");
14413
+ * you may not use this file except in compliance with the License.
14414
+ * You may obtain a copy of the License at
14415
+ *
14416
+ * http://www.apache.org/licenses/LICENSE-2.0
14417
+ *
14418
+ * Unless required by applicable law or agreed to in writing, software
14419
+ * distributed under the License is distributed on an "AS IS" BASIS,
14420
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14421
+ * See the License for the specific language governing permissions and
14422
+ * limitations under the License.
14423
+ */
14424
+ /* eslint-disable @angular-eslint/component-selector */
14425
+ const RICH_TEXT_PARSER_TOKEN = new InjectionToken('RichTextParserService', {
14426
+ factory: () => new RichTextParserService()
14427
+ });
14428
+ class DisplayRichTextWidgetComponent extends WidgetComponent {
14429
+ constructor(formService) {
14399
14430
  super(formService);
14400
- this.formService = formService;
14401
- this.sanitizer = sanitizer;
14431
+ this.richTextParserService = inject(RICH_TEXT_PARSER_TOKEN);
14432
+ this.sanitizer = inject(DomSanitizer);
14402
14433
  }
14403
14434
  ngOnInit() {
14404
- this.parsedHTML = edjsHTML(DisplayRichTextWidgetComponent.CUSTOM_PARSER, { strict: true }).parse(this.field.value);
14405
- if (!(this.parsedHTML instanceof Error)) {
14406
- this.sanitizeHtmlContent();
14435
+ this.parsedHTML = this.richTextParserService.parse(this.field.value);
14436
+ if (this.parsedHTML instanceof Error) {
14437
+ throw this.parsedHTML;
14407
14438
  }
14408
14439
  else {
14409
- throw this.parsedHTML;
14440
+ this.sanitizeHtmlContent();
14410
14441
  }
14411
14442
  }
14412
14443
  sanitizeHtmlContent() {
14413
14444
  this.parsedHTML = this.sanitizer.sanitize(SecurityContext.HTML, this.parsedHTML);
14414
14445
  }
14415
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DisplayRichTextWidgetComponent, deps: [{ token: i1$1.FormService }, { token: i2$5.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
14446
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DisplayRichTextWidgetComponent, deps: [{ token: i1$1.FormService }], target: i0.ɵɵFactoryTarget.Component }); }
14416
14447
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: DisplayRichTextWidgetComponent, isStandalone: true, selector: "display-rich-text", host: { listeners: { "click": "event($event)", "blur": "event($event)", "change": "event($event)", "focus": "event($event)", "focusin": "event($event)", "focusout": "event($event)", "input": "event($event)", "invalid": "event($event)", "select": "event($event)" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"adf-display-rich-text-widget\">\n <div class=\"adf-display-rich-text-widget-parsed-html\" [innerHTML]=\"parsedHTML\"></div>\n</div>\n", styles: [".adf-display-rich-text-widget pre{min-height:100px;font-family:Menlo,Monaco,Consolas,Courier New,monospace;color:#41314e;line-height:1.6em;font-size:12px;background:#f8f7fa;border:1px solid #f1f1f4;box-shadow:none;white-space:pre;word-wrap:normal;overflow-x:auto;resize:vertical;border-radius:3px;outline:none;width:100%}\n"], encapsulation: i0.ViewEncapsulation.None }); }
14417
14448
  }
14418
14449
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DisplayRichTextWidgetComponent, decorators: [{
@@ -14428,7 +14459,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
14428
14459
  '(invalid)': 'event($event)',
14429
14460
  '(select)': 'event($event)'
14430
14461
  }, encapsulation: ViewEncapsulation.None, template: "<div class=\"adf-display-rich-text-widget\">\n <div class=\"adf-display-rich-text-widget-parsed-html\" [innerHTML]=\"parsedHTML\"></div>\n</div>\n", styles: [".adf-display-rich-text-widget pre{min-height:100px;font-family:Menlo,Monaco,Consolas,Courier New,monospace;color:#41314e;line-height:1.6em;font-size:12px;background:#f8f7fa;border:1px solid #f1f1f4;box-shadow:none;white-space:pre;word-wrap:normal;overflow-x:auto;resize:vertical;border-radius:3px;outline:none;width:100%}\n"] }]
14431
- }], ctorParameters: () => [{ type: i1$1.FormService }, { type: i2$5.DomSanitizer }] });
14462
+ }], ctorParameters: () => [{ type: i1$1.FormService }] });
14432
14463
 
14433
14464
  /*!
14434
14465
  * @license
@@ -15973,5 +16004,5 @@ const DATE_FORMAT_CLOUD = 'YYYY-MM-DD';
15973
16004
  * Generated bundle index. Do not edit.
15974
16005
  */
15975
16006
 
15976
- export { APP_CUSTOM_SCREEN_TOKEN, APP_LIST_CLOUD_DIRECTIVES, AppDetailsCloudComponent, AppListCloudComponent, ApplicationVersionModel, ApplicationVersionResponseModel, AppsProcessCloudService, AssignmentType, AttachFileCloudWidgetComponent, BaseCloudService, CloudFormRenderingService, ContentCloudNodeSelectorService, DATE_FORMAT_CLOUD, DEFAULT_APP_INSTANCE_ICON, DEFAULT_APP_INSTANCE_THEME, DEFAULT_OPTION, DEFAULT_TASK_PRIORITIES, DEPLOYED_STATUS, DateCloudFilterType, DateCloudWidgetComponent, DateRangeFilterService, DescriptorCustomUIAuthFlowType, DisplayModeService, DisplayRichTextWidgetComponent, DropdownCloudWidgetComponent, EditProcessFilterCloudComponent, EditServiceTaskFilterCloudComponent, EditTaskFilterCloudComponent, FORM_CLOUD_DIRECTIVES, FORM_CLOUD_FIELD_VALIDATORS_TOKEN, FORM_CLOUD_SERVICE_FIELD_VALIDATORS_TOKEN, FilePropertiesTableCloudComponent, FileViewerWidgetComponent, FormCloudComponent, FormCloudDisplayMode, FormCloudModule, FormCloudService, FormCustomOutcomesComponent, FormDefinitionSelectorCloudComponent, FormDefinitionSelectorCloudService, FormFieldType, FormSpinnerComponent, GroupCloudComponent, GroupCloudModule, GroupCloudWidgetComponent, HIDE_FILTER_LIMIT, IdentityGroupService, IdentityUserService, LAYOUT_GRID, LAYOUT_LIST, LocalPreferenceCloudService, NotificationCloudService, PROCESS_CLOUD_DIRECTIVES, PROCESS_FILTERS_CLOUD_DIRECTIVES, PROCESS_FILTERS_SERVICE_TOKEN, PROCESS_FILTER_ACTION_DELETE, PROCESS_FILTER_ACTION_RESTORE, PROCESS_FILTER_ACTION_SAVE, PROCESS_FILTER_ACTION_SAVE_AS, PROCESS_FILTER_ACTION_SAVE_DEFAULT, PROCESS_LISTS_PREFERENCES_SERVICE_TOKEN, PROCESS_SERVICES_CLOUD_DIRECTIVES, PeopleCloudComponent, PeopleCloudModule, PeopleCloudWidgetComponent, PeopleModeOptions, ProcessCloudContentService, ProcessCloudModule, ProcessCloudService, ProcessDefinitionCloud, ProcessFilterCloudAdapter, ProcessFilterCloudModel, ProcessFilterCloudService, ProcessFilterDialogCloudComponent, ProcessFiltersCloudComponent, ProcessFiltersCloudModule, ProcessHeaderCloudComponent, ProcessHeaderCloudModule, ProcessListCloudComponent, ProcessListCloudModule, ProcessListCloudPreferences, ProcessListCloudService, ProcessListCloudSortingModel, ProcessListRequestModel, ProcessListRequestSortingModel, ProcessPayloadCloud, ProcessQueryCloudRequestModel, ProcessServicesCloudModule, ProcessTaskListCloudService, PropertiesViewerWidgetComponent, PropertiesViewerWrapperComponent, RadioButtonsCloudWidgetComponent, ScreenRenderingService, ServiceTaskFilterCloudService, ServiceTaskFiltersCloudComponent, ServiceTaskListCloudComponent, ServiceTaskListCloudService, StartProcessCloudComponent, StartProcessCloudService, StartTaskCloudRequestModel, TASK_ASSIGNED_STATE, TASK_CANCELLED_STATE, TASK_CLAIM_PERMISSION, TASK_COMPLETED_STATE, TASK_CREATED_STATE, TASK_FILTERS_CLOUD_DIRECTIVES, TASK_FILTERS_SERVICE_TOKEN, TASK_FORM_CLOUD_DIRECTIVES, TASK_LIST_CLOUD_DIRECTIVES, TASK_LIST_CLOUD_TOKEN, TASK_LIST_PREFERENCES_SERVICE_TOKEN, TASK_RELEASE_PERMISSION, TASK_SUSPENDED_STATE, TASK_UPDATE_PERMISSION, TASK_VIEW_PERMISSION, TaskAssignmentFilterCloudComponent, TaskCloudEntryModel, TaskCloudModule, TaskCloudNodePaging, TaskCloudPagingList, TaskCloudService, TaskFilterCloudAdapter, TaskFilterCloudModel, TaskFilterCloudService, TaskFilterDialogCloudComponent, TaskFiltersCloudComponent, TaskFiltersCloudModule, TaskFormCloudComponent, TaskFormModule, TaskHeaderCloudComponent, TaskHeaderCloudModule, TaskListCloudComponent, TaskListCloudModule, TaskListCloudService, TaskListCloudSortingModel, TaskListRequestModel, TaskListRequestSortingModel, TaskQueryCloudRequestModel, TaskStatusFilter, TaskVariableCloud, UploadCloudWidgetComponent, UserPreferenceCloudService, UserTaskCloudButtonsComponent, UserTaskCloudComponent, VariableMapperService, WebSocketService, processCloudPresetsDefaultModel, provideCloudFormRenderer, provideCloudPreferences, provideScreen, radioButtonsSchema };
16007
+ export { APP_CUSTOM_SCREEN_TOKEN, APP_LIST_CLOUD_DIRECTIVES, AppDetailsCloudComponent, AppListCloudComponent, ApplicationVersionModel, ApplicationVersionResponseModel, AppsProcessCloudService, AssignmentType, AttachFileCloudWidgetComponent, BaseCloudService, CloudFormRenderingService, ContentCloudNodeSelectorService, DATE_FORMAT_CLOUD, DEFAULT_APP_INSTANCE_ICON, DEFAULT_APP_INSTANCE_THEME, DEFAULT_OPTION, DEFAULT_TASK_PRIORITIES, DEPLOYED_STATUS, DateCloudFilterType, DateCloudWidgetComponent, DateRangeFilterService, DescriptorCustomUIAuthFlowType, DisplayModeService, DisplayRichTextWidgetComponent, DropdownCloudWidgetComponent, EditProcessFilterCloudComponent, EditServiceTaskFilterCloudComponent, EditTaskFilterCloudComponent, FORM_CLOUD_DIRECTIVES, FORM_CLOUD_FIELD_VALIDATORS_TOKEN, FORM_CLOUD_SERVICE_FIELD_VALIDATORS_TOKEN, FilePropertiesTableCloudComponent, FileViewerWidgetComponent, FormCloudComponent, FormCloudDisplayMode, FormCloudModule, FormCloudService, FormCustomOutcomesComponent, FormDefinitionSelectorCloudComponent, FormDefinitionSelectorCloudService, FormFieldType, FormSpinnerComponent, GroupCloudComponent, GroupCloudModule, GroupCloudWidgetComponent, HIDE_FILTER_LIMIT, IdentityGroupService, IdentityUserService, LAYOUT_GRID, LAYOUT_LIST, LocalPreferenceCloudService, NotificationCloudService, PROCESS_CLOUD_DIRECTIVES, PROCESS_FILTERS_CLOUD_DIRECTIVES, PROCESS_FILTERS_SERVICE_TOKEN, PROCESS_FILTER_ACTION_DELETE, PROCESS_FILTER_ACTION_RESTORE, PROCESS_FILTER_ACTION_SAVE, PROCESS_FILTER_ACTION_SAVE_AS, PROCESS_FILTER_ACTION_SAVE_DEFAULT, PROCESS_LISTS_PREFERENCES_SERVICE_TOKEN, PROCESS_SERVICES_CLOUD_DIRECTIVES, PeopleCloudComponent, PeopleCloudModule, PeopleCloudWidgetComponent, PeopleModeOptions, ProcessCloudContentService, ProcessCloudModule, ProcessCloudService, ProcessDefinitionCloud, ProcessFilterCloudAdapter, ProcessFilterCloudModel, ProcessFilterCloudService, ProcessFilterDialogCloudComponent, ProcessFiltersCloudComponent, ProcessFiltersCloudModule, ProcessHeaderCloudComponent, ProcessHeaderCloudModule, ProcessListCloudComponent, ProcessListCloudModule, ProcessListCloudPreferences, ProcessListCloudService, ProcessListCloudSortingModel, ProcessListRequestModel, ProcessListRequestSortingModel, ProcessPayloadCloud, ProcessQueryCloudRequestModel, ProcessServicesCloudModule, ProcessTaskListCloudService, PropertiesViewerWidgetComponent, PropertiesViewerWrapperComponent, RICH_TEXT_PARSER_TOKEN, RadioButtonsCloudWidgetComponent, ScreenRenderingService, ServiceTaskFilterCloudService, ServiceTaskFiltersCloudComponent, ServiceTaskListCloudComponent, ServiceTaskListCloudService, StartProcessCloudComponent, StartProcessCloudService, StartTaskCloudRequestModel, TASK_ASSIGNED_STATE, TASK_CANCELLED_STATE, TASK_CLAIM_PERMISSION, TASK_COMPLETED_STATE, TASK_CREATED_STATE, TASK_FILTERS_CLOUD_DIRECTIVES, TASK_FILTERS_SERVICE_TOKEN, TASK_FORM_CLOUD_DIRECTIVES, TASK_LIST_CLOUD_DIRECTIVES, TASK_LIST_CLOUD_TOKEN, TASK_LIST_PREFERENCES_SERVICE_TOKEN, TASK_RELEASE_PERMISSION, TASK_SUSPENDED_STATE, TASK_UPDATE_PERMISSION, TASK_VIEW_PERMISSION, TaskAssignmentFilterCloudComponent, TaskCloudEntryModel, TaskCloudModule, TaskCloudNodePaging, TaskCloudPagingList, TaskCloudService, TaskFilterCloudAdapter, TaskFilterCloudModel, TaskFilterCloudService, TaskFilterDialogCloudComponent, TaskFiltersCloudComponent, TaskFiltersCloudModule, TaskFormCloudComponent, TaskFormModule, TaskHeaderCloudComponent, TaskHeaderCloudModule, TaskListCloudComponent, TaskListCloudModule, TaskListCloudService, TaskListCloudSortingModel, TaskListRequestModel, TaskListRequestSortingModel, TaskQueryCloudRequestModel, TaskStatusFilter, TaskVariableCloud, UploadCloudWidgetComponent, UserPreferenceCloudService, UserTaskCloudButtonsComponent, UserTaskCloudComponent, VariableMapperService, WebSocketService, processCloudPresetsDefaultModel, provideCloudFormRenderer, provideCloudPreferences, provideScreen, radioButtonsSchema };
15977
16008
  //# sourceMappingURL=adf-process-services-cloud.mjs.map