diff --git a/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.html b/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.html index 1cb7048db..aaf90c70e 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.html @@ -2,8 +2,10 @@
{{ entry.name }}
- - {{ componentValue.value ?? componentValue.originalValue }} +
@@ -23,7 +25,7 @@
- +
diff --git a/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.scss b/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.scss index 19ae2609a..288ed4125 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.scss +++ b/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.scss @@ -147,22 +147,12 @@ } } -/* .cdk-drag-preview { - box-sizing: border-box; - border-radius: 4px; - box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), - 0 8px 10px 1px rgba(0, 0, 0, 0.14), - 0 3px 14px 2px rgba(0, 0, 0, 0.12); -} +.cdk-drag-preview { + display: flex; -.cdk-drag-placeholder { - opacity: 0; + .draggable { + margin-top: 7px; + cursor: grab; + transform: scale(0.7); + } } - -.cdk-drag-animating { - transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); -} - -.cdk-drop-list-dragging { - transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); -} */ diff --git a/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.ts b/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.ts index 78e943169..55b353142 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/editable-structured-component-value/editable-structured-component-value.component.ts @@ -4,7 +4,7 @@ import { FormBuilder, FormControl, ReactiveFormsModule, UntypedFormGroup } from import { BaseFormComponent, CircleButtonComponent, IconButtonComponent, IqserDialog } from '@iqser/common-ui'; import { FilterService } from '@common-ui/filtering'; import { RevertValueDialogComponent } from '../../dialogs/docu-mine/revert-value-dialog/revert-value-dialog.component'; -import { CdkDrag, CdkDragDrop, CdkDropList, moveItemInArray } from '@angular/cdk/drag-drop'; +import { CdkDrag, CdkDragDrop, CdkDragHandle, CdkDropList, moveItemInArray } from '@angular/cdk/drag-drop'; import { KeyValuePipe, NgClass, NgForOf, NgIf } from '@angular/common'; import { MatIcon } from '@angular/material/icon'; import { TranslateModule } from '@ngx-translate/core'; @@ -26,6 +26,7 @@ import { TranslateModule } from '@ngx-translate/core'; CdkDrag, NgIf, NgForOf, + CdkDragHandle, ], }) export class EditableStructuredComponentValueComponent extends BaseFormComponent implements OnInit { @@ -117,4 +118,8 @@ export class EditableStructuredComponentValueComponent extends BaseFormComponent } } } + + transformNewLines(value: string) { + return value.replace(/\n/g, '
'); + } }