diff --git a/.env.sample b/.env.sample
index 393b0f244a..56b685211f 100644
--- a/.env.sample
+++ b/.env.sample
@@ -1,4 +1,4 @@
-NUXEO_WEB_UI_VERSION=3.1.8-SNAPSHOT
+NUXEO_WEB_UI_VERSION=3.1.10-SNAPSHOT
NUXEO_VERSION=master
NUXEO_PACKAGES=nuxeo-drive nuxeo-liveconnect nuxeo-template-rendering
NUXEO_DEV_MODE=true
diff --git a/charts/preview/Chart.yaml b/charts/preview/Chart.yaml
index 2f3ced4bfe..dda35ad3a7 100644
--- a/charts/preview/Chart.yaml
+++ b/charts/preview/Chart.yaml
@@ -2,4 +2,4 @@ apiVersion: v1
description: A Helm chart for Web UI preview
icon: https://media.licdn.com/dms/image/C4D0BAQFPXiXFrp4LBA/company-logo_200_200/0?e=2159024400&v=beta&t=RW9EU0QUciUVuPSpLySd9FtJ2yG-O37_hAAvc32f6ro
name: preview
-version: 3.1.8-SNAPSHOT
+version: 3.1.10-SNAPSHOT
diff --git a/elements/nuxeo-data-grid/nuxeo-document-grid-thumbnail.js b/elements/nuxeo-data-grid/nuxeo-document-grid-thumbnail.js
index f7a55a7055..50f9e33ad0 100644
--- a/elements/nuxeo-data-grid/nuxeo-document-grid-thumbnail.js
+++ b/elements/nuxeo-data-grid/nuxeo-document-grid-thumbnail.js
@@ -271,13 +271,26 @@ Polymer({
observers: ['_selectedItemsChanged(selectedItems.splices)'],
_thumbnail(doc) {
- return doc &&
+ if (
+ doc &&
doc.uid &&
doc.contextParameters &&
doc.contextParameters.thumbnail &&
doc.contextParameters.thumbnail.url
- ? doc.contextParameters.thumbnail.url
- : '';
+ ) {
+ if (!this.isFollowRedirectEnabled()) {
+ const splitter = doc.contextParameters.thumbnail.url.indexOf('?') > -1 ? '&' : '?';
+ doc.contextParameters.thumbnail.url = `${doc.contextParameters.thumbnail.url}${splitter}clientReason=view`;
+ }
+ return doc.contextParameters.thumbnail.url;
+ }
+ return '';
+ },
+
+ isFollowRedirectEnabled() {
+ const followRedirect =
+ Nuxeo && Nuxeo.UI && Nuxeo.UI.config && Nuxeo.UI.config.url && Nuxeo.UI.config.url.followRedirect;
+ return followRedirect ? String(followRedirect).toLowerCase() === 'true' : false;
},
handleClick(e) {
diff --git a/elements/nuxeo-data-list/nuxeo-document-list-item.js b/elements/nuxeo-data-list/nuxeo-document-list-item.js
index f3c6d13e76..8e8aff3d89 100644
--- a/elements/nuxeo-data-list/nuxeo-document-list-item.js
+++ b/elements/nuxeo-data-list/nuxeo-document-list-item.js
@@ -256,13 +256,26 @@ Polymer({
observers: ['_selectedItemsChanged(selectedItems.splices)'],
_thumbnail(doc) {
- return doc &&
+ if (
+ doc &&
doc.uid &&
doc.contextParameters &&
doc.contextParameters.thumbnail &&
doc.contextParameters.thumbnail.url
- ? doc.contextParameters.thumbnail.url
- : '';
+ ) {
+ if (!this.isFollowRedirectEnabled()) {
+ const splitter = doc.contextParameters.thumbnail.url.indexOf('?') > -1 ? '&' : '?';
+ doc.contextParameters.thumbnail.url = `${doc.contextParameters.thumbnail.url}${splitter}clientReason=view`;
+ }
+ return doc.contextParameters.thumbnail.url;
+ }
+ return '';
+ },
+
+ isFollowRedirectEnabled() {
+ const followRedirect =
+ Nuxeo && Nuxeo.UI && Nuxeo.UI.config && Nuxeo.UI.config.url && Nuxeo.UI.config.url.followRedirect;
+ return followRedirect ? String(followRedirect).toLowerCase() === 'true' : false;
},
handleClick(e) {
diff --git a/elements/nuxeo-document-creation/nuxeo-document-creation-behavior.js b/elements/nuxeo-document-creation/nuxeo-document-creation-behavior.js
index c03a762215..aaa2001740 100644
--- a/elements/nuxeo-document-creation/nuxeo-document-creation-behavior.js
+++ b/elements/nuxeo-document-creation/nuxeo-document-creation-behavior.js
@@ -20,8 +20,6 @@ import { config } from '@nuxeo/nuxeo-elements';
import { FormatBehavior } from '@nuxeo/nuxeo-ui-elements/nuxeo-format-behavior.js';
import { RoutingBehavior } from '@nuxeo/nuxeo-ui-elements/nuxeo-routing-behavior.js';
-let schemaFetcher = null;
-
/**
* `Nuxeo.DocumentCreationBehavior`
*
@@ -78,24 +76,34 @@ export const DocumentCreationBehavior = [
subtypes: {
type: Array,
},
+
+ _resource: {
+ type: Object,
+ readOnly: true,
+ },
+ },
+
+ get resource() {
+ if (!this._resource) {
+ this._set_resource(document.createElement('nuxeo-resource'));
+ this.shadowRoot.appendChild(this._resource);
+ }
+ return this._resource;
},
observers: ['_validateLocation(isValidTargetPath,suggesterChildren)', '_updateDocument(selectedDocType, parent)'],
newDocument(type, properties) {
- if (!schemaFetcher) {
- schemaFetcher = document.createElement('nuxeo-resource');
- this.shadowRoot.appendChild(schemaFetcher);
- }
- schemaFetcher.path = `path/${this.targetPath}/@emptyWithDefault`;
- schemaFetcher.params = { type: this.selectedDocType.type };
- schemaFetcher.headers = {
+ const { resource } = this;
+ resource.path = `path/${this.targetPath}/@emptyWithDefault`;
+ resource.params = { type: this.selectedDocType.type };
+ resource.headers = {
properties: '*',
'fetch-document': 'properties',
'translate-directoryEntry': 'label',
};
- schemaFetcher.enrichers = config.get('enrichers', {});
- return schemaFetcher.get().then((doc) => {
+ resource.enrichers = config.get('enrichers', {});
+ return resource.get().then((doc) => {
if (properties) {
Object.keys(properties).forEach((prop) => {
doc.properties[prop] = properties[prop];
diff --git a/elements/routing.js b/elements/routing.js
index 3499e5c2eb..6585010dea 100644
--- a/elements/routing.js
+++ b/elements/routing.js
@@ -37,7 +37,6 @@ function _routeAdmin(selectedAdminTab, errorPath, routeData) {
app.showError(404, '', errorPath);
}
}
-
// Routes
page('*', scrollToTop, (ctx, next) => {
next();
diff --git a/ftest/features/preview.feature b/ftest/features/preview.feature
index cffac113df..37a9970253 100644
--- a/ftest/features/preview.feature
+++ b/ftest/features/preview.feature
@@ -57,5 +57,5 @@ Feature: Content Preview
| sample.mp4 | nuxeo-video-viewer |
| sample.mp3 | audio |
| sample.pdf | nuxeo-pdf-viewer |
- | sample.odt | object |
- | sample.txt | object |
+ | sample.odt | nuxeo-pdf-viewer |
+ | sample.txt | nuxeo-pdf-viewer |
diff --git a/ftest/pom.xml b/ftest/pom.xml
index b2acd0509f..c281056684 100644
--- a/ftest/pom.xml
+++ b/ftest/pom.xml
@@ -4,7 +4,7 @@
org.nuxeo.web.ui
nuxeo-web-ui-parent
- 3.1.8-SNAPSHOT
+ 3.1.10-SNAPSHOT
../pom.xml
diff --git a/package.json b/package.json
index 4c3e0c19b6..9494e04180 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"repository": "nuxeo/nuxeo-web-ui.git",
"homepage": "http://www.nuxeo.com",
"name": "@nuxeo/nuxeo-web-ui",
- "version": "3.1.8-SNAPSHOT",
+ "version": "3.1.10-SNAPSHOT",
"license": "Apache-2.0",
"vendor": "Nuxeo",
"engines": {
@@ -14,7 +14,7 @@
},
"devDependencies": {
"@nuxeo/nuxeo-web-ui-ftest": "file:./packages/nuxeo-web-ui-ftest",
- "@nuxeo/testing-helpers": "~3.1.8-rc",
+ "@nuxeo/testing-helpers": "~3.1.10-rc",
"@open-wc/eslint-config": "^0.3.0",
"@open-wc/karma-esm": "^2.13.21",
"@open-wc/prettier-config": "^0.1.0",
@@ -109,9 +109,9 @@
"@material/mwc-snackbar": "^0.26.1",
"@nuxeo/chart-elements": "^4.0.0-nx.1",
"@nuxeo/moment": "^2.24.0-nx.0",
- "@nuxeo/nuxeo-dataviz-elements": "~3.1.8-rc",
- "@nuxeo/nuxeo-elements": "~3.1.8-rc",
- "@nuxeo/nuxeo-ui-elements": "~3.1.8-rc",
+ "@nuxeo/nuxeo-dataviz-elements": "~3.1.10-rc",
+ "@nuxeo/nuxeo-elements": "~3.1.10-rc",
+ "@nuxeo/nuxeo-ui-elements": "~3.1.10-rc",
"@nuxeo/page": "^1.11.4-nx.0",
"@polymer/app-layout": "^3.1.0",
"@polymer/iron-a11y-announcer": "^3.2.0",
diff --git a/packages/nuxeo-web-ui-ftest/package.json b/packages/nuxeo-web-ui-ftest/package.json
index 36abe3350f..5976d575e0 100644
--- a/packages/nuxeo-web-ui-ftest/package.json
+++ b/packages/nuxeo-web-ui-ftest/package.json
@@ -1,6 +1,6 @@
{
"name": "@nuxeo/nuxeo-web-ui-ftest",
- "version": "3.1.8-SNAPSHOT",
+ "version": "3.1.10-SNAPSHOT",
"bin": {
"nuxeo-web-ui-ftest": "./bin/nuxeo-web-ui-ftest.js"
},
diff --git a/packages/nuxeo-web-ui-ftest/pages/ui/group.js b/packages/nuxeo-web-ui-ftest/pages/ui/group.js
index 1d377e73e6..d667fe8ce1 100644
--- a/packages/nuxeo-web-ui-ftest/pages/ui/group.js
+++ b/packages/nuxeo-web-ui-ftest/pages/ui/group.js
@@ -77,10 +77,17 @@ export default class Group extends BasePage {
}
async searchResult(searchTerm) {
- const ele = await this.el;
- await driver.pause(1000);
- const results = await ele.elements('nuxeo-card[name="groups"] .table [name="id"]');
- const match = await results.find(async (e) => (await e.getText()) === searchTerm);
- return match;
+ let matchedElements;
+ const match = async (e) => {
+ const currentText = await e.getText();
+ return currentText === searchTerm;
+ };
+ await driver.waitUntil(async () => {
+ matchedElements = await this.el.elements('nuxeo-card[name="groups"] .table [name="id"]');
+ const results = await matchedElements.some(match);
+ return results;
+ });
+
+ return matchedElements.find(match);
}
}
diff --git a/plugin/a11y/pom.xml b/plugin/a11y/pom.xml
index 699b9519f2..b8cdd510df 100644
--- a/plugin/a11y/pom.xml
+++ b/plugin/a11y/pom.xml
@@ -4,7 +4,7 @@
org.nuxeo.web.ui
nuxeo-web-ui-parent
- 3.1.8-SNAPSHOT
+ 3.1.10-SNAPSHOT
../../pom.xml
diff --git a/plugin/itests/addon/pom.xml b/plugin/itests/addon/pom.xml
index ce379c484f..523daeebb3 100644
--- a/plugin/itests/addon/pom.xml
+++ b/plugin/itests/addon/pom.xml
@@ -4,7 +4,7 @@
org.nuxeo.web.ui
nuxeo-web-ui-parent
- 3.1.8-SNAPSHOT
+ 3.1.10-SNAPSHOT
../../../pom.xml
diff --git a/plugin/itests/marketplace/pom.xml b/plugin/itests/marketplace/pom.xml
index 5b2a407cbc..3f9d6fb330 100644
--- a/plugin/itests/marketplace/pom.xml
+++ b/plugin/itests/marketplace/pom.xml
@@ -3,7 +3,7 @@
org.nuxeo.web.ui
nuxeo-web-ui-parent
- 3.1.8-SNAPSHOT
+ 3.1.10-SNAPSHOT
../../../pom.xml
diff --git a/plugin/metrics/pom.xml b/plugin/metrics/pom.xml
index dc17734efd..b08673916b 100644
--- a/plugin/metrics/pom.xml
+++ b/plugin/metrics/pom.xml
@@ -4,7 +4,7 @@
org.nuxeo.web.ui
nuxeo-web-ui-parent
- 3.1.8-SNAPSHOT
+ 3.1.10-SNAPSHOT
../../pom.xml
diff --git a/plugin/web-ui/addon/pom.xml b/plugin/web-ui/addon/pom.xml
index 084bef21a4..dd39d1bbdf 100644
--- a/plugin/web-ui/addon/pom.xml
+++ b/plugin/web-ui/addon/pom.xml
@@ -3,7 +3,7 @@
org.nuxeo.web.ui
nuxeo-web-ui-parent
- 3.1.8-SNAPSHOT
+ 3.1.10-SNAPSHOT
../../../pom.xml
diff --git a/plugin/web-ui/addon/src/main/resources/OSGI-INF/deployment-fragment.xml b/plugin/web-ui/addon/src/main/resources/OSGI-INF/deployment-fragment.xml
index 7ce9c713ee..ef82d8783e 100644
--- a/plugin/web-ui/addon/src/main/resources/OSGI-INF/deployment-fragment.xml
+++ b/plugin/web-ui/addon/src/main/resources/OSGI-INF/deployment-fragment.xml
@@ -12,9 +12,13 @@
to="nuxeo.war/ui/i18n/messages-es.json" />
+
+
diff --git a/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml b/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml
index 6e5b7b87b5..cf0b597912 100644
--- a/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml
+++ b/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml
@@ -36,7 +36,6 @@
${nuxeo.s3storage.useDirectUpload:=false}
-
${org.nuxeo.download.url.follow.redirect:=false}
@@ -51,5 +50,6 @@
+
-
+
\ No newline at end of file
diff --git a/plugin/web-ui/marketplace/pom.xml b/plugin/web-ui/marketplace/pom.xml
index 77e1522d04..96e57a42c8 100644
--- a/plugin/web-ui/marketplace/pom.xml
+++ b/plugin/web-ui/marketplace/pom.xml
@@ -3,7 +3,7 @@
org.nuxeo.web.ui
nuxeo-web-ui-parent
- 3.1.8-SNAPSHOT
+ 3.1.10-SNAPSHOT
../../../pom.xml
diff --git a/pom.xml b/pom.xml
index 4bc9ed1da2..ef40ec9dd4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
pom
Nuxeo Web UI - Parent
Nuxeo Web UI - Parent
- 3.1.8-SNAPSHOT
+ 3.1.10-SNAPSHOT
2023.*