Skip to content

Commit

Permalink
Merge branch 'master' into issue-29709-make-personalization-work-with…
Browse files Browse the repository at this point in the history
…-keytag
  • Loading branch information
wezell authored Aug 23, 2024
2 parents 3076f27 + 7c092e1 commit 967f2c1
Show file tree
Hide file tree
Showing 75 changed files with 8,724 additions and 573 deletions.
2 changes: 1 addition & 1 deletion .mvn/maven-build-cache-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ https://maven.apache.org/extensions/maven-build-cache-extension/maven-build-cach
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0 https://maven.apache.org/xsd/build-cache-config-1.0.0.xsd">
<configuration>
<enabled>true</enabled>
<enabled>false</enabled>
<hashAlgorithm>SHA-256</hashAlgorithm>
<validateXml>true</validateXml>
<local>
Expand Down
7 changes: 7 additions & 0 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,13 @@

<!-- Apache Tomcat -->

<dependency>
<groupId>com.dotcms</groupId>
<artifactId>tomcat-redis-session-manager</artifactId>
<version>1.3</version>
<scope>provided</scope>
</dependency>

<dependency>
<!-- Jasper is the Tomcat JSP Engine -->
<groupId>org.apache.tomcat</groupId>
Expand Down
30 changes: 21 additions & 9 deletions bom/logging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<properties>
<maven.deploy.skip>false</maven.deploy.skip>
<flatten.mode>bom</flatten.mode>
<log4j.version>2.20.0</log4j.version>
<slf4j.version>2.0.7</slf4j.version>
<log4j.version>2.23.1</log4j.version>
<slf4j.version>2.0.9</slf4j.version>
</properties>

<dependencyManagement>
Expand All @@ -27,30 +27,42 @@
Do not include incompatible artifacts e.g. -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<!-- Support log4j1.2.x API in Log4j2 -->
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<artifactId>log4j-iostreams</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<!-- Support Java Commons Logging API in Log4j2 -->
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<version>${log4j.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<!-- Support Java Commons Logging API in Log4j2 -->
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jcl</artifactId>
<version>${log4j.version}</version>
<scope>compile</scope>
<scope>runtime</scope>
</dependency>
<dependency>
<!-- Support SLF4j2 API in Log4j2 -->
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<version>${log4j.version}</version>
<scope>compile</scope>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -61,16 +73,16 @@
<dependency>
<!-- Servlet container initialization of Log4j2 -->
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-web</artifactId>
<artifactId>log4j-appserver</artifactId>
<version>${log4j.version}</version>
<scope>compile</scope>
<scope>runtime</scope>
</dependency>
<dependency>
<!-- Async support for Log4J 2.x -->
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
<version>3.3.4</version>
<scope>compile</scope>
<scope>runtime</scope>
</dependency>

</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion core-web/apps/dotcms-ui/src/assets/seo/page-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"title": "Mozilla Observatory",
"description": "The Mozilla Observatory has helped hundreds of thousands of websites by teaching developers, system administrators, and security professionals how to configure their sites safely and securely. ",
"tags": ["Security", "Best Practices"],
"runnableLink": "https://developer.mozilla.org/en-US/observatory/analyze?host={requestHostName}"
"runnableLink": "https://developer.mozilla.org/en-US/observatory/analyze?host={domainName}"
},
{
"icon": "assets/seo/security-headers.png",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
color: $color-palette-gray-500;
margin-top: 1rem;
gap: 0.65rem;
font-size: $dot-editor-size;
font-size: $font-size-md;

.error-message {
color: $error;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
.url-container {
cursor: pointer;
white-space: nowrap;
font-size: $dot-editor-size;
font-size: $font-size-md;
width: 100%;
word-wrap: normal;
display: flex;
Expand All @@ -52,7 +52,7 @@
display: flex;
gap: 0.2 * $dot-editor-size;
min-width: 100%;
font-size: $dot-editor-size;
font-size: $font-size-md;

.checkbox-container {
cursor: pointer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

h3 {
text-transform: uppercase;
font-size: $dot-editor-size;
font-size: $font-size-md;
margin: (0.5 * $dot-editor-size) $dot-editor-size;
color: #999999;
}
Expand Down
1 change: 1 addition & 0 deletions core-web/libs/dotcms-scss/jsp/scss/dotcms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ legend,
input,
button,
textarea,
select,
p,
blockquote,
th,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,40 +245,82 @@ describe('DotEmaDialogStoreService', () => {
});
});

it('should update the state to show dialog for a translation', () => {
spectator.service.translatePage({
page: {
inode: '123',
liveInode: '1234',
stInode: '12345',
live: true,
title: 'test'
} as DotPage,
newLanguage: 2
});
describe('Dialog for translation', () => {
it('should update the state to show dialog for a translation', () => {
spectator.service.translatePage({
page: {
inode: '123',
liveInode: '1234',
stInode: '12345',
live: true,
title: 'test'
} as DotPage,
newLanguage: 2
});

const queryParams = new URLSearchParams({
p_p_id: 'content',
p_p_action: '1',
p_p_state: 'maximized',
angularCurrentPortlet: 'edit-page',
_content_sibbling: '1234',
_content_cmd: 'edit',
p_p_mode: 'view',
_content_sibblingStructure: '1234',
_content_struts_action: '/ext/contentlet/edit_contentlet',
inode: '',
lang: '2',
populateaccept: 'true',
reuseLastLang: 'true'
const queryParams = new URLSearchParams({
p_p_id: 'content',
p_p_action: '1',
p_p_state: 'maximized',
angularCurrentPortlet: 'edit-page',
_content_sibbling: '123',
_content_cmd: 'edit',
p_p_mode: 'view',
_content_sibblingStructure: '123',
_content_struts_action: '/ext/contentlet/edit_contentlet',
inode: '',
lang: '2',
populateaccept: 'true',
reuseLastLang: 'true'
});

spectator.service.dialogState$.subscribe((state) => {
expect(state).toEqual({
url: LAYOUT_URL + '?' + queryParams.toString(),
status: DialogStatus.LOADING,
header: 'test',
type: 'content'
});
});
});

spectator.service.dialogState$.subscribe((state) => {
expect(state).toEqual({
url: LAYOUT_URL + '?' + queryParams.toString(),
status: DialogStatus.LOADING,
header: 'test',
type: 'content'
it('should update the state to show dialog for a translation with working inode', () => {
spectator.service.translatePage({
page: {
inode: '123',
liveInode: '1234',
stInode: '12345',
live: true,
title: 'test',
working: true,
workingInode: '56789'
} as DotPage,
newLanguage: 2
});

const queryParams = new URLSearchParams({
p_p_id: 'content',
p_p_action: '1',
p_p_state: 'maximized',
angularCurrentPortlet: 'edit-page',
_content_sibbling: '56789',
_content_cmd: 'edit',
p_p_mode: 'view',
_content_sibblingStructure: '56789',
_content_struts_action: '/ext/contentlet/edit_contentlet',
inode: '',
lang: '2',
populateaccept: 'true',
reuseLastLang: 'true'
});

spectator.service.dialogState$.subscribe((state) => {
expect(state).toEqual({
url: LAYOUT_URL + '?' + queryParams.toString(),
status: DialogStatus.LOADING,
header: 'test',
type: 'content'
});
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,20 +309,17 @@ export class DotEmaDialogStore extends ComponentStore<EditEmaDialogState> {
}

private createTranslatePageUrl(page: DotPage, newLanguage: number | string) {
const isLive = page.live;
const pageLiveInode = page.liveInode;
const iNode = page.inode;
const stInode = page.stInode;

const { working, workingInode, inode } = page;
const pageInode = working ? workingInode : inode;
const queryParams = new URLSearchParams({
p_p_id: 'content',
p_p_action: '1',
p_p_state: 'maximized',
angularCurrentPortlet: 'edit-page',
_content_sibbling: isLive ? pageLiveInode : iNode,
_content_sibbling: pageInode,
_content_cmd: 'edit',
p_p_mode: 'view',
_content_sibblingStructure: isLive ? pageLiveInode : stInode,
_content_sibblingStructure: pageInode,
_content_struts_action: '/ext/contentlet/edit_contentlet',
inode: '',
lang: newLanguage.toString(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ export interface DotPage {
live: boolean;
liveInode?: string;
stInode?: string;
working?: boolean;
workingInode?: string;
}

export interface DotDeviceWithIcon extends DotDevice {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('DotPageToolsSeoComponent', () => {
beforeEach(() => {
pageToolUrlParamsTest = {
currentUrl: '/blogTest',
requestHostName: 'localhost',
requestHostName: 'http://localhost',
siteId: '123',
languageId: 1
};
Expand Down
4 changes: 2 additions & 2 deletions core-web/libs/sdk/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@dotcms/angular",
"version": "0.0.1-alpha.31",
"version": "0.0.1-alpha.32",
"peerDependencies": {
"@angular/common": "^17.1.0",
"@angular/core": "^17.1.0",
"@angular/router": "^17.1.0",
"@dotcms/client": "0.0.1-alpha.31",
"@dotcms/client": "0.0.1-alpha.32",
"@tinymce/tinymce-angular": "^8.0.0",
"rxjs": "^7.8.0"
},
Expand Down
16 changes: 14 additions & 2 deletions core-web/libs/sdk/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,23 @@ yarn add @dotcms/client

## Usage

First, initialize the client with your DotCMS instance details.
`@dotcms/client` supports both ES modules and CommonJS. You can import it using either syntax:

### ES Modules

```javascript
import { dotcmsClient } from '@dotcms/client';
```

### CommonJS

```javascript
const { dotcmsClient } = require('@dotcms/client');
```

First, initialize the client with your DotCMS instance details.

```javascript
const client = dotcmsClient.init({
dotcmsUrl: 'https://your-dotcms-instance.com',
authToken: 'your-auth-token',
Expand Down Expand Up @@ -107,4 +119,4 @@ Always refer to the official [DotCMS documentation](https://www.dotcms.com/docs/
| Videos | [Helpful Videos](http://dotcms.com/videos/) |
| Forums/Listserv | [via Google Groups](https://groups.google.com/forum/#!forum/dotCMS) |
| Twitter | @dotCMS |
| Main Site | [dotCMS.com](https://dotcms.com/) |
| Main Site | [dotCMS.com](https://dotcms.com/) |
3 changes: 1 addition & 2 deletions core-web/libs/sdk/client/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@dotcms/client",
"version": "0.0.1-alpha.31",
"type": "module",
"version": "0.0.1-alpha.32",
"description": "Official JavaScript library for interacting with DotCMS REST APIs.",
"repository": {
"type": "git",
Expand Down
11 changes: 7 additions & 4 deletions core-web/libs/sdk/client/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
"projectType": "library",
"targets": {
"build": {
"executor": "@nrwl/js:tsc",
"executor": "@nx/rollup:rollup",
"outputs": ["{options.outputPath}"],
"options": {
"format": ["esm", "cjs"],
"compiler": "tsc",
"generateExportsField": true,
"assets": [{ "input": ".", "output": ".", "glob": "*.md" }],
"outputPath": "dist/libs/sdk/client",
"main": "libs/sdk/client/src/index.ts",
"tsConfig": "libs/sdk/client/tsconfig.lib.json",
"assets": ["libs/sdk/client/*.md"]
"tsConfig": "libs/sdk/client/tsconfig.lib.json"
}
},
"build:js": {
Expand All @@ -34,7 +37,7 @@
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "node tools/scripts/publish.mjs sdk-js-client {args.ver} {args.tag}"
"command": "node tools/scripts/publish.mjs sdk-client {args.ver} {args.tag}"
},
"dependsOn": ["build"]
},
Expand Down
Loading

0 comments on commit 967f2c1

Please sign in to comment.