Skip to content

Commit

Permalink
Merge branch 'maintenance-3.1.x' into dependabot/npm_and_yarn/dataviz…
Browse files Browse the repository at this point in the history
…/moment-2.29.4
  • Loading branch information
madhurkulshrestha-hyland authored Jan 31, 2025
2 parents 572b9c2 + 98fa712 commit 8f3afd5
Show file tree
Hide file tree
Showing 348 changed files with 150,480 additions and 28,238 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
registry-url: 'https://packages.nuxeo.com/repository/npm-public/'
scope: '@nuxeo'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
registry-url: 'https://packages.nuxeo.com/repository/npm-public/'
scope: '@nuxeo'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
registry-url: 'https://packages.nuxeo.com/repository/npm-public/'
scope: '@nuxeo'

Expand Down
17 changes: 1 addition & 16 deletions .github/workflows/promote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
steps:
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
registry-url: 'https://packages.nuxeo.com/repository/npm-public/'
scope: '@nuxeo'

Expand Down Expand Up @@ -71,21 +71,6 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PACKAGES_TOKEN }}
run: |
npx ${{ env.LERNA }} exec --ignore @nuxeo/nuxeo-elements-storybook -- npm publish --@nuxeo:registry=https://packages.nuxeo.com/repository/npm-public/
- name: Publish to https://registry.npmjs.org (dry run)
if: ${{ github.event.inputs.dryRun == 'true' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
run: |
npx ${{ env.LERNA }} exec --ignore @nuxeo/nuxeo-elements-storybook -- npm publish --@nuxeo:registry=https://registry.npmjs.org/ --access public --dry-run
- name: Publish to https://registry.npmjs.org
continue-on-error: true
if: ${{ github.event.inputs.dryRun == 'false' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
run: |
npx ${{ env.LERNA }} exec --ignore @nuxeo/nuxeo-elements-storybook -- npm publish --@nuxeo:registry=https://registry.npmjs.org/ --access public
- uses: actions/checkout@v2
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/storybook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
registry-url: 'https://packages.nuxeo.com/repository/npm-public/'
scope: '@nuxeo'

Expand All @@ -45,12 +45,15 @@ jobs:

- name: Build storybook
working-directory: storybook
env:
NODE_OPTIONS: --openssl-legacy-provider
run: |
npx build-storybook -o dist -s ./public
- name: Deploy
if: ${{ env.BRANCH_NAME == 'maintenance-3.1.x' }}
env:
GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}
NODE_OPTIONS: --openssl-legacy-provider
working-directory: storybook
run: npm run deploy -- --ci
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
registry-url: 'https://packages.nuxeo.com/repository/npm-public/'
scope: '@nuxeo'

Expand Down
4 changes: 2 additions & 2 deletions core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"repository": "nuxeo/nuxeo-elements.git",
"name": "@nuxeo/nuxeo-elements",
"version": "3.1.5-SNAPSHOT",
"version": "3.1.16-SNAPSHOT",
"author": "Nuxeo",
"license": "Apache-2.0",
"scripts": {
Expand All @@ -21,7 +21,7 @@
},
"devDependencies": {
"@nuxeo/moment": "^2.24.0-nx.0",
"@nuxeo/testing-helpers": "^3.1.5-SNAPSHOT",
"@nuxeo/testing-helpers": "^3.1.16-SNAPSHOT",
"@polymer/iron-component-page": "^4.0.0",
"polymer-cli": "^1.8.0"
},
Expand Down
8 changes: 4 additions & 4 deletions dataviz/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
],
"repository": "nuxeo/nuxeo-elements.git",
"name": "@nuxeo/nuxeo-dataviz-elements",
"version": "3.1.5-SNAPSHOT",
"version": "3.1.16-SNAPSHOT",
"author": "Nuxeo",
"license": "Apache-2.0",
"scripts": {
"docs": "polymer analyze . > analysis.json && npm run serve",
"serve": "polymer serve --npm -c ../node_modules"
},
"devDependencies": {
"@nuxeo/testing-helpers": "^3.1.5-SNAPSHOT",
"@nuxeo/testing-helpers": "^3.1.16-SNAPSHOT",
"@polymer/iron-component-page": "^4.0.0",
"@polymer/test-fixture": "^4.0.2",
"@webcomponents/webcomponentsjs": "^2.0.0",
Expand All @@ -32,8 +32,8 @@
"main": "nuxeo-dataviz-elements.js",
"dependencies": {
"@nuxeo/moment": "^2.24.0-nx.0",
"@nuxeo/nuxeo-elements": "^3.1.5-SNAPSHOT",
"@nuxeo/nuxeo-elements": "^3.1.16-SNAPSHOT",
"@polymer/polymer": "^3.0.0",
"moment": "2.29.4"
"moment": "2.30.1"
}
}
8 changes: 8 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ if (process.env.SAUCE_USERNAME && process.env.SAUCE_ACCESS_KEY) {
platform: 'Windows 10',
version: 'latest',
},
sl_latest_firefox: {
base: 'SauceLabs',
browserName: 'firefox',
platform: 'Windows 10',
version: '98.0',
geckodriverVersion: '0.30.0',
},
sl_latest_safari: {
base: 'SauceLabs',
browserName: 'safari',
Expand All @@ -50,6 +57,7 @@ module.exports = (config) => {

config.set({
sauceLabs,
hostname: '127.0.0.1',
basePath: '',
singleRun: true,
browsers: config.browsers && config.browsers.length > 0 ? config.browsers : Object.keys(customLaunchers),
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"packages": [
"*"
],
"version": "3.1.5-SNAPSHOT",
"version": "3.1.16-SNAPSHOT",
"hoist": true
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"repository": "nuxeo/nuxeo-elements.git",
"name": "nuxeo-elements",
"private": true,
"version": "3.1.5-SNAPSHOT",
"version": "3.1.16-SNAPSHOT",
"author": "Nuxeo",
"license": "Apache-2.0",
"engines": {
"node": ">=14.0.0"
"node": ">=18.0.0"
},
"scripts": {
"postinstall": "check-engine --ignore",
Expand Down
8 changes: 4 additions & 4 deletions storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"description": "Nuxeo Web Components Storybook",
"repository": "nuxeo/nuxeo-elements.git",
"name": "@nuxeo/nuxeo-elements-storybook",
"version": "3.1.5-SNAPSHOT",
"version": "3.1.16-SNAPSHOT",
"author": "Nuxeo",
"license": "Apache-2.0",
"private": true,
"dependencies": {
"@babel/core": "^7.3.4",
"@nuxeo/nuxeo-elements": "^3.1.5-SNAPSHOT",
"@nuxeo/nuxeo-ui-elements": "^3.1.5-SNAPSHOT",
"@nuxeo/testing-helpers": "^3.1.5-SNAPSHOT",
"@nuxeo/nuxeo-elements": "^3.1.16-SNAPSHOT",
"@nuxeo/nuxeo-ui-elements": "^3.1.16-SNAPSHOT",
"@nuxeo/testing-helpers": "^3.1.16-SNAPSHOT",
"@polymer/iron-icon": "^3.0.0",
"@polymer/iron-meta": "^3.0.1",
"@polymer/polymer": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ storiesOf('UI/nuxeo-actions-menu', module).add('Default', () => {
<nuxeo-actions-menu>
${list.map(
(i) => html`
<nuxeo-link-button href="javascript:void(0)" icon=${i} label=${i}> </nuxeo-link-button>
<nuxeo-link-button href="#" icon=${i} label=${i}> </nuxeo-link-button>
`,
)}
</nuxeo-actions-menu>
Expand Down
2 changes: 1 addition & 1 deletion testing-helpers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nuxeo/testing-helpers",
"version": "3.1.5-SNAPSHOT",
"version": "3.1.16-SNAPSHOT",
"description": "Nuxeo Web Components Testing Helpers",
"keywords": [
"nuxeo",
Expand Down
19 changes: 18 additions & 1 deletion ui/actions/nuxeo-add-to-collection-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,25 @@ import '../nuxeo-button-styles.js';
return item.id === -1 ? label : escapeHTML(label);
}

_escapeHTML(markup) {
const replaceMap = {
'\\': '&#92;',
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'/': '&#47;',
};

// Do not try to escape the markup if it's not a string
if (typeof markup !== 'string') {
return markup;
}

return String(markup).replace(/[&<>"/\\]/g, (match) => replaceMap[match]);
}

_newEntryFormatter(term) {
return { id: -1, displayLabel: term };
return { id: -1, displayLabel: this._escapeHTML(term) };
}

_isValid() {
Expand Down
27 changes: 20 additions & 7 deletions ui/dataviz/nuxeo-document-distribution-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ import { I18nBehavior } from '../nuxeo-i18n-behavior.js';
#ex {
position: absolute;
top: 260px;
left: 305px;
width: 140px;
text-align: center;
z-index: 10;
Expand Down Expand Up @@ -491,7 +489,10 @@ import { I18nBehavior } from '../nuxeo-i18n-behavior.js';
return this.$.nx.request().then((request) =>
request
.execute(options)
.then(this._handleResponse.bind(this))
.then((res) => {
window.onresize = () => this._handleResponse(res);
this._handleResponse(res);
})
.catch(this._handleError.bind(this)),
);
}
Expand Down Expand Up @@ -539,7 +540,7 @@ import { I18nBehavior } from '../nuxeo-i18n-behavior.js';
}

_buildSunBurst(aggs) {
const aggregations = aggs.subLevel;
const aggregations = JSON.parse(JSON.stringify(aggs.subLevel));
aggregations.name = 'root';
aggregations.color = this._getColor(aggregations.name, this.chartHue, this.chartLuminosity);
aggregations.children = aggregations.buckets;
Expand All @@ -553,23 +554,35 @@ import { I18nBehavior } from '../nuxeo-i18n-behavior.js';
this._chartData = aggregations;

// Dimensions of sunburst.
const maxRadius = this.$.chart.offsetWidth / 2 - 20;
radius = Math.min(this.width, this.height) / 2;
let { width, height } = this;

if (radius > maxRadius) {
radius = maxRadius;
width = height = 2 * radius;
}

// Total size of all segments; we set this later, after loading the data.
this.totalSize = 0;

const svg = this.$.chart.querySelector('svg');
const textContainer = this.$.chart.querySelector('#ex');
if (svg) {
svg.parentNode.removeChild(svg);
}

vis = select(this.$.chart)
.append('svg:svg')
.attr('width', this.width)
.attr('height', this.height)
.attr('width', width)
.attr('height', height)
.append('svg:g')
.attr('id', 'container')
.attr('transform', `translate(${this.width / 2},${this.height / 2})`);
.attr('transform', `translate(${width / 2},${height / 2})`);

textContainer.style.width = `${140}px`;
textContainer.style.height = `${70}px`;
textContainer.style.transform = `translate(${width / 2 - 70}px, ${height / 2 - 35}px)`;

_partition = partition().size([2 * Math.PI, radius * radius]);

Expand Down
Loading

0 comments on commit 8f3afd5

Please sign in to comment.