Skip to content

Commit

Permalink
Merge branch 'main' of github.com:dotCMS/core into issue-28550-create…
Browse files Browse the repository at this point in the history
…-deploy-artifact-javadoc-composite-action
  • Loading branch information
dcolina committed Oct 31, 2024
2 parents c6dfd9d + f0ea22e commit c3d2500
Show file tree
Hide file tree
Showing 243 changed files with 13,500 additions and 3,463 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cicd_manual_publish-starter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ env:
EMPTY_STARTER_TOKEN: ${{ secrets.DOT_EMPTY_STARTER_ACCESS_TOKEN }}
FULL_STARTER_URL: ${{ vars.DOT_STARTER_URL }}
FULL_STARTER_TOKEN: ${{ secrets.DOT_STARTER_ACCESS_TOKEN }}
DOWNLOAD_ENDPOINT: api/v1/maintenance/_downloadStarterWithAssets?oldAssets=true
DOWNLOAD_ENDPOINT: api/v1/maintenance/_downloadStarterWithAssets?oldAssets=false

jobs:
get-starter:
runs-on: macos-13
if: github.repository == 'dotcms/core'
environment: trunk
environment: starter
steps:
- name: 'Github context'
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img src="https://www.dotcms.com/dA/99fe3769-d649/256w/dotcms.png" title="dotcms open source hybrid content management system">
<img src="https://www2.dotcms.com/dA/99fe3769-d649/256w/dotcms.png" title="dotcms open source hybrid content management system">


[![Merge Queue](https://github.com/dotCMS/core/actions/workflows/cicd_2-merge-queue.yml/badge.svg)](https://github.com/dotCMS/core/actions/workflows/cicd_2-merge-queue.yml)
Expand Down
13 changes: 13 additions & 0 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,19 @@
<version>3.1.9.Final</version>
</dependency>

<dependency>
<groupId>org.glassfish.jersey.ext.cdi</groupId>
<artifactId>jersey-cdi1x</artifactId>
<version>${jersey.version}</version>
</dependency>

<dependency>
<groupId>org.glassfish.jersey.ext.cdi</groupId>
<artifactId>jersey-cdi1x-servlet</artifactId>
<version>${jersey.version}</version>
</dependency>


<dependency>
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>bean-validator</artifactId>
Expand Down
3 changes: 3 additions & 0 deletions core-web/libs/dotcms-models/src/lib/dot-contentlet.model.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Beware while using this type, since we have a [key: string]: any; it can be used to store any kind of data and you can write wrong properties and it will not fail
// Maybe we need to refactor this to a generic type that extends from unknown when missing the generic type
export interface DotCMSContentlet {
archived: boolean;
baseType: string;
Expand Down Expand Up @@ -36,6 +38,7 @@ export interface DotCMSContentlet {
contentTypeIcon?: string;
variant?: string;
__icon__?: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[key: string]: any;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@use "variables" as *;

.p-splitter {
border: 1px solid $color-palette-gray-400;
background: $white;
border-radius: $border-radius-sm;

.p-splitter-gutter,
.p-splitter-gutter-resizing {
background: $color-palette-gray-100;

.p-splitter-gutter-handle {
background: $color-palette-gray-300;

&:focus-visible {
outline: none;
outline-offset: 0;
box-shadow: $shadow-xs;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@use "variables" as *;

.p-icon-field {
.p-input-icon {
position: absolute;
top: 50%;
transform: translateY(-50%);
}

&-left {
.p-input-icon:first-of-type {
left: $spacing-2;
color: $color-palette-gray-600;
}

> .p-inputtext {
padding-left: $spacing-6;
}

&.p-float-label > label {
left: $spacing-6;
}
}

&-right {
.p-input-icon:last-of-type {
right: $spacing-2;
color: $color-palette-gray-600;
}

> .p-inputtext {
padding-right: $spacing-6;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
@use "selectbutton";
@use "slider";
@use "treeselect";
@use "iconfield";
1 change: 1 addition & 0 deletions core-web/libs/dotcms-scss/angular/dotcms-theme/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
@use "components/tooltip";
@use "components/tree";
@use "components/table";
@use "components/splitter";

@use "utils/validation";
@use "utils/password";
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { MockComponent } from 'ng-mocks';
import { of } from 'rxjs';

import { HttpClientTestingModule } from '@angular/common/http/testing';
import { Provider, Type } from '@angular/core';
import { Provider, signal, Type } from '@angular/core';
import { ControlContainer, FormGroupDirective } from '@angular/forms';
import { By } from '@angular/platform-browser';

Expand All @@ -21,6 +21,7 @@ import { DotKeyValueComponent } from '@dotcms/ui';

import { DotEditContentFieldComponent } from './dot-edit-content-field.component';

import { DotEditContentStore } from '../../feature/edit-content/store/edit-content.store';
import { DotEditContentBinaryFieldComponent } from '../../fields/dot-edit-content-binary-field/dot-edit-content-binary-field.component';
import { DotEditContentCalendarFieldComponent } from '../../fields/dot-edit-content-calendar-field/dot-edit-content-calendar-field.component';
import { DotEditContentCategoryFieldComponent } from '../../fields/dot-edit-content-category-field/dot-edit-content-category-field.component';
Expand Down Expand Up @@ -168,6 +169,12 @@ const FIELD_TYPES_COMPONENTS: Record<FIELD_TYPES, Type<unknown> | DotEditFieldTe
{
provide: DotWorkflowActionsFireService,
useValue: {}
},
{
provide: DotEditContentStore,
useValue: {
showSidebar: signal(false)
}
}
],
declarations: [MockComponent(EditorComponent)]
Expand Down Expand Up @@ -239,11 +246,11 @@ describe.each([...FIELDS_TO_BE_RENDER])('DotEditContentFieldComponent all fields

it('should render the correct field type', () => {
spectator.detectChanges();
const field = spectator.debugElement.query(
By.css(`[data-testId="field-${fieldMock.variable}"]`)
);
const FIELD_TYPE = fieldTestBed.component ? fieldTestBed.component : fieldTestBed;
expect(field.componentInstance instanceof FIELD_TYPE).toBeTruthy();
const component = spectator.query(FIELD_TYPE);

expect(component).toBeTruthy();
expect(component instanceof FIELD_TYPE).toBeTruthy();
});

if (fieldTestBed.outsideFormControl) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<form (ngSubmit)="onSubmit()" [formGroup]="form" class="editor-mode__form">
@if (store.allowFileNameEdit()) {
<div class="editor-mode__input-container">
<label class="p-label-input-required" data-testId="editor-label" for="file-name">
{{ 'dot.file.field.action.create.new.file.label' | dm }}
</label>
<input
id="file-name"
autocomplete="off"
formControlName="name"
pInputText
placeholder="Ex. template.html"
type="text"
data-testId="editor-file-name" />
<div class="error-message">
@let error = store.error();
@if (error) {
<small class="p-invalid" data-testId="error-msg">
{{ error | dm: [store.allowFiles()] }}
</small>
} @else {
<dot-field-validation-message
[field]="nameField"
[patternErrorMessage]="'dot.file.field.error.type.file.not.extension'"
data-testId="error-message" />
}
</div>
</div>
}
<div class="file-field__editor-container">
<ngx-monaco-editor
[class.file-field__code-editor--disabled]="form.disabled"
[options]="store.monacoConfig()"
(init)="onEditorInit($event)"
class="file-field__code-editor"
data-testId="code-editor"
formControlName="content" />

@let file = store.file();
<div [class.editor-mode__helper--visible]="file.mimeType" class="editor-mode__helper">
<i class="pi pi-info-circle"></i>
<small>Mime Type: {{ file.mimeType }}</small>
</div>
</div>
<div class="editor-mode__actions">
<p-button
(click)="cancelUpload()"
[label]="'dot.common.cancel' | dm"
aria-label="Cancel button"
data-testId="cancel-button"
styleClass="p-button-outlined"
type="button" />

<p-button
[label]="'dot.common.save' | dm"
aria-label="Import button"
data-testId="import-button"
type="submit" />
</div>
</form>
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
@use "variables" as *;

:host ::ng-deep {
.editor-container {
position: absolute !important;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
}

.file-field__editor-container {
display: flex;
justify-content: center;
align-items: flex-start;
flex-direction: column;
flex: 1;
width: 100%;
gap: $spacing-1;
}

.file-field__code-editor {
border: 1px solid $color-palette-gray-400; // Input
display: block;
flex-grow: 1;
width: 100%;
min-height: 30rem;
border-radius: $border-radius-md;
overflow: auto;
position: relative;
}

.file-field__code-editor--disabled {
background-color: $color-palette-gray-200;
opacity: 0.5;

&::ng-deep {
.monaco-mouse-cursor-text,
.overflow-guard {
cursor: not-allowed;
}
}
}

.editor-mode__form {
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
}

.editor-mode__input-container {
width: 100%;
display: flex;
gap: $spacing-1;
flex-direction: column;
}

.editor-mode__input {
width: 100%;
display: flex;
flex-direction: column;
}

.editor-mode__actions {
width: 100%;
display: flex;
gap: $spacing-1;
align-items: center;
justify-content: flex-end;
}

.editor-mode__helper {
display: flex;
justify-content: flex-start;
align-items: center;
gap: $spacing-1;
color: $color-palette-gray-700;
font-weight: $font-size-sm;
visibility: hidden;
}

.editor-mode__helper--visible {
visibility: visible;
}

.error-message {
min-height: $spacing-4; // Fix height to avoid jumping
justify-content: flex-start;
display: flex;
}
Loading

0 comments on commit c3d2500

Please sign in to comment.