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

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,58 @@ 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
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RichTextParserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
14407
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RichTextParserService, providedIn: 'root' }); }
14408
+ }
14409
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: RichTextParserService, decorators: [{
14410
+ type: Injectable,
14411
+ args: [{
14412
+ providedIn: 'root'
14413
+ }]
14414
+ }] });
14415
+
14416
+ /*!
14417
+ * @license
14418
+ * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
14419
+ *
14420
+ * Licensed under the Apache License, Version 2.0 (the "License");
14421
+ * you may not use this file except in compliance with the License.
14422
+ * You may obtain a copy of the License at
14423
+ *
14424
+ * http://www.apache.org/licenses/LICENSE-2.0
14425
+ *
14426
+ * Unless required by applicable law or agreed to in writing, software
14427
+ * distributed under the License is distributed on an "AS IS" BASIS,
14428
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14429
+ * See the License for the specific language governing permissions and
14430
+ * limitations under the License.
14431
+ */
14432
+ /* eslint-disable @angular-eslint/component-selector */
14433
+ const RICH_TEXT_PARSER_TOKEN = new InjectionToken('RichTextParserService', {
14434
+ factory: () => new RichTextParserService()
14435
+ });
14436
+ class DisplayRichTextWidgetComponent extends WidgetComponent {
14437
+ constructor(formService) {
14399
14438
  super(formService);
14400
- this.formService = formService;
14401
- this.sanitizer = sanitizer;
14439
+ this.richTextParserService = inject(RICH_TEXT_PARSER_TOKEN);
14440
+ this.sanitizer = inject(DomSanitizer);
14402
14441
  }
14403
14442
  ngOnInit() {
14404
- this.parsedHTML = edjsHTML(DisplayRichTextWidgetComponent.CUSTOM_PARSER, { strict: true }).parse(this.field.value);
14405
- if (!(this.parsedHTML instanceof Error)) {
14406
- this.sanitizeHtmlContent();
14443
+ this.parsedHTML = this.richTextParserService.parse(this.field.value);
14444
+ if (this.parsedHTML instanceof Error) {
14445
+ throw this.parsedHTML;
14407
14446
  }
14408
14447
  else {
14409
- throw this.parsedHTML;
14448
+ this.sanitizeHtmlContent();
14410
14449
  }
14411
14450
  }
14412
14451
  sanitizeHtmlContent() {
14413
14452
  this.parsedHTML = this.sanitizer.sanitize(SecurityContext.HTML, this.parsedHTML);
14414
14453
  }
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 }); }
14454
+ 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
14455
  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
14456
  }
14418
14457
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DisplayRichTextWidgetComponent, decorators: [{
@@ -14428,7 +14467,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
14428
14467
  '(invalid)': 'event($event)',
14429
14468
  '(select)': 'event($event)'
14430
14469
  }, 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 }] });
14470
+ }], ctorParameters: () => [{ type: i1$1.FormService }] });
14432
14471
 
14433
14472
  /*!
14434
14473
  * @license
@@ -15973,5 +16012,5 @@ const DATE_FORMAT_CLOUD = 'YYYY-MM-DD';
15973
16012
  * Generated bundle index. Do not edit.
15974
16013
  */
15975
16014
 
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 };
16015
+ 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
16016
  //# sourceMappingURL=adf-process-services-cloud.mjs.map