diff --git a/.eslintrc-common.yaml b/.eslintrc-common.yaml index 4ae0d21d48..7eab58ca62 100644 --- a/.eslintrc-common.yaml +++ b/.eslintrc-common.yaml @@ -39,7 +39,7 @@ rules: - "error" prefer-const: 1 no-constant-condition: 0 - comma-dangle: 2 + comma-dangle: 0 no-debugger: 2 no-dupe-keys: 2 no-empty-character-class: 2 diff --git a/.github/workflows/.scripts/update-notice-year.js b/.github/workflows/.scripts/update-notice-year.js new file mode 100644 index 0000000000..2fbb6b7b82 --- /dev/null +++ b/.github/workflows/.scripts/update-notice-year.js @@ -0,0 +1,93 @@ +/** + * @typedef {import('@octokit/rest').Octokit} Octokit + * @typedef {import('@actions/github')['context']} Context + */ + +module.exports = async function updateNoticeYear( + /** @type {{ octokit: Octokit, context: Context }} */ + { octokit, context } +) { + const now = new Date() + // Change to UTC+8 + now.setHours(now.getHours() + 8) + const newYear = now.getFullYear() + console.log('Prepare to update notice year to', newYear) + + const noticeContent = `Apache ECharts +Copyright 2017-${newYear} The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (https://www.apache.org/).` + + const repoCtx = context.repo + + const repoInfo = (await octokit.rest.repos.get(repoCtx)).data + const defaultBranchName = repoInfo.default_branch + const remoteNoticeFile = (await octokit.rest.repos.getContent({ + ...repoCtx, + path: 'NOTICE', + ref: defaultBranchName + })).data + const remoteNoticeContent = base64ToUtf8(remoteNoticeFile.content) + if (remoteNoticeContent === noticeContent) { + console.log('NOTICE year is already updated.') + return + } + + console.log('Ready to update the NOTICE file:\n' + noticeContent) + + const defaultBranch = (await octokit.rest.repos.getBranch({ + ...repoCtx, + branch: defaultBranchName + })).data + + const newBranchName = `bot/update-notice-year/${newYear}` + await octokit.rest.git.createRef({ + ...repoCtx, + ref: `refs/heads/${newBranchName}`, + sha: defaultBranch.commit.sha + }) + console.log('Created a new branch:', newBranchName) + + await octokit.rest.repos.createOrUpdateFileContents({ + ...repoCtx, + path: 'NOTICE', + message: `chore: update NOTICE year to ${newYear}`, + content: utf8ToBase64(noticeContent), + sha: remoteNoticeFile.sha, + branch: newBranchName + }) + + console.log('Updated the NOTICE file on the new branch') + + const pr = (await octokit.rest.pulls.create({ + ...repoCtx, + head: newBranchName, + base: defaultBranchName, + maintainer_can_modify: true, + title: `chore: update NOTICE year to ${newYear}`, + body: `## Brief Information + +This pull request is in the type of: + +- [ ] bug fixing +- [ ] new feature +- [x] others + +### What does this PR do? + +Update notice year to ${newYear}. 💖 + +Happy new year! 祝大家新年快乐!🎇` + })).data + + console.log(`Opened PR #${pr.number} for updating the NOTICE file`) +} + +function utf8ToBase64(data) { + return Buffer.from(data, 'utf-8').toString('base64') +} + +function base64ToUtf8(data) { + return Buffer.from(data, 'base64').toString('utf-8') +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d11e9faa6e..0a15bd6348 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,12 +25,12 @@ jobs: run: | echo "FETCH_DEPTH=$(($PR_COMMIT_COUNT + 1))" >> $GITHUB_ENV - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: ${{ env.FETCH_DEPTH }} - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} @@ -67,10 +67,10 @@ jobs: node-version: [18.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/nightly-next.yml b/.github/workflows/nightly-next.yml index bf40c6e71e..1de3715395 100644 --- a/.github/workflows/nightly-next.yml +++ b/.github/workflows/nightly-next.yml @@ -18,12 +18,12 @@ jobs: node-version: [18.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: next - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: registry-url: https://registry.npmjs.org/ node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 085b80d306..cf65881730 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -18,10 +18,10 @@ jobs: node-version: [18.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: registry-url: https://registry.npmjs.org/ node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/source-release.yml b/.github/workflows/source-release.yml index b6d0e57e4b..5719131170 100644 --- a/.github/workflows/source-release.yml +++ b/.github/workflows/source-release.yml @@ -14,10 +14,10 @@ jobs: node-version: [18.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} @@ -59,10 +59,10 @@ jobs: node-version: [18.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} @@ -87,6 +87,7 @@ jobs: index.d.ts src/ extension-src/ + ssr/client/src/ licenses/ theme/ build/ @@ -113,7 +114,7 @@ jobs: steps: - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/update-notice-year.yml b/.github/workflows/update-notice-year.yml new file mode 100644 index 0000000000..8aa325327b --- /dev/null +++ b/.github/workflows/update-notice-year.yml @@ -0,0 +1,24 @@ +name: Update NOTICE year + +on: + schedule: + # 1/1 00:00 UTC+8 + - cron: '0 16 31 12 *' + workflow_dispatch: + +jobs: + update-notice-year: + if: ${{ github.repository_owner == 'apache' }} + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + sparse-checkout: | + .github/workflows/.scripts + + - uses: actions/github-script@v7 + with: + script: | + const updateNoticeYear = require('.github/workflows/.scripts/update-notice-year.js') + await updateNoticeYear({ octokit: github, context }) diff --git a/.gitignore b/.gitignore index ba75419260..43197b694e 100644 --- a/.gitignore +++ b/.gitignore @@ -195,6 +195,10 @@ todo /index.blank.js /extension-esm /extension +/ssr/client/lib +/ssr/client/types +/ssr/client/index.js +/ssr/client/index.d.ts /core.js /core.d.ts /charts.js diff --git a/.npmignore b/.npmignore index d25559df2e..552a7d0f54 100644 --- a/.npmignore +++ b/.npmignore @@ -7,6 +7,7 @@ /npm-debug.log /benchmark /src +/ssr/client/src .DS_Store Thumbs.db Desktop.ini diff --git a/NOTICE b/NOTICE index 0877faab81..6f7322151d 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ Apache ECharts -Copyright 2017-2023 The Apache Software Foundation +Copyright 2017-2024 The Apache Software Foundation This product includes software developed at -The Apache Software Foundation (https://www.apache.org/). +The Apache Software Foundation (https://www.apache.org/). \ No newline at end of file diff --git a/build/build.js b/build/build.js index d6e9cc7a44..fbf6e8820d 100755 --- a/build/build.js +++ b/build/build.js @@ -97,6 +97,12 @@ async function run() { ]; await build(cfgs); } + else if (buildType === 'ssr') { + const cfgs = [ + config.createSSRClient(opt) + ]; + await build(cfgs); + } else if (buildType === 'myTransform') { const cfgs = [ config.createMyTransform(opt) diff --git a/build/config.js b/build/config.js index f07f008058..9d639e476d 100644 --- a/build/config.js +++ b/build/config.js @@ -108,7 +108,7 @@ exports.createECharts = function (opt = {}) { opt, { name: 'echarts', - // Ignore default exports, which is only for compitable code like: + // Ignore default exports, which is only for compatible code like: // import echarts from 'echarts/lib/echarts'; exports: 'named', format: format @@ -174,3 +174,19 @@ exports.createMyTransform = function (opt) { ) }; }; + +exports.createSSRClient = function (opt) { + const input = nodePath.resolve(ecDir, `ssr/client/lib/index.js`); + + return { + plugins: [nodeResolvePlugin()], + input: input, + output: createOutputs( + nodePath.resolve(ecDir, `ssr/client/dist/index`), + opt, + { + name: 'echarts-ssr-client' + } + ) + }; +}; diff --git a/build/package.json b/build/package.json new file mode 100644 index 0000000000..6a0d2ef2aa --- /dev/null +++ b/build/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} \ No newline at end of file diff --git a/build/pre-publish.js b/build/pre-publish.js index 75d7c771a9..9f6b68149d 100644 --- a/build/pre-publish.js +++ b/build/pre-publish.js @@ -19,7 +19,7 @@ /** * [Create CommonJS files]: - * Compatible with prevoius folder structure: `echarts/lib` exists in `node_modules` + * Compatible with previous folder structure: `echarts/lib` exists in `node_modules` * (1) Build all files to CommonJS to `echarts/lib`. * (2) Remove __DEV__. * (3) Mount `echarts/src/export.js` to `echarts/lib/echarts.js`. @@ -67,6 +67,15 @@ const extensionSrcGlobby = { }; const extensionSrcDir = nodePath.resolve(ecDir, 'extension-src'); const extensionESMDir = nodePath.resolve(ecDir, 'extension'); +const ssrClientGlobby = { + patterns: [ + 'ssr/client/src/**/*.ts' + ], + cwd: ecDir +}; +const ssrClientSrcDir = nodePath.resolve(ecDir, 'ssr/client/src'); +const ssrClientESMDir = nodePath.resolve(ecDir, 'ssr/client/lib'); +const ssrClientTypeDir = nodePath.resolve(ecDir, 'ssr/client/types'); const typesDir = nodePath.resolve(ecDir, 'types'); const esmDir = 'lib'; @@ -79,7 +88,7 @@ const compileWorkList = [ module: 'ES2015', rootDir: ecDir, outDir: tmpDir, - // Generate types when buidling esm + // Generate types when building esm declaration: true, declarationDir: typesDir }, @@ -135,6 +144,27 @@ const compileWorkList = [ after: async function () { await transformLibFiles(extensionESMDir, 'lib'); } + }, + { + logLabel: 'ssr client ts -> js-esm', + compilerOptionsOverride: { + module: 'ES2015', + declaration: true, + rootDir: ssrClientSrcDir, + outDir: ssrClientESMDir, + declarationDir: ssrClientTypeDir + }, + srcGlobby: ssrClientGlobby, + transformOptions: { + filesGlobby: {patterns: ['**/*.js'], cwd: ssrClientESMDir}, + transformDEV: true + }, + before: async function () { + fsExtra.removeSync(ssrClientESMDir); + }, + after: async function () { + await transformLibFiles(ssrClientESMDir, 'lib'); + } } ]; @@ -178,7 +208,7 @@ module.exports = async function () { }; async function runTsCompile(localTs, compilerOptions, srcPathList) { - // Must do it. becuase the value in tsconfig.json might be different from the inner representation. + // Must do it, because the value in tsconfig.json might be different from the inner representation. // For example: moduleResolution: "NODE" => moduleResolution: 2 const {options, errors} = localTs.convertCompilerOptionsFromJson(compilerOptions, ecDir); @@ -344,6 +374,7 @@ async function readFilePaths({patterns, cwd}) { ); } +// Bundle can be used in echarts-examples. async function bundleDTS() { const outDir = nodePath.resolve(__dirname, '../types/dist'); @@ -414,14 +445,16 @@ function readTSConfig() { function generateEntries() { - ['charts', 'components', 'renderers', 'core', 'features'].forEach(entryName => { - if (entryName !== 'option') { - const jsCode = fs.readFileSync(nodePath.join(__dirname, `template/${entryName}.js`), 'utf-8'); - fs.writeFileSync(nodePath.join(__dirname, `../${entryName}.js`), jsCode, 'utf-8'); + ['charts', 'components', 'renderers', 'core', 'features', 'ssr/client/index'].forEach(entryPath => { + if (entryPath !== 'option') { + const jsCode = fs.readFileSync(nodePath.join(__dirname, `template/${entryPath}.js`), 'utf-8'); + fs.writeFileSync(nodePath.join(__dirname, `../${entryPath}.js`), jsCode, 'utf-8'); } - const dtsCode = fs.readFileSync(nodePath.join(__dirname, `/template/${entryName}.d.ts`), 'utf-8'); - fs.writeFileSync(nodePath.join(__dirname, `../${entryName}.d.ts`), dtsCode, 'utf-8'); + // Make the d.ts in the same dir as .js, so that the can be found by tsc. + // package.json "types" in "exports" does not always seam to work. + const dtsCode = fs.readFileSync(nodePath.join(__dirname, `/template/${entryPath}.d.ts`), 'utf-8'); + fs.writeFileSync(nodePath.join(__dirname, `../${entryPath}.d.ts`), dtsCode, 'utf-8'); }); } diff --git a/build/template/ssr/client/index.d.ts b/build/template/ssr/client/index.d.ts new file mode 100644 index 0000000000..33876e9cf5 --- /dev/null +++ b/build/template/ssr/client/index.d.ts @@ -0,0 +1,20 @@ +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +export * from './types/index'; diff --git a/build/template/ssr/client/index.js b/build/template/ssr/client/index.js new file mode 100644 index 0000000000..1dd9ed735f --- /dev/null +++ b/build/template/ssr/client/index.js @@ -0,0 +1,20 @@ +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +export * from './lib/index.js'; diff --git a/dist/package.json b/dist/package.json new file mode 100644 index 0000000000..6a0d2ef2aa --- /dev/null +++ b/dist/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} \ No newline at end of file diff --git a/i18n/package.json b/i18n/package.json new file mode 100644 index 0000000000..6a0d2ef2aa --- /dev/null +++ b/i18n/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3fe46d2df7..0e93d4063a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "Apache-2.0", "dependencies": { "tslib": "2.3.0", - "zrender": "5.4.4" + "zrender": "npm:zrender-nightly@^5.4.4-dev.20231116" }, "devDependencies": { "@babel/code-frame": "7.10.4", @@ -92,51 +92,94 @@ } }, "node_modules/@babel/generator": { - "version": "7.11.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.6.tgz", - "integrity": "sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "dependencies": { - "@babel/types": "^7.11.5", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@babel/generator/node_modules/@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", - "dev": true - }, "node_modules/@babel/generator/node_modules/@babel/types": { - "version": "7.12.12", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz", - "integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", - "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/helper-get-function-arity": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", - "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", + "node_modules/@babel/helper-function-name/node_modules/@babel/types": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { - "@babel/types": "^7.10.4" + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/helper-member-expression-to-functions": { @@ -196,46 +239,6 @@ "lodash": "^4.17.19" } }, - "node_modules/@babel/helper-module-transforms/node_modules/@babel/generator": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz", - "integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.12.1", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - } - }, - "node_modules/@babel/helper-module-transforms/node_modules/@babel/parser": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", - "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/helper-module-transforms/node_modules/@babel/traverse": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz", - "integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.12.1", - "@babel/types": "^7.12.1", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" - } - }, "node_modules/@babel/helper-module-transforms/node_modules/@babel/types": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", @@ -274,46 +277,6 @@ "@babel/types": "^7.12.1" } }, - "node_modules/@babel/helper-replace-supers/node_modules/@babel/generator": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz", - "integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.12.1", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - } - }, - "node_modules/@babel/helper-replace-supers/node_modules/@babel/parser": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", - "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/helper-replace-supers/node_modules/@babel/traverse": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz", - "integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.12.1", - "@babel/types": "^7.12.1", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" - } - }, "node_modules/@babel/helper-replace-supers/node_modules/@babel/types": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", @@ -346,36 +309,48 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", - "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "dependencies": { - "@babel/types": "^7.11.0" + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", - "dev": true - }, "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.12.12", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz", - "integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", - "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", - "dev": true + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, "node_modules/@babel/helpers": { "version": "7.10.4", @@ -389,14 +364,17 @@ } }, "node_modules/@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/highlight/node_modules/chalk": { @@ -414,9 +392,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz", - "integrity": "sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -558,48 +536,120 @@ } }, "node_modules/@babel/template": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", - "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/parser": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@babel/traverse": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.5.tgz", - "integrity": "sha512-EjiPXt+r7LiCZXEfRpSJd+jUMnBd4/9OUv7Nx3+0u9+eimMwJmG0Q98lw4/289JCoxSE8OolDMNZaaF/JZ69WQ==", + "node_modules/@babel/template/node_modules/@babel/code-frame": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.11.5", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.11.5", - "@babel/types": "^7.11.5", + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template/node_modules/@babel/types": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/traverse": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", - "dev": true + "node_modules/@babel/traverse/node_modules/@babel/code-frame": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } }, "node_modules/@babel/traverse/node_modules/@babel/types": { - "version": "7.12.12", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz", - "integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" } }, "node_modules/@babel/types": { @@ -1493,13 +1543,13 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.14", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", - "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", + "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@lang/rollup-plugin-dts": { @@ -5760,17 +5810,6 @@ "semver": "bin/semver" } }, - "node_modules/istanbul-lib-instrument/node_modules/@babel/generator": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz", - "integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.12.1", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - } - }, "node_modules/istanbul-lib-instrument/node_modules/@babel/helpers": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.1.tgz", @@ -5782,35 +5821,6 @@ "@babel/types": "^7.12.1" } }, - "node_modules/istanbul-lib-instrument/node_modules/@babel/parser": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", - "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/@babel/traverse": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz", - "integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.12.1", - "@babel/types": "^7.12.1", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" - } - }, "node_modules/istanbul-lib-instrument/node_modules/@babel/types": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", @@ -10828,9 +10838,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -11088,9 +11098,10 @@ "optional": true }, "node_modules/zrender": { - "version": "5.4.4", - "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.4.4.tgz", - "integrity": "sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==", + "name": "zrender-nightly", + "version": "5.4.4-dev.20231116", + "resolved": "https://registry.npmjs.org/zrender-nightly/-/zrender-nightly-5.4.4-dev.20231116.tgz", + "integrity": "sha512-KcmcgyJV2F9aCxQaxZjG87K0I2zGWyci/ZyGbeiEKGa1Co2NFG5ME5dr1SxLg892RN3FsTzHywbG+sbC5mSfNg==", "dependencies": { "tslib": "2.3.0" } @@ -11137,53 +11148,79 @@ } }, "@babel/generator": { - "version": "7.11.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.6.tgz", - "integrity": "sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "requires": { - "@babel/types": "^7.11.5", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" }, "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", - "dev": true - }, "@babel/types": { - "version": "7.12.12", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz", - "integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } } } }, + "@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true + }, "@babel/helper-function-name": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", - "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + }, + "dependencies": { + "@babel/types": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + } + } } }, - "@babel/helper-get-function-arity": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", - "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", + "@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.22.5" + }, + "dependencies": { + "@babel/types": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + } + } } }, "@babel/helper-member-expression-to-functions": { @@ -11247,40 +11284,6 @@ "lodash": "^4.17.19" }, "dependencies": { - "@babel/generator": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz", - "integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==", - "dev": true, - "requires": { - "@babel/types": "^7.12.1", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - } - }, - "@babel/parser": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", - "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", - "dev": true - }, - "@babel/traverse": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz", - "integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.12.1", - "@babel/types": "^7.12.1", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" - } - }, "@babel/types": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", @@ -11321,40 +11324,6 @@ "@babel/types": "^7.12.1" }, "dependencies": { - "@babel/generator": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz", - "integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==", - "dev": true, - "requires": { - "@babel/types": "^7.12.1", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - } - }, - "@babel/parser": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", - "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", - "dev": true - }, - "@babel/traverse": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz", - "integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.12.1", - "@babel/types": "^7.12.1", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" - } - }, "@babel/types": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", @@ -11391,37 +11360,37 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", - "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "requires": { - "@babel/types": "^7.11.0" + "@babel/types": "^7.22.5" }, "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", - "dev": true - }, "@babel/types": { - "version": "7.12.12", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz", - "integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } } } }, + "@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true + }, "@babel/helper-validator-identifier": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", - "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true }, "@babel/helpers": { @@ -11436,13 +11405,13 @@ } }, "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "dependencies": { @@ -11460,9 +11429,9 @@ } }, "@babel/parser": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz", - "integrity": "sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -11565,49 +11534,99 @@ } }, "@babel/template": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", - "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/parser": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "dev": true, + "requires": { + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + } + }, + "@babel/types": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + } } }, "@babel/traverse": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.5.tgz", - "integrity": "sha512-EjiPXt+r7LiCZXEfRpSJd+jUMnBd4/9OUv7Nx3+0u9+eimMwJmG0Q98lw4/289JCoxSE8OolDMNZaaF/JZ69WQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.11.5", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.11.5", - "@babel/types": "^7.11.5", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" + "globals": "^11.1.0" }, "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", - "dev": true + "@babel/code-frame": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "dev": true, + "requires": { + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + } }, "@babel/types": { - "version": "7.12.12", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz", - "integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } } } }, @@ -12340,13 +12359,13 @@ "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.14", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", - "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", + "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", "dev": true, "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "@lang/rollup-plugin-dts": { @@ -15772,17 +15791,6 @@ } } }, - "@babel/generator": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz", - "integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==", - "dev": true, - "requires": { - "@babel/types": "^7.12.1", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - } - }, "@babel/helpers": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.1.tgz", @@ -15794,29 +15802,6 @@ "@babel/types": "^7.12.1" } }, - "@babel/parser": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", - "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", - "dev": true - }, - "@babel/traverse": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz", - "integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.12.1", - "@babel/types": "^7.12.1", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" - } - }, "@babel/types": { "version": "7.12.1", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", @@ -19865,9 +19850,9 @@ } }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "dev": true }, "wrap-ansi": { @@ -20067,9 +20052,9 @@ } }, "zrender": { - "version": "5.4.4", - "resolved": "https://registry.npmjs.org/zrender/-/zrender-5.4.4.tgz", - "integrity": "sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==", + "version": "npm:zrender-nightly@5.4.4-dev.20231116", + "resolved": "https://registry.npmjs.org/zrender-nightly/-/zrender-nightly-5.4.4-dev.20231116.tgz", + "integrity": "sha512-KcmcgyJV2F9aCxQaxZjG87K0I2zGWyci/ZyGbeiEKGa1Co2NFG5ME5dr1SxLg892RN3FsTzHywbG+sbC5mSfNg==", "requires": { "tslib": "2.3.0" } diff --git a/package.json b/package.json index 9f9ee2d3ec..3fc7aa42c1 100644 --- a/package.json +++ b/package.json @@ -45,10 +45,11 @@ "build:i18n": "node build/build-i18n.js", "build:lib": "node build/build.js --prepublish", "build:extension": "node build/build.js --type extension", + "build:ssr": "node build/build.js --type ssr", "dev:fast": "node build/build-i18n.js && node build/dev-fast.js", "dev": "npx -y concurrently -n build,server \"npm run dev:fast\" \"npx -y http-server -c-1 -s -o test\"", "prepare": "npm run build:lib && husky install", - "release": "npm run build:lib && npm run build:i18n && npm run build && npm run build:esm && npm run build:extension", + "release": "npm run build:lib && npm run build:i18n && npm run build && npm run build:esm && npm run build:extension && npm run build:ssr", "help": "node build/build.js --help", "test:visual": "node test/runTest/server.js", "test": "npx jest --config test/ut/jest.config.js", @@ -58,13 +59,13 @@ "mktest": "node test/build/mktest.js", "mktest:help": "node test/build/mktest.js -h", "checktype": "tsc --noEmit", - "lint": "npx eslint --cache --cache-location node_modules/.cache/eslint src/**/*.ts extension-src/**/*.ts", + "lint": "npx eslint --cache --cache-location node_modules/.cache/eslint src/**/*.ts ssr/client/src/**/*.ts extension-src/**/*.ts", "lint:fix": "npx eslint --fix src/**/*.ts extension-src/**/*.ts", "lint:dist": "echo 'It might take a while. Please wait ...' && npx jshint --config .jshintrc-dist dist/echarts.js" }, "dependencies": { "tslib": "2.3.0", - "zrender": "5.4.4" + "zrender": "npm:zrender-nightly@^5.4.4-dev.20231116" }, "devDependencies": { "@babel/code-frame": "7.10.4", @@ -100,5 +101,49 @@ "terser": "^5.16.1", "ts-jest": "^26.4.3", "typescript": "4.4.3" + }, + "type": "module", + "exports": { + ".": { + "types": "./index.d.ts", + "import": "./index.js", + "require": "./index.js" + }, + "./core": "./core.js", + "./core.js": "./core.js", + "./charts": "./charts.js", + "./charts.js": "./charts.js", + "./components": "./components.js", + "./components.js": "./components.js", + "./features": "./features.js", + "./features.js": "./features.js", + "./renderers": "./renderers.js", + "./renderers.js": "./renderers.js", + "./index.blank": "./index.blank.js", + "./index.blank.js": "./index.blank.js", + "./index.common": "./index.common.js", + "./index.common.js": "./index.common.js", + "./index.simple": "./index.simple.js", + "./index.simple.js": "./index.simple.js", + "./index": "./index.js", + "./index.js": "./index.js", + "./extension/dataTool": "./extension/dataTool/index.js", + "./extension/dataTool/index": "./extension/dataTool/index.js", + "./extension/dataTool/index.js": "./extension/dataTool/index.js", + "./extension/bmap/bmap": "./extension/bmap/bmap.js", + "./extension/bmap/bmap.js": "./extension/bmap/bmap.js", + "./lib/echarts": "./lib/echarts.js", + "./lib/echarts.js": "./lib/echarts.js", + "./lib/extension": "./lib/extension.js", + "./lib/extension.js": "./lib/extension.js", + "./ssr/client/index": { + "types": "./ssr/client/index.d.ts", + "import": "./ssr/client/index.js", + "require": "./ssr/client/dist/index.js" + }, + "./*.js": "./*.js", + "./*.ts": "./*.ts", + "./*.json": "./*.json", + "./*": "./*.js" } -} +} \ No newline at end of file diff --git a/src/animation/universalTransition.ts b/src/animation/universalTransition.ts index c82d3d78f8..c1747bbe7b 100644 --- a/src/animation/universalTransition.ts +++ b/src/animation/universalTransition.ts @@ -28,7 +28,14 @@ import { EChartsExtensionInstallRegisters } from '../extension'; import { initProps } from '../util/graphic'; import DataDiffer from '../data/DataDiffer'; import SeriesData from '../data/SeriesData'; -import { Dictionary, DimensionLoose, OptionDataItemObject, UniversalTransitionOption } from '../util/types'; +import { + Dictionary, + DimensionLoose, + DimensionName, + DataVisualDimensions, + OptionDataItemObject, + UniversalTransitionOption +} from '../util/types'; import { UpdateLifecycleParams, UpdateLifecycleTransitionItem, @@ -42,14 +49,17 @@ import Model from '../model/Model'; import Displayable from 'zrender/src/graphic/Displayable'; const DATA_COUNT_THRESHOLD = 1e4; +const TRANSITION_NONE = 0; +const TRANSITION_P2C = 1; +const TRANSITION_C2P = 2; interface GlobalStore { oldSeries: SeriesModel[], oldDataGroupIds: string[], oldData: SeriesData[] }; const getUniversalTransitionGlobalStore = makeInner(); interface DiffItem { - dataGroupId: string data: SeriesData - dim: DimensionLoose + groupId: string + childGroupId: string divide: UniversalTransitionOption['divideShape'] dataIndex: number } @@ -57,24 +67,61 @@ interface TransitionSeries { dataGroupId: string data: SeriesData divide: UniversalTransitionOption['divideShape'] - dim?: DimensionLoose + groupIdDim?: DimensionLoose } -function getGroupIdDimension(data: SeriesData) { +function getDimension(data: SeriesData, visualDimension: string) { const dimensions = data.dimensions; for (let i = 0; i < dimensions.length; i++) { const dimInfo = data.getDimensionInfo(dimensions[i]); - if (dimInfo && dimInfo.otherDims.itemGroupId === 0) { + if (dimInfo && dimInfo.otherDims[visualDimension as keyof DataVisualDimensions] === 0) { return dimensions[i]; } } } +// get value by dimension. (only get value of itemGroupId or childGroupId, so convert it to string) +function getValueByDimension(data: SeriesData, dataIndex: number, dimension: DimensionName) { + const dimInfo = data.getDimensionInfo(dimension); + const dimOrdinalMeta = dimInfo && dimInfo.ordinalMeta; + if (dimInfo) { + const value = data.get(dimInfo.name, dataIndex); + if (dimOrdinalMeta) { + return (dimOrdinalMeta.categories[value as number] as string) || value + ''; + } + return value + ''; + } +} + +function getGroupId(data: SeriesData, dataIndex: number, dataGroupId: string, isChild: boolean) { + // try to get groupId from encode + const visualDimension = isChild ? 'itemChildGroupId' : 'itemGroupId'; + const groupIdDim = getDimension(data, visualDimension); + if (groupIdDim) { + const groupId = getValueByDimension(data, dataIndex, groupIdDim); + return groupId; + } + // try to get groupId from raw data item + const rawDataItem = data.getRawDataItem(dataIndex) as OptionDataItemObject; + const property = isChild ? 'childGroupId' : 'groupId'; + if (rawDataItem && rawDataItem[property]) { + return rawDataItem[property] + ''; + } + // fallback + if (isChild) { + return; + } + // try to use series.dataGroupId as groupId, otherwise use dataItem's id as groupId + return (dataGroupId || data.getId(dataIndex)); +} + +// flatten all data items from different serieses into one arrary function flattenDataDiffItems(list: TransitionSeries[]) { const items: DiffItem[] = []; each(list, seriesInfo => { const data = seriesInfo.data; + const dataGroupId = seriesInfo.dataGroupId; if (data.count() > DATA_COUNT_THRESHOLD) { if (__DEV__) { warn('Universal transition is disabled on large data > 10k.'); @@ -82,12 +129,11 @@ function flattenDataDiffItems(list: TransitionSeries[]) { return; } const indices = data.getIndices(); - const groupDim = getGroupIdDimension(data); for (let dataIndex = 0; dataIndex < indices.length; dataIndex++) { items.push({ - dataGroupId: seriesInfo.dataGroupId, data, - dim: seriesInfo.dim || groupDim, + groupId: getGroupId(data, dataIndex, dataGroupId, false), // either of groupId or childGroupId will be used as diffItem's key, + childGroupId: getGroupId(data, dataIndex, dataGroupId, true), // depending on the transition direction (see below) divide: seriesInfo.divide, dataIndex }); @@ -185,18 +231,71 @@ function transitionBetween( } } + let hasMorphAnimation = false; - function findKeyDim(items: DiffItem[]) { - for (let i = 0; i < items.length; i++) { - if (items[i].dim) { - return items[i].dim; - } + /** + * With groupId and childGroupId, we can build parent-child relationships between dataItems. + * However, we should mind the parent-child "direction" between old and new options. + * + * For example, suppose we have two dataItems from two series.data: + * + * dataA: [ dataB: [ + * { { + * value: 5, value: 3, + * groupId: 'creatures', groupId: 'animals', + * childGroupId: 'animals' childGroupId: 'dogs' + * }, }, + * ... ... + * ] ] + * + * where dataA is belong to optionA and dataB is belong to optionB. + * + * When we `setOption(optionB)` from optionA, we choose childGroupId of dataItemA and groupId of + * dataItemB as keys so the two keys are matched (both are 'animals'), then universalTransition + * will work. This derection is "parent -> child". + * + * If we `setOption(optionA)` from optionB, we also choose groupId of dataItemB and childGroupId + * of dataItemA as keys and universalTransition will work. This derection is "child -> parent". + * + * If there is no childGroupId specified, which means no multiLevelDrillDown/Up is needed and no + * parent-child relationship exists. This direction is "none". + * + * So we need to know whether to use groupId or childGroupId as the key when we call the keyGetter + * functions. Thus, we need to decide the direction first. + * + * The rule is: + * + * if (all childGroupIds in oldDiffItems and all groupIds in newDiffItems have common value) { + * direction = 'parent -> child'; + * } else if (all groupIds in oldDiffItems and all childGroupIds in newDiffItems have common value) { + * direction = 'child -> parent'; + * } else { + * direction = 'none'; + * } + */ + let direction = TRANSITION_NONE; + + // find all groupIds and childGroupIds from oldDiffItems + const oldGroupIds = createHashMap(); + const oldChildGroupIds = createHashMap(); + oldDiffItems.forEach((item) => { + item.groupId && oldGroupIds.set(item.groupId, true); + item.childGroupId && oldChildGroupIds.set(item.childGroupId, true); + + }); + // traverse newDiffItems and decide the direction according to the rule + for (let i = 0; i < newDiffItems.length; i++) { + const newGroupId = newDiffItems[i].groupId; + if (oldChildGroupIds.get(newGroupId)) { + direction = TRANSITION_P2C; + break; + } + const newChildGroupId = newDiffItems[i].childGroupId; + if (newChildGroupId && oldGroupIds.get(newChildGroupId)) { + direction = TRANSITION_C2P; + break; } } - const oldKeyDim = findKeyDim(oldDiffItems); - const newKeyDim = findKeyDim(newDiffItems); - - let hasMorphAnimation = false; function createKeyGetter(isOld: boolean, onlyGetId: boolean) { return function (diffItem: DiffItem): string { @@ -206,36 +305,12 @@ function transitionBetween( if (onlyGetId) { return data.getId(dataIndex); } - - // Use group id as transition key by default. - // So we can achieve multiple to multiple animation like drilldown / up naturally. - // If group id not exits. Use id instead. If so, only one to one transition will be applied. - const dataGroupId = diffItem.dataGroupId; - - // If specified key dimension(itemGroupId by default). Use this same dimension from other data. - // PENDING: If only use key dimension of newData. - const keyDim = isOld - ? (oldKeyDim || newKeyDim) - : (newKeyDim || oldKeyDim); - - const dimInfo = keyDim && data.getDimensionInfo(keyDim); - const dimOrdinalMeta = dimInfo && dimInfo.ordinalMeta; - - if (dimInfo) { - // Get from encode.itemGroupId. - const key = data.get(dimInfo.name, dataIndex); - if (dimOrdinalMeta) { - return dimOrdinalMeta.categories[key as number] as string || (key + ''); - } - return key + ''; + if (isOld) { + return direction === TRANSITION_P2C ? diffItem.childGroupId : diffItem.groupId; } - - // Get groupId from raw item. { groupId: '' } - const itemVal = data.getRawDataItem(dataIndex) as OptionDataItemObject; - if (itemVal && itemVal.groupId) { - return itemVal.groupId + ''; + else { + return direction === TRANSITION_C2P ? diffItem.childGroupId : diffItem.groupId; } - return (dataGroupId || data.getId(dataIndex)); }; } @@ -541,6 +616,7 @@ function findTransitionSeriesBatches( } else { // Transition from multiple series. + // e.g. 'female', 'male' -> ['female', 'male'] if (isArray(transitionKey)) { if (__DEV__) { checkTransitionSeriesKeyDuplicated(transitionKeyStr); @@ -569,6 +645,7 @@ function findTransitionSeriesBatches( } else { // Try transition to multiple series. + // e.g. ['female', 'male'] -> 'female', 'male' const oldData = oldDataMapForSplit.get(transitionKey); if (oldData) { let batch = updateBatches.get(oldData.key); @@ -623,7 +700,7 @@ function transitionSeriesFromOpt( data: globalStore.oldData[idx], // TODO can specify divideShape in transition. divide: getDivideShapeFromData(globalStore.oldData[idx]), - dim: finder.dimension + groupIdDim: finder.dimension }); } }); @@ -635,7 +712,7 @@ function transitionSeriesFromOpt( dataGroupId: globalStore.oldDataGroupIds[idx], data, divide: getDivideShapeFromData(data), - dim: finder.dimension + groupIdDim: finder.dimension }); } }); @@ -665,6 +742,7 @@ export function installUniversalTransition(registers: EChartsExtensionInstallReg // TODO multiple to multiple series. if (globalStore.oldSeries && params.updatedSeries && params.optionChanged) { + // TODO transitionOpt was used in an old implementation and can be removed now // Use give transition config if its' give; const transitionOpt = params.seriesTransition; if (transitionOpt) { diff --git a/src/chart/bar/BaseBarSeries.ts b/src/chart/bar/BaseBarSeries.ts index 81d3415202..caebce271e 100644 --- a/src/chart/bar/BaseBarSeries.ts +++ b/src/chart/bar/BaseBarSeries.ts @@ -52,9 +52,9 @@ export interface BaseBarSeriesOption = BaseBarSeri // If axis type is category, use tick coords instead if (axis.type === 'category' && dims != null) { const tickCoords = axis.getTicksCoords(); + const alignTicksWithLabel = axis.getTickModel().get('alignWithLabel'); let targetTickId = clampData[idx]; // The index of rightmost tick of markArea is 1 larger than x1/y1 index const isEnd = dims[idx] === 'x1' || dims[idx] === 'y1'; - if (isEnd) { + if (isEnd && !alignTicksWithLabel) { targetTickId += 1; } diff --git a/src/chart/bar/PictorialBarSeries.ts b/src/chart/bar/PictorialBarSeries.ts index d799057d9e..95fbdd230f 100644 --- a/src/chart/bar/PictorialBarSeries.ts +++ b/src/chart/bar/PictorialBarSeries.ts @@ -119,6 +119,8 @@ export interface PictorialBarSeriesOption coordinateSystem?: 'cartesian2d' data?: (PictorialBarDataItemOption | OptionDataValue | OptionDataValue[])[] + + clip?: boolean } class PictorialBarSeriesModel extends BaseBarSeriesModel { @@ -150,6 +152,10 @@ class PictorialBarSeriesModel extends BaseBarSeriesModel 0)]; const barRect = bar.__pictorialBarRect; + barRect.ignoreClip = true; setLabelStyle( barRect, getLabelStatesModels(itemModel), diff --git a/src/chart/graph/GraphSeries.ts b/src/chart/graph/GraphSeries.ts index e1b85bead6..6f6a7d6879 100644 --- a/src/chart/graph/GraphSeries.ts +++ b/src/chart/graph/GraphSeries.ts @@ -80,7 +80,7 @@ interface GraphEdgeStatesMixin { } export interface GraphNodeItemOption extends SymbolOptionMixin, GraphNodeStateOption, - GraphNodeStateOption, StatesOptionMixin { + StatesOptionMixin { id?: string name?: string diff --git a/src/chart/graph/GraphView.ts b/src/chart/graph/GraphView.ts index d5f51eba4c..f4559521fb 100644 --- a/src/chart/graph/GraphView.ts +++ b/src/chart/graph/GraphView.ts @@ -208,6 +208,8 @@ class GraphView extends ChartView { } dispose() { + this.remove(); + this._controller && this._controller.dispose(); this._controllerHost = null; } @@ -300,7 +302,11 @@ class GraphView extends ChartView { this._lineDraw.updateLayout(); } - remove(ecModel: GlobalModel, api: ExtensionAPI) { + remove() { + clearTimeout(this._layoutTimeout); + this._layouting = false; + this._layoutTimeout = null; + this._symbolDraw && this._symbolDraw.remove(); this._lineDraw && this._lineDraw.remove(); } diff --git a/src/chart/helper/createClipPathFromCoordSys.ts b/src/chart/helper/createClipPathFromCoordSys.ts index 7bc83d7def..74ec7f8e90 100644 --- a/src/chart/helper/createClipPathFromCoordSys.ts +++ b/src/chart/helper/createClipPathFromCoordSys.ts @@ -51,8 +51,12 @@ function createGridClipPath( height += lineWidth; // fix: /~https://github.com/apache/incubator-echarts/issues/11369 - x = Math.floor(x); - width = Math.round(width); + width = Math.ceil(width); + if (x !== Math.floor(x)) { + x = Math.floor(x); + // if no extra 1px on `width`, it will still be clipped since `x` is floored + width++; + } const clipPath = new graphic.Rect({ shape: { @@ -165,4 +169,4 @@ export { createGridClipPath, createPolarClipPath, createClipPath -}; \ No newline at end of file +}; diff --git a/src/chart/line/LineView.ts b/src/chart/line/LineView.ts index 435fa2a90c..9672eb720b 100644 --- a/src/chart/line/LineView.ts +++ b/src/chart/line/LineView.ts @@ -644,7 +644,7 @@ class LineView extends ChartView { const lineGroup = this._lineGroup; - const hasAnimation = !ecModel.ssr && seriesModel.isAnimationEnabled(); + const hasAnimation = !ecModel.ssr && seriesModel.get('animation'); const isAreaChart = !areaStyleModel.isEmpty(); diff --git a/src/chart/pie/PieSeries.ts b/src/chart/pie/PieSeries.ts index ed427bfff0..13e220dc58 100644 --- a/src/chart/pie/PieSeries.ts +++ b/src/chart/pie/PieSeries.ts @@ -112,6 +112,9 @@ export interface PieSeriesOption extends clockwise?: boolean startAngle?: number + endAngle?: number | 'auto' + padAngle?: number; + minAngle?: number minShowLabelAngle?: number @@ -217,6 +220,8 @@ class PieSeriesModel extends SeriesModel { // 默认顺时针 clockwise: true, startAngle: 90, + endAngle: 'auto', + padAngle: 0, // 最小角度改为0 minAngle: 0, diff --git a/src/chart/pie/pieLayout.ts b/src/chart/pie/pieLayout.ts index c5c52ccfcd..2acdcda394 100644 --- a/src/chart/pie/pieLayout.ts +++ b/src/chart/pie/pieLayout.ts @@ -24,6 +24,7 @@ import GlobalModel from '../../model/Global'; import ExtensionAPI from '../../core/ExtensionAPI'; import PieSeriesModel from './PieSeries'; import { SectorShape } from 'zrender/src/graphic/shape/Sector'; +import { normalizeArcAngles } from 'zrender/src/core/PathProxy'; const PI2 = Math.PI * 2; const RADIAN = Math.PI / 180; @@ -91,10 +92,16 @@ export default function pieLayout( const { cx, cy, r, r0 } = getBasicPieLayout(seriesModel, api); - const startAngle = -seriesModel.get('startAngle') * RADIAN; + let startAngle = -seriesModel.get('startAngle') * RADIAN; + let endAngle = seriesModel.get('endAngle'); + const padAngle = seriesModel.get('padAngle') * RADIAN; + + endAngle = endAngle === 'auto' ? startAngle - PI2 : -endAngle * RADIAN; const minAngle = seriesModel.get('minAngle') * RADIAN; + const minAndPadAngle = minAngle + padAngle; + let validDataCount = 0; data.each(valueDim, function (value: number) { !isNaN(value) && validDataCount++; @@ -113,12 +120,20 @@ export default function pieLayout( const extent = data.getDataExtent(valueDim); extent[0] = 0; + const dir = clockwise ? 1 : -1; + const angles = [startAngle, endAngle]; + const halfPadAngle = dir * padAngle / 2; + normalizeArcAngles(angles, !clockwise); + + [startAngle, endAngle] = angles; + + const angleRange = Math.abs(endAngle - startAngle); + // In the case some sector angle is smaller than minAngle - let restAngle = PI2; + let restAngle = angleRange; let valueSumLargerThanMinAngle = 0; let currentAngle = startAngle; - const dir = clockwise ? 1 : -1; data.setLayout({ viewRect, r }); @@ -146,22 +161,37 @@ export default function pieLayout( ? unitRadian : (value * unitRadian); } else { - angle = PI2 / validDataCount; + angle = angleRange / validDataCount; } - if (angle < minAngle) { - angle = minAngle; - restAngle -= minAngle; + + if (angle < minAndPadAngle) { + angle = minAndPadAngle; + restAngle -= minAndPadAngle; } else { valueSumLargerThanMinAngle += value; } const endAngle = currentAngle + dir * angle; + + // calculate display angle + let actualStartAngle = 0; + let actualEndAngle = 0; + + if (padAngle > angle) { + actualStartAngle = currentAngle + dir * angle / 2; + actualEndAngle = actualStartAngle; + } + else { + actualStartAngle = currentAngle + halfPadAngle; + actualEndAngle = endAngle - halfPadAngle; + } + data.setItemLayout(idx, { angle: angle, - startAngle: currentAngle, - endAngle: endAngle, + startAngle: actualStartAngle, + endAngle: actualEndAngle, clockwise: clockwise, cx: cx, cy: cy, @@ -174,19 +204,32 @@ export default function pieLayout( currentAngle = endAngle; }); - // Some sector is constrained by minAngle + // Some sector is constrained by minAngle and padAngle // Rest sectors needs recalculate angle if (restAngle < PI2 && validDataCount) { // Average the angle if rest angle is not enough after all angles is - // Constrained by minAngle + // Constrained by minAngle and padAngle if (restAngle <= 1e-3) { - const angle = PI2 / validDataCount; + const angle = angleRange / validDataCount; data.each(valueDim, function (value: number, idx: number) { if (!isNaN(value)) { const layout = data.getItemLayout(idx); layout.angle = angle; - layout.startAngle = startAngle + dir * idx * angle; - layout.endAngle = startAngle + dir * (idx + 1) * angle; + + let actualStartAngle = 0; + let actualEndAngle = 0; + + if (angle < padAngle) { + actualStartAngle = startAngle + dir * (idx + 1 / 2) * angle; + actualEndAngle = actualStartAngle; + } + else { + actualStartAngle = startAngle + dir * idx * angle + halfPadAngle; + actualEndAngle = startAngle + dir * (idx + 1) * angle - halfPadAngle; + } + + layout.startAngle = actualStartAngle; + layout.endAngle = actualEndAngle; } }); } @@ -196,10 +239,23 @@ export default function pieLayout( data.each(valueDim, function (value: number, idx: number) { if (!isNaN(value)) { const layout = data.getItemLayout(idx); - const angle = layout.angle === minAngle - ? minAngle : value * unitRadian; - layout.startAngle = currentAngle; - layout.endAngle = currentAngle + dir * angle; + const angle = layout.angle === minAndPadAngle + ? minAndPadAngle : value * unitRadian; + + let actualStartAngle = 0; + let actualEndAngle = 0; + + if (angle < padAngle) { + actualStartAngle = currentAngle + dir * angle / 2; + actualEndAngle = actualStartAngle; + } + else { + actualStartAngle = currentAngle + halfPadAngle; + actualEndAngle = currentAngle + dir * angle - halfPadAngle; + } + + layout.startAngle = actualStartAngle; + layout.endAngle = actualEndAngle; currentAngle += dir * angle; } }); diff --git a/src/chart/scatter/ScatterView.ts b/src/chart/scatter/ScatterView.ts index 849d96a9d2..972c36e4cb 100644 --- a/src/chart/scatter/ScatterView.ts +++ b/src/chart/scatter/ScatterView.ts @@ -99,9 +99,12 @@ class ScatterView extends ChartView { } _getClipShape(seriesModel: ScatterSeriesModel) { + if (!seriesModel.get('clip', true)) { + return; + } const coordSys = seriesModel.coordinateSystem; - const clipArea = coordSys && coordSys.getArea && coordSys.getArea(); - return seriesModel.get('clip', true) ? clipArea : null; + // PENDING make `0.1` configurable, for example, `clipTolerance`? + return coordSys && coordSys.getArea && coordSys.getArea(.1); } _updateSymbolDraw(data: SeriesData, seriesModel: ScatterSeriesModel) { @@ -131,4 +134,4 @@ class ScatterView extends ChartView { dispose() {} } -export default ScatterView; \ No newline at end of file +export default ScatterView; diff --git a/src/chart/sunburst/SunburstPiece.ts b/src/chart/sunburst/SunburstPiece.ts index b0d662796d..92114e11ee 100644 --- a/src/chart/sunburst/SunburstPiece.ts +++ b/src/chart/sunburst/SunburstPiece.ts @@ -20,7 +20,7 @@ import * as zrUtil from 'zrender/src/core/util'; import * as graphic from '../../util/graphic'; import { toggleHoverEmphasis, SPECIAL_STATES, DISPLAY_STATES } from '../../util/states'; -import {createTextStyle} from '../../label/labelStyle'; +import { createTextStyle } from '../../label/labelStyle'; import { TreeNode } from '../../data/Tree'; import SunburstSeriesModel, { SunburstSeriesNodeItemOption, SunburstSeriesOption } from './SunburstSeries'; import GlobalModel from '../../model/Global'; @@ -29,10 +29,11 @@ import { ColorString } from '../../util/types'; import Model from '../../model/Model'; import { getECData } from '../../util/innerStore'; import { getSectorCornerRadius } from '../helper/sectorHelper'; -import {createOrUpdatePatternFromDecal} from '../../util/decal'; +import { createOrUpdatePatternFromDecal } from '../../util/decal'; import ExtensionAPI from '../../core/ExtensionAPI'; import { saveOldStyle } from '../../animation/basicTransition'; import { normalizeRadian } from 'zrender/src/contain/util'; +import { isRadianAroundZero } from '../../util/number'; const DEFAULT_SECTOR_Z = 2; const DEFAULT_TEXT_Z = 4; @@ -152,8 +153,8 @@ class SunburstPiece extends graphic.Sector { const focusOrIndices = focus === 'ancestor' ? node.getAncestorsIndices() - : focus === 'descendant' ? node.getDescendantIndices() - : focus; + : focus === 'descendant' ? node.getDescendantIndices() + : focus; toggleHoverEmphasis(this, focusOrIndices, emphasisModel.get('blurScope'), emphasisModel.get('disabled')); } @@ -214,9 +215,20 @@ class SunburstPiece extends graphic.Sector { let r; const labelPadding = getLabelAttr(labelStateModel, 'distance') || 0; let textAlign = getLabelAttr(labelStateModel, 'align'); + const rotateType = getLabelAttr(labelStateModel, 'rotate'); + const flipStartAngle = Math.PI * 0.5; + const flipEndAngle = Math.PI * 1.5; + const midAngleNormal = normalizeRadian(rotateType === 'tangential' ? Math.PI / 2 - midAngle : midAngle); + + // For text that is up-side down, rotate 180 degrees to make sure + // it's readable + const needsFlip = midAngleNormal > flipStartAngle + && !isRadianAroundZero(midAngleNormal - flipStartAngle) + && midAngleNormal < flipEndAngle; + if (labelPosition === 'outside') { r = layout.r + labelPadding; - textAlign = midAngle > Math.PI / 2 ? 'right' : 'left'; + textAlign = needsFlip ? 'right' : 'left'; } else { if (!textAlign || textAlign === 'center') { @@ -231,15 +243,11 @@ class SunburstPiece extends graphic.Sector { } else if (textAlign === 'left') { r = layout.r0 + labelPadding; - if (midAngle > Math.PI / 2) { - textAlign = 'right'; - } + textAlign = needsFlip ? 'right' : 'left'; } else if (textAlign === 'right') { r = layout.r - labelPadding; - if (midAngle > Math.PI / 2) { - textAlign = 'left'; - } + textAlign = needsFlip ? 'left' : 'right'; } } @@ -249,22 +257,14 @@ class SunburstPiece extends graphic.Sector { state.x = r * dx + layout.cx; state.y = r * dy + layout.cy; - const rotateType = getLabelAttr(labelStateModel, 'rotate'); let rotate = 0; if (rotateType === 'radial') { - rotate = normalizeRadian(-midAngle); - if (((rotate > Math.PI / 2 && rotate < Math.PI * 1.5))) { - rotate += Math.PI; - } + rotate = normalizeRadian(-midAngle) + + (needsFlip ? Math.PI : 0); } else if (rotateType === 'tangential') { - rotate = Math.PI / 2 - midAngle; - if (rotate > Math.PI / 2) { - rotate -= Math.PI; - } - else if (rotate < -Math.PI / 2) { - rotate += Math.PI; - } + rotate = normalizeRadian(Math.PI / 2 - midAngle) + + (needsFlip ? Math.PI : 0); } else if (zrUtil.isNumber(rotateType)) { rotate = rotateType * Math.PI / 180; diff --git a/src/component/axis/AngleAxisView.ts b/src/component/axis/AngleAxisView.ts index 6ce8da8f2b..23f018a50a 100644 --- a/src/component/axis/AngleAxisView.ts +++ b/src/component/axis/AngleAxisView.ts @@ -138,18 +138,25 @@ const angelAxisElementsBuilders: Record= 0 - r: Math.max(ticksCoords[i].coord, 0) + r: Math.max(ticksCoords[i].coord, 0), + startAngle: -angleExtent[0] * RADIAN, + endAngle: -angleExtent[1] * RADIAN, + clockwise: angleAxis.inverse } })); } diff --git a/src/component/legend/LegendView.ts b/src/component/legend/LegendView.ts index 9af5ffb664..e1c3bf7101 100644 --- a/src/component/legend/LegendView.ts +++ b/src/component/legend/LegendView.ts @@ -50,6 +50,7 @@ import {LineStyleProps} from '../../model/mixin/lineStyle'; import {createSymbol, ECSymbol} from '../../util/symbol'; import SeriesModel from '../../model/Series'; import { createOrUpdatePatternFromDecal } from '../../util/decal'; +import { getECData } from '../../util/innerStore'; const curry = zrUtil.curry; const each = zrUtil.each; @@ -225,6 +226,13 @@ class LegendView extends ComponentView { .on('mouseover', curry(dispatchHighlightAction, seriesModel.name, null, api, excludeSeriesId)) .on('mouseout', curry(dispatchDownplayAction, seriesModel.name, null, api, excludeSeriesId)); + itemGroup.eachChild(child => { + const ecData = getECData(child); + ecData.seriesIndex = seriesModel.seriesIndex; + ecData.dataIndex = dataIndex; + ecData.ssrType = 'legend'; + }); + legendDrawnMap.set(name, true); } else { @@ -269,6 +277,13 @@ class LegendView extends ComponentView { .on('mouseover', curry(dispatchHighlightAction, null, name, api, excludeSeriesId)) .on('mouseout', curry(dispatchDownplayAction, null, name, api, excludeSeriesId)); + itemGroup.eachChild(child => { + const ecData = getECData(child); + ecData.seriesIndex = seriesModel.seriesIndex; + ecData.dataIndex = dataIndex; + ecData.ssrType = 'legend'; + }); + legendDrawnMap.set(name, true); } @@ -430,7 +445,10 @@ class LegendView extends ComponentView { // Add a invisible rect to increase the area of mouse hover const hitRect = new graphic.Rect({ shape: itemGroup.getBoundingRect(), - invisible: true + style: { + // Cannot use 'invisible' because SVG SSR will miss the node + fill: 'transparent' + } }); const tooltipModel = diff --git a/src/component/toolbox/ToolboxView.ts b/src/component/toolbox/ToolboxView.ts index e24be3cd96..071c009bd5 100644 --- a/src/component/toolbox/ToolboxView.ts +++ b/src/component/toolbox/ToolboxView.ts @@ -39,6 +39,7 @@ import { import { getUID } from '../../util/component'; import Displayable from 'zrender/src/graphic/Displayable'; import ZRText from 'zrender/src/graphic/Text'; +import { getFont } from '../../label/labelStyle'; type IconPath = ToolboxFeatureModel['iconPaths'][string]; @@ -217,13 +218,20 @@ class ToolboxView extends ComponentView { pathEmphasisState.style = iconStyleEmphasisModel.getItemStyle(); // Text position calculation + // TODO: extract `textStyle` from `iconStyle` and use `createTextStyle` const textContent = new ZRText({ style: { text: titlesMap[iconName], align: iconStyleEmphasisModel.get('textAlign'), borderRadius: iconStyleEmphasisModel.get('textBorderRadius'), padding: iconStyleEmphasisModel.get('textPadding'), - fill: null + fill: null, + font: getFont({ + fontStyle: iconStyleEmphasisModel.get('textFontStyle'), + fontFamily: iconStyleEmphasisModel.get('textFontFamily'), + fontSize: iconStyleEmphasisModel.get('textFontSize'), + fontWeight: iconStyleEmphasisModel.get('textFontWeight') + }, ecModel) }, ignore: true }); diff --git a/src/component/toolbox/featureManager.ts b/src/component/toolbox/featureManager.ts index 49553ebe59..5b16acf618 100644 --- a/src/component/toolbox/featureManager.ts +++ b/src/component/toolbox/featureManager.ts @@ -33,6 +33,10 @@ type IconStyle = ItemStyleOption & { textAlign?: LabelOption['align'] textBorderRadius?: LabelOption['borderRadius'] textPadding?: LabelOption['padding'] + textFontFamily?: LabelOption['fontFamily'] + textFontSize?: LabelOption['fontSize'] + textFontWeight?: LabelOption['fontWeight'] + textFontStyle?: LabelOption['fontStyle'] }; export interface ToolboxFeatureOption { diff --git a/src/component/tooltip/TooltipHTMLContent.ts b/src/component/tooltip/TooltipHTMLContent.ts index b326acd091..7e08b53f98 100644 --- a/src/component/tooltip/TooltipHTMLContent.ts +++ b/src/component/tooltip/TooltipHTMLContent.ts @@ -17,7 +17,7 @@ * under the License. */ -import { isString, indexOf, each, bind, isArray, isDom } from 'zrender/src/core/util'; +import { isString, indexOf, each, bind, isFunction, isArray, isDom } from 'zrender/src/core/util'; import { normalizeEvent } from 'zrender/src/core/event'; import { transformLocalCoord } from 'zrender/src/core/dom'; import env from 'zrender/src/core/env'; @@ -212,14 +212,20 @@ function assembleCssText(tooltipModel: Model, enableTransition?: } // If not able to make, do not modify the input `out`. -function makeStyleCoord(out: number[], zr: ZRenderType, appendToBody: boolean, zrX: number, zrY: number) { +function makeStyleCoord( + out: number[], + zr: ZRenderType, + container: HTMLElement | null | undefined, + zrX: number, + zrY: number +) { const zrPainter = zr && zr.painter; - if (appendToBody) { + if (container) { const zrViewportRoot = zrPainter && zrPainter.getViewportRoot(); if (zrViewportRoot) { // Some APPs might use scale on body, so we support CSS transform here. - transformLocalCoord(out, zrViewportRoot, document.body, zrX, zrY); + transformLocalCoord(out, zrViewportRoot, container, zrX, zrY); } } else { @@ -241,23 +247,22 @@ function makeStyleCoord(out: number[], zr: ZRenderType, appendToBody: boolean, z interface TooltipContentOption { /** - * `false`: the DOM element will be inside the container. Default value. - * `true`: the DOM element will be appended to HTML body, which avoid - * some overflow clip but intrude outside of the container. + * Specify target container of the tooltip element. + * Can either be an HTMLElement, CSS selector string, or a function that returns an HTMLElement. */ - appendToBody: boolean + appendTo: ((chartContainer: HTMLElement) => HTMLElement | undefined | null) | HTMLElement | string } class TooltipHTMLContent { el: HTMLDivElement; - private _container: HTMLElement; + private _api: ExtensionAPI; + private _container: HTMLElement | undefined | null; private _show: boolean = false; private _styleCoord: [number, number, number, number] = [0, 0, 0, 0]; - private _appendToBody: boolean; private _enterable = true; private _zr: ZRenderType; @@ -278,7 +283,6 @@ class TooltipHTMLContent { private _longHideTimeout: number; constructor( - container: HTMLElement, api: ExtensionAPI, opt: TooltipContentOption ) { @@ -291,17 +295,21 @@ class TooltipHTMLContent { (el as any).domBelongToZr = true; this.el = el; const zr = this._zr = api.getZr(); - const appendToBody = this._appendToBody = opt && opt.appendToBody; - makeStyleCoord(this._styleCoord, zr, appendToBody, api.getWidth() / 2, api.getHeight() / 2); + const appendTo = opt.appendTo; + const container: HTMLElement | null | undefined = appendTo && ( + isString(appendTo) + ? document.querySelector(appendTo) + : isDom(appendTo) + ? appendTo + : isFunction(appendTo) && appendTo(api.getDom()) + ); - if (appendToBody) { - document.body.appendChild(el); - } - else { - container.appendChild(el); - } + makeStyleCoord(this._styleCoord, zr, container, api.getWidth() / 2, api.getHeight() / 2); + (container || api.getDom()).appendChild(el); + + this._api = api; this._container = container; // FIXME @@ -350,11 +358,13 @@ class TooltipHTMLContent { update(tooltipModel: Model) { // FIXME // Move this logic to ec main? - const container = this._container; - const position = getComputedStyle(container, 'position'); - const domStyle = container.style; - if (domStyle.position !== 'absolute' && position !== 'absolute') { - domStyle.position = 'relative'; + if (!this._container) { + const container = this._api.getDom(); + const position = getComputedStyle(container, 'position'); + const domStyle = container.style; + if (domStyle.position !== 'absolute' && position !== 'absolute') { + domStyle.position = 'relative'; + } } // move tooltip if chart resized @@ -456,7 +466,7 @@ class TooltipHTMLContent { moveTo(zrX: number, zrY: number) { const styleCoord = this._styleCoord; - makeStyleCoord(styleCoord, this._zr, this._appendToBody, zrX, zrY); + makeStyleCoord(styleCoord, this._zr, this._container, zrX, zrY); if (styleCoord[0] != null && styleCoord[1] != null) { const style = this.el.style; @@ -510,7 +520,12 @@ class TooltipHTMLContent { } dispose() { - this.el.parentNode.removeChild(this.el); + clearTimeout(this._hideTimeout); + clearTimeout(this._longHideTimeout); + + const parentNode = this.el.parentNode; + parentNode && parentNode.removeChild(this.el); + this.el = this._container = null; } } diff --git a/src/component/tooltip/TooltipModel.ts b/src/component/tooltip/TooltipModel.ts index 413b52fb49..351cc0549b 100644 --- a/src/component/tooltip/TooltipModel.ts +++ b/src/component/tooltip/TooltipModel.ts @@ -61,13 +61,19 @@ export interface TooltipOption extends CommonTooltipOption HTMLElement | undefined | null) | string | HTMLElement + + /** + * Specify the class name of tooltip element * Only available when renderMode is html */ className?: string diff --git a/src/component/tooltip/TooltipView.ts b/src/component/tooltip/TooltipView.ts index 82a222cb1d..461db0174c 100644 --- a/src/component/tooltip/TooltipView.ts +++ b/src/component/tooltip/TooltipView.ts @@ -171,8 +171,8 @@ class TooltipView extends ComponentView { this._tooltipContent = renderMode === 'richText' ? new TooltipRichContent(api) - : new TooltipHTMLContent(api.getDom(), api, { - appendToBody: tooltipModel.get('appendToBody', true) + : new TooltipHTMLContent(api, { + appendTo: tooltipModel.get('appendToBody', true) ? 'body' : tooltipModel.get('appendTo', true) }); } @@ -573,7 +573,7 @@ class TooltipView extends ComponentView { // Pre-create marker style for makers. Users can assemble richText // text in `formatter` callback and use those markers style. cbParams.marker = markupStyleCreator.makeTooltipMarker( - 'item', convertToColorString(cbParams.color), renderMode + 'item', convertToColorString(cbParams.color), renderMode, cbParams.opacity ); const seriesTooltipResult = normalizeTooltipFormatResult( diff --git a/src/component/tooltip/seriesFormatTooltip.ts b/src/component/tooltip/seriesFormatTooltip.ts index 6e5f7be099..cdc3b79795 100644 --- a/src/component/tooltip/seriesFormatTooltip.ts +++ b/src/component/tooltip/seriesFormatTooltip.ts @@ -24,7 +24,8 @@ import { retrieveVisualColorForTooltipMarker, TooltipMarkupBlockFragment, createTooltipMarkup, - TooltipMarkupSection + TooltipMarkupSection, + retrieveVisualOpacityForTooltipMarker } from './tooltipMarkup'; import { retrieveRawValue } from '../../data/helper/dataProvider'; import { isNameSpecified } from '../../util/model'; @@ -47,6 +48,7 @@ export function defaultSeriesFormatTooltip(opt: { const value = series.getRawValue(dataIndex) as any; const isValueArr = isArray(value); const markerColor = retrieveVisualColorForTooltipMarker(series, dataIndex); + const markerOpacity = retrieveVisualOpacityForTooltipMarker(series, dataIndex); // Complicated rule for pretty tooltip. let inlineValue; @@ -86,6 +88,7 @@ export function defaultSeriesFormatTooltip(opt: { createTooltipMarkup('nameValue', { markerType: 'item', markerColor: markerColor, + opacity: markerOpacity, // Do not mix display seriesName and itemName in one tooltip, // which might confuses users. name: inlineName, @@ -93,7 +96,8 @@ export function defaultSeriesFormatTooltip(opt: { // be not readable. So we check trim here. noName: !trim(inlineName), value: inlineValue, - valueType: inlineValueType + valueType: inlineValueType, + dataIndex }) ].concat(subBlocks || [] as any) }); diff --git a/src/component/tooltip/tooltipMarkup.ts b/src/component/tooltip/tooltipMarkup.ts index c8296b7e62..a277dad278 100644 --- a/src/component/tooltip/tooltipMarkup.ts +++ b/src/component/tooltip/tooltipMarkup.ts @@ -149,6 +149,7 @@ export interface TooltipMarkupNameValueBlock extends TooltipMarkupBlock { // If `!markerType`, tooltip marker is not used. markerType?: TooltipMarkerType; markerColor?: ColorString; + opacity?: number; name?: string; // Also support value is `[121, 555, 94.2]`. value?: unknown | unknown[]; @@ -162,6 +163,7 @@ export interface TooltipMarkupNameValueBlock extends TooltipMarkupBlock { // null/undefined/NaN/''... (displayed as '-'). noName?: boolean; noValue?: boolean; + dataIndex?: number; valueFormatter?: CommonTooltipOption['valueFormatter'] } @@ -324,13 +326,16 @@ function buildNameValue( : ctx.markupStyleCreator.makeTooltipMarker( fragment.markerType, fragment.markerColor || '#333', - renderMode + renderMode, + fragment.opacity ); const readableName = noName ? '' : makeValueReadable(name, 'ordinal', useUTC); const valueTypeOption = fragment.valueType; - const readableValueList = noValue ? [] : valueFormatter(fragment.value as OptionDataValue); + const readableValueList = noValue + ? [] + : valueFormatter(fragment.value as OptionDataValue, fragment.dataIndex); const valueAlignRight = !noMarker || !noName; // It little weird if only value next to marker but far from marker. const valueCloseToMarker = !noMarker && noName; @@ -473,6 +478,16 @@ export function retrieveVisualColorForTooltipMarker( return convertToColorString(color); } +export function retrieveVisualOpacityForTooltipMarker( + series: SeriesModel, + dataIndex: number +): number { + const style = series.getData().getItemVisual(dataIndex, 'style'); + const opacity = style.opacity; + return opacity; +} + + export function getPaddingFromTooltipModel( model: Model, renderMode: TooltipRenderMode @@ -506,7 +521,8 @@ export class TooltipMarkupStyleCreator { makeTooltipMarker( markerType: TooltipMarkerType, colorStr: ColorString, - renderMode: TooltipRenderMode + renderMode: TooltipRenderMode, + opacity?: number ): string { const markerId = renderMode === 'richText' ? this._generateStyleName() @@ -515,7 +531,8 @@ export class TooltipMarkupStyleCreator { color: colorStr, type: markerType, renderMode, - markerId: markerId + markerId: markerId, + opacity: opacity }); if (isString(marker)) { return marker; diff --git a/src/component/visualMap/ContinuousView.ts b/src/component/visualMap/ContinuousView.ts index 2b2248ef28..d4aa842a8a 100644 --- a/src/component/visualMap/ContinuousView.ts +++ b/src/component/visualMap/ContinuousView.ts @@ -108,8 +108,12 @@ class ContinuousView extends VisualMapView { private _firstShowIndicator: boolean; - private _api: ExtensionAPI; + init(ecModel: GlobalModel, api: ExtensionAPI) { + super.init(ecModel, api); + this._hoverLinkFromSeriesMouseOver = zrUtil.bind(this._hoverLinkFromSeriesMouseOver, this); + this._hideIndicator = zrUtil.bind(this._hideIndicator, this); + } doRender( visualMapModel: ContinuousModel, @@ -117,8 +121,6 @@ class ContinuousView extends VisualMapView { api: ExtensionAPI, payload: {type: string, from: string} ) { - this._api = api; - if (!payload || payload.type !== 'selectDataRange' || payload.from !== this.uid) { this._buildView(); } @@ -711,7 +713,7 @@ class ContinuousView extends VisualMapView { for (let i = 0; i < handleLabels.length; i++) { // Fade out handle labels. // NOTE: Must use api enter/leave on emphasis/blur/select state. Or the global states manager will change it. - this._api.enterBlur(handleLabels[i]); + this.api.enterBlur(handleLabels[i]); } } } @@ -856,7 +858,7 @@ class ContinuousView extends VisualMapView { for (let i = 0; i < handleLabels.length; i++) { // Fade out handle labels. // NOTE: Must use api enter/leave on emphasis/blur/select state. Or the global states manager will change it. - this._api.leaveBlur(handleLabels[i]); + this.api.leaveBlur(handleLabels[i]); } } } @@ -874,6 +876,7 @@ class ContinuousView extends VisualMapView { this._hideIndicator(); const zr = this.api.getZr(); + zr.off('mouseover', this._hoverLinkFromSeriesMouseOver); zr.off('mouseout', this._hideIndicator); } @@ -892,7 +895,7 @@ class ContinuousView extends VisualMapView { : graphic.transformDirection(vertex, transform, inverse); } - // TODO: TYPE more specified payload types. + // TODO: TYPE more specified payload types. private _dispatchHighDown(type: 'highlight' | 'downplay', batch: Payload['batch']) { batch && batch.length && this.api.dispatchAction({ type: type, @@ -908,14 +911,6 @@ class ContinuousView extends VisualMapView { this._clearHoverLinkToSeries(); } - /** - * @override - */ - remove() { - this._clearHoverLinkFromSeries(); - this._clearHoverLinkToSeries(); - } - } function createPolygon( diff --git a/src/coord/CoordinateSystem.ts b/src/coord/CoordinateSystem.ts index f89235b77b..8c778ab837 100644 --- a/src/coord/CoordinateSystem.ts +++ b/src/coord/CoordinateSystem.ts @@ -149,7 +149,7 @@ export interface CoordinateSystem { getRoamTransform?: () => MatrixArray; - getArea?: () => CoordinateSystemClipArea + getArea?: (tolerance?: number) => CoordinateSystemClipArea // Only `coord/View.js` implements `getBoundingRect`. // But if other coord sys implement it, should follow this signature. diff --git a/src/coord/axisCommonTypes.ts b/src/coord/axisCommonTypes.ts index bb4d1b7bf1..fbfaf9cf43 100644 --- a/src/coord/axisCommonTypes.ts +++ b/src/coord/axisCommonTypes.ts @@ -17,6 +17,7 @@ * under the License. */ +import { TextAlign, TextVerticalAlign } from 'zrender/src/core/types'; import { TextCommonOption, LineStyleOption, OrdinalRawValue, ZRColor, AreaStyleOption, ComponentOption, ColorString, @@ -150,7 +151,7 @@ export interface ValueAxisBaseOption extends NumericAxisBaseOptionCommon { /** * Optional value can be: * + `false`: always include value 0. - * + `false`: always include value 0. + * + `true`: the axis may not contain zero position. */ scale?: boolean; } @@ -223,6 +224,14 @@ interface AxisLabelBaseOption extends Omit { showMinLabel?: boolean, // true | false | null/undefined (auto) showMaxLabel?: boolean, + // 'left' | 'center' | 'right' | null/undefined (auto) + alignMinLabel?: TextAlign, + // 'left' | 'center' | 'right' | null/undefined (auto) + alignMaxLabel?: TextAlign, + // 'top' | 'middle' | 'bottom' | null/undefined (auto) + verticalAlignMinLabel?: TextVerticalAlign, + // 'top' | 'middle' | 'bottom' | null/undefined (auto) + verticalAlignMaxLabel?: TextVerticalAlign, margin?: number, rich?: Dictionary /** diff --git a/src/coord/cartesian/Cartesian2D.ts b/src/coord/cartesian/Cartesian2D.ts index b0ce785552..4072684d14 100644 --- a/src/coord/cartesian/Cartesian2D.ts +++ b/src/coord/cartesian/Cartesian2D.ts @@ -178,13 +178,15 @@ class Cartesian2D extends Cartesian implements CoordinateSystem { * Get rect area of cartesian. * Area will have a contain function to determine if a point is in the coordinate system. */ - getArea(): Cartesian2DArea { + getArea(tolerance?: number): Cartesian2DArea { + tolerance = tolerance || 0; + const xExtent = this.getAxis('x').getGlobalExtent(); const yExtent = this.getAxis('y').getGlobalExtent(); - const x = Math.min(xExtent[0], xExtent[1]); - const y = Math.min(yExtent[0], yExtent[1]); - const width = Math.max(xExtent[0], xExtent[1]) - x; - const height = Math.max(yExtent[0], yExtent[1]) - y; + const x = Math.min(xExtent[0], xExtent[1]) - tolerance; + const y = Math.min(yExtent[0], yExtent[1]) - tolerance; + const width = Math.max(xExtent[0], xExtent[1]) - x + tolerance; + const height = Math.max(yExtent[0], yExtent[1]) - y + tolerance; return new BoundingRect(x, y, width, height); } diff --git a/src/coord/polar/AxisModel.ts b/src/coord/polar/AxisModel.ts index af2414a673..40adf4adf3 100644 --- a/src/coord/polar/AxisModel.ts +++ b/src/coord/polar/AxisModel.ts @@ -39,6 +39,7 @@ export type AngleAxisOption = AxisBaseOption & { polarId?: string; startAngle?: number; + endAngle?: number; clockwise?: boolean; axisLabel?: AxisBaseOption['axisLabel'] diff --git a/src/coord/polar/polarCreator.ts b/src/coord/polar/polarCreator.ts index 4df310c1d4..fe29f3ed18 100644 --- a/src/coord/polar/polarCreator.ts +++ b/src/coord/polar/polarCreator.ts @@ -124,7 +124,8 @@ function setAxis(axis: RadiusAxis | AngleAxis, axisModel: PolarAxisModel) { if (isAngleAxisModel(axisModel)) { axis.inverse = axis.inverse !== axisModel.get('clockwise'); const startAngle = axisModel.get('startAngle'); - axis.setExtent(startAngle, startAngle + (axis.inverse ? -360 : 360)); + const endAngle = axisModel.get('endAngle') ?? (startAngle + (axis.inverse ? -360 : 360)); + axis.setExtent(startAngle, endAngle); } // Inject axis instance diff --git a/src/core/echarts.ts b/src/core/echarts.ts index d6ad498852..69978fd34b 100644 --- a/src/core/echarts.ts +++ b/src/core/echarts.ts @@ -318,7 +318,7 @@ type ECEventDefinition = { // TODO: Use ECActionEvent [key: string]: (...args: unknown[]) => void | boolean }; -type EChartsInitOpts = { +export type EChartsInitOpts = { locale?: string | LocaleOption, renderer?: RendererType, devicePixelRatio?: number, @@ -412,22 +412,34 @@ class ECharts extends Eventful { let defaultRenderer = 'canvas'; let defaultCoarsePointer: 'auto' | boolean = 'auto'; let defaultUseDirtyRect = false; + if (__DEV__) { const root = ( /* eslint-disable-next-line */ env.hasGlobalWindow ? window : global ) as any; - defaultRenderer = root.__ECHARTS__DEFAULT__RENDERER__ || defaultRenderer; - - defaultCoarsePointer = retrieve2(root.__ECHARTS__DEFAULT__COARSE_POINTER, defaultCoarsePointer); + if (root) { + defaultRenderer = retrieve2(root.__ECHARTS__DEFAULT__RENDERER__, defaultRenderer); + defaultCoarsePointer = retrieve2(root.__ECHARTS__DEFAULT__COARSE_POINTER, defaultCoarsePointer); + defaultUseDirtyRect = retrieve2(root.__ECHARTS__DEFAULT__USE_DIRTY_RECT__, defaultUseDirtyRect); + } - const devUseDirtyRect = root.__ECHARTS__DEFAULT__USE_DIRTY_RECT__; - defaultUseDirtyRect = devUseDirtyRect == null - ? defaultUseDirtyRect - : devUseDirtyRect; } + zrender.registerSSRDataGetter(el => { + const ecData = getECData(el); + const dataIndex = ecData.dataIndex; + if (dataIndex == null) { + return; + } + const hashMap = createHashMap(); + hashMap.set('series_index', ecData.seriesIndex); + hashMap.set('data_index', dataIndex); + ecData.ssrType && hashMap.set('ssr_type', ecData.ssrType); + return hashMap; + }); + const zr = this._zr = zrender.init(dom, { renderer: opts.renderer || defaultRenderer, devicePixelRatio: opts.devicePixelRatio, @@ -2087,12 +2099,12 @@ class ECharts extends Eventful { }; const componentZLevels: ZLevelItem[] = []; const seriesZLevels: ZLevelItem[] = []; - let hasSeperateZLevel = false; + let hasSeparateZLevel = false; ecModel.eachComponent(function (componentType, componentModel) { const zlevel = componentModel.get('zlevel') || 0; const z = componentModel.get('z') || 0; const zlevelKey = componentModel.getZLevelKey(); - hasSeperateZLevel = hasSeperateZLevel || !!zlevelKey; + hasSeparateZLevel = hasSeparateZLevel || !!zlevelKey; (componentType === 'series' ? seriesZLevels : componentZLevels).push({ zlevel, z, @@ -2102,7 +2114,7 @@ class ECharts extends Eventful { }); }); - if (hasSeperateZLevel) { + if (hasSeparateZLevel) { // Series after component const zLevels: ZLevelItem[] = componentZLevels.concat(seriesZLevels); let lastSeriesZLevel: number; diff --git a/src/core/locale.ts b/src/core/locale.ts index 6ce1f1bad7..a40fcc4cd4 100644 --- a/src/core/locale.ts +++ b/src/core/locale.ts @@ -37,7 +37,7 @@ const localeModels: Dictionary = {}; export const SYSTEM_LANG = !env.domSupported ? DEFAULT_LOCALE : (function () { const langStr = ( /* eslint-disable-next-line */ - document.documentElement.lang || navigator.language || (navigator as any).browserLanguage + document.documentElement.lang || navigator.language || (navigator as any).browserLanguage || DEFAULT_LOCALE ).toUpperCase(); return langStr.indexOf(LOCALE_ZH) > -1 ? LOCALE_ZH : DEFAULT_LOCALE; })(); diff --git a/src/data/Source.ts b/src/data/Source.ts index 95a341041f..adbeeaf551 100644 --- a/src/data/Source.ts +++ b/src/data/Source.ts @@ -271,7 +271,7 @@ export function detectSourceFormat(data: DatasetOption['source']): SourceFormat if (item == null) { continue; } - else if (isArray(item)) { + else if (isArray(item) || isTypedArray(item)) { sourceFormat = SOURCE_FORMAT_ARRAY_ROWS; break; } diff --git a/src/data/helper/sourceHelper.ts b/src/data/helper/sourceHelper.ts index f0277d3a1d..d1aa89d5ef 100644 --- a/src/data/helper/sourceHelper.ts +++ b/src/data/helper/sourceHelper.ts @@ -314,7 +314,7 @@ export function querySeriesUpstreamDatasetModel( export function queryDatasetUpstreamDatasetModels( datasetModel: DatasetModel ): DatasetModel[] { - // Only these attributes declared, we by defualt reference to `datasetIndex: 0`. + // Only these attributes declared, we by default reference to `datasetIndex: 0`. // Otherwise, no reference. if (!datasetModel.get('transform', true) && !datasetModel.get('fromTransformResult', true) diff --git a/src/export/core.ts b/src/export/core.ts index c47986981c..4e3b1c673c 100644 --- a/src/export/core.ts +++ b/src/export/core.ts @@ -25,16 +25,23 @@ import { use } from '../extension'; // Import label layout by default. // TODO will be treeshaked. -import {installLabelLayout} from '../label/installLabelLayout'; +import { installLabelLayout } from '../label/installLabelLayout'; use(installLabelLayout); // Export necessary types -export {ZRColor as Color, Payload, ECElementEvent} from '../util/types'; -export {LinearGradientObject} from 'zrender/src/graphic/LinearGradient'; -export {RadialGradientObject} from 'zrender/src/graphic/RadialGradient'; -export {PatternObject, ImagePatternObject, SVGPatternObject} from 'zrender/src/graphic/Pattern'; -export {ElementEvent} from 'zrender/src/Element'; +export { + ZRColor as Color, + Payload, + ECElementEvent, + HighlightPayload, + DownplayPayload, + SelectChangedPayload +} from '../util/types'; +export { LinearGradientObject } from 'zrender/src/graphic/LinearGradient'; +export { RadialGradientObject } from 'zrender/src/graphic/RadialGradient'; +export { PatternObject, ImagePatternObject, SVGPatternObject } from 'zrender/src/graphic/Pattern'; +export { ElementEvent } from 'zrender/src/Element'; // ComposeOption import type { ComponentOption, ECBasicOption as EChartsCoreOption } from '../util/types'; @@ -45,9 +52,9 @@ import type { AngleAxisOption, RadiusAxisOption } from '../coord/polar/AxisModel import type { ParallelAxisOption } from '../coord/parallel/AxisModel'; -export {EChartsType as ECharts} from '../core/echarts'; +export { EChartsType as ECharts } from '../core/echarts'; -export {EChartsCoreOption}; +export { EChartsCoreOption }; // type SeriesSubComponentsTypes = 'markPoint' | 'markLine' | 'markArea' | 'tooltip'; // type InjectSeriesSubComponents = @@ -92,16 +99,16 @@ type ComposeUnitOption = Omit & { [key in GetMainType]?: Arrayable< ExtractComponentOption - // TODO: It will make error log too complex. - // So this more strict type checking will not be used currently to make sure the error msg is friendly. - // - // Inject markPoint, markLine, markArea, tooltip in series. - // ExtractComponentOption< - // InjectSeriesSubComponents< - // OptionUnion, GetSeriesInjectedSubOption, OptionUnion> - // >, - // key - // > + // TODO: It will make error log too complex. + // So this more strict type checking will not be used currently to make sure the error msg is friendly. + // + // Inject markPoint, markLine, markArea, tooltip in series. + // ExtractComponentOption< + // InjectSeriesSubComponents< + // OptionUnion, GetSeriesInjectedSubOption, OptionUnion> + // >, + // key + // > > } & GetDependencies>; diff --git a/src/i18n/langAR.ts b/src/i18n/langAR.ts new file mode 100644 index 0000000000..ea65233f99 --- /dev/null +++ b/src/i18n/langAR.ts @@ -0,0 +1,147 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/** + * Language: Arabic. + */ + +export default { + + time: { + month: [ + 'يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', + 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر' + ], + monthAbbr: [ + 'يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', + 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر' + ], + dayOfWeek: [ + 'الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت' + ], + dayOfWeekAbbr: [ + 'الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت' + ] + }, + legend: { + selector: { + all: 'تحديد الكل', + inverse: 'عكس التحديد' + } + }, + toolbox: { + brush: { + title: { + rect: 'تحديد صندوقي', + polygon: 'تحديد حلقي', + lineX: 'تحديد أفقي', + lineY: 'تحديد عمودي', + keep: 'الاحتفاظ بالمحدد', + clear: 'إلغاء التحديد' + } + }, + dataView: { + title: 'عرض البيانات', + lang: ['عرض البيانات', 'إغلاق', 'تحديث'] + }, + dataZoom: { + title: { + zoom: 'تكبير', + back: 'استعادة التكبير' + } + }, + magicType: { + title: { + line: 'خطوط', + bar: 'أشرطة', + stack: 'تكديس', + tiled: 'مربعات' + } + }, + restore: { + title: 'استعادة' + }, + saveAsImage: { + title: 'حفظ كملف صورة', + lang: ['للحفظ كصورة انقر بالزر الأيمن'] + } + }, + series: { + typeNames: { + pie: 'رسم بياني دائري', + bar: 'رسم بياني شريطي', + line: 'رسم بياني خطي', + scatter: 'نقاط مبعثرة', + effectScatter: 'نقاط مبعثرة متموجة', + radar: 'رسم بياني راداري', + tree: 'شجرة', + treemap: 'مخطط شجري', + boxplot: 'مخطط صندوقي', + candlestick: 'مخطط شمعدان', + k: 'رسم بياني خطي من النوع K', + heatmap: 'خريطة حرارية', + map: 'خريطة', + parallel: 'خريطة الإحداثيات المتناظرة', + lines: 'خطوط', + graph: 'مخطط علائقي', + sankey: 'مخطط ثعباني', + funnel: 'مخطط هرمي', + gauge: 'مقياس', + pictorialBar: 'مخطط مصوّر', + themeRiver: 'نمط خريطة النهر', + sunburst: 'مخطط شمسي', + custom: 'مخطط مخصص', + chart: 'مخطط' + } + }, + aria: { + general: { + withTitle: 'هذا رسم بياني حول "{title}".', + withoutTitle: 'هذا رسم بياني.' + }, + series: { + single: { + prefix: '', + withName: ' من النوع {seriesType} اسمه {seriesName}.', + withoutName: ' من النوع {seriesType}.' + }, + multiple: { + prefix: '. يتكون من {seriesCount} سلسلة.', + withName: ' الـ {seriesId} هي سلسلة من النوع {seriesType} تستعرض {seriesName}.', + withoutName: ' الـ {seriesId} هي سلسلة من النوع {seriesType}.', + separator: { + middle: '، ', + end: '. ' + } + } + }, + data: { + allData: 'البيانات هي كالتالي: ', + partialData: 'أول {displayCnt} عناصر هي: ', + withName: 'قيمة العنصر {name} هي {value}', + withoutName: '{value}', + separator: { + middle: '، ', + end: '. ' + } + } + } + + +}; diff --git a/src/i18n/langCS.ts b/src/i18n/langCS.ts index f5e4d812db..12f07b62de 100644 --- a/src/i18n/langCS.ts +++ b/src/i18n/langCS.ts @@ -104,7 +104,9 @@ gauge: 'Indikátor', pictorialBar: 'Obrázkový sloupcový graf', themeRiver: 'Theme River Map', - sunburst: 'Vícevrstvý prstencový graf' + sunburst: 'Vícevrstvý prstencový graf', + custom: 'Graficu persunalizatu', + chart: 'Graf' } }, aria: { diff --git a/src/i18n/langDE.ts b/src/i18n/langDE.ts index 8bd9f2cc8e..1c25d73620 100644 --- a/src/i18n/langDE.ts +++ b/src/i18n/langDE.ts @@ -104,7 +104,9 @@ export default { gauge: 'Meßanzeige', pictorialBar: 'Bildlicher Balken', themeRiver: 'Thematische Flusskarte', - sunburst: 'Sonnenausbruch' + sunburst: 'Sonnenausbruch', + custom: 'Graficu persunalizatu', + chart: 'Diagramm' } }, aria: { diff --git a/src/i18n/langEN.ts b/src/i18n/langEN.ts index 266280cf6c..0b7f304320 100644 --- a/src/i18n/langEN.ts +++ b/src/i18n/langEN.ts @@ -104,7 +104,9 @@ export default { gauge: 'Gauge', pictorialBar: 'Pictorial bar', themeRiver: 'Theme River Map', - sunburst: 'Sunburst' + sunburst: 'Sunburst', + custom: 'Custom chart', + chart: 'Chart' } }, aria: { diff --git a/src/i18n/langES.ts b/src/i18n/langES.ts index d6b9c2d8fe..4e7d96ef46 100644 --- a/src/i18n/langES.ts +++ b/src/i18n/langES.ts @@ -76,5 +76,65 @@ export default { title: 'Guardar como imagen', lang: ['Clic derecho para guardar imagen'] } + }, + series: { + typeNames: { + pie: 'Gráfico circular', + bar: 'Gráfico de barras', + line: 'Gráfico de líneas', + scatter: 'Diagrama de dispersión', + effectScatter: 'Diagrama de dispersión de ondas', + radar: 'Gráfico de radar', + tree: 'Árbol', + treemap: 'Mapa de árbol', + boxplot: 'Diagrama de caja', + candlestick: 'Gráfico de velas', + k: 'Gráfico de líneas K', + heatmap: 'Mapa de calor', + map: 'Mapa', + parallel: 'Mapa de coordenadas paralelas', + lines: 'Gráfico de líneas', + graph: 'Gráfico de relaciones', + sankey: 'Diagrama de Sankey', + funnel: 'Gráfico de embudo', + gauge: 'Medidor', + pictorialBar: 'Gráfico de barras pictóricas', + themeRiver: 'Mapa de río temático', + sunburst: 'Sunburst', + custom: 'Gráfico personalizado', + chart: 'Gráfico' + } + }, + aria: { + general: { + withTitle: 'Este es un gráfico sobre “{title}”', + withoutTitle: 'Este es un gráfico' + }, + series: { + single: { + prefix: '', + withName: ' con tipo {seriesType} llamado {seriesName}.', + withoutName: ' con tipo {seriesType}.' + }, + multiple: { + prefix: '. Consta de {seriesCount} series.', + withName: ' La serie {seriesId} es un {seriesType} que representa {seriesName}.', + withoutName: ' La serie {seriesId} es un {seriesType}.', + separator: { + middle: '', + end: '' + } + } + }, + data: { + allData: 'Los datos son los siguientes: ', + partialData: 'Los primeros {displayCnt} elementos son: ', + withName: 'los datos para {name} son {value}', + withoutName: '{value}', + separator: { + middle: ', ', + end: '. ' + } + } } }; diff --git a/src/i18n/langFI.ts b/src/i18n/langFI.ts index edbc852a48..b7cb1da456 100644 --- a/src/i18n/langFI.ts +++ b/src/i18n/langFI.ts @@ -76,5 +76,65 @@ export default { title: 'Tallenna kuvana', lang: ['Paina oikeaa hiirennappia tallentaaksesi kuva'] } + }, + series: { + typeNames: { + pie: 'Ympyrädiagrammi', + bar: 'Pylväsdiagrammi', + line: 'Viivakaavio', + scatter: 'Pisteplot', + effectScatter: 'Ripple-pisteplot', + radar: 'Sädekaavio', + tree: 'Puu', + treemap: 'Tilastoaluekartta', + boxplot: 'Viivadiagrammi', + candlestick: 'Kynttiläkaavio', + k: 'K-linjakaavio', + heatmap: 'Lämpökartta', + map: 'Kartta', + parallel: 'Rinnakkaiskoordinaattikartta', + lines: 'Viivakuvaaja', + graph: 'Suhdekuvaaja', + sankey: 'Sankey-kaavio', + funnel: 'Suppilokaavio', + gauge: 'Mittari', + pictorialBar: 'Kuvallinen pylväs', + themeRiver: 'Teemajokikartta', + sunburst: 'Auringonkehä', + custom: 'Mukautettu kaavio', + chart: 'Kaavio' + } + }, + aria: { + general: { + withTitle: 'Tämä on kaavio “{title}”', + withoutTitle: 'Tämä on kaavio' + }, + series: { + single: { + prefix: '', + withName: ' tyyppiä {seriesType} nimeltään {seriesName}.', + withoutName: ' tyyppiä {seriesType}.' + }, + multiple: { + prefix: '. Se koostuu {seriesCount} sarjasta.', + withName: ' Sarja {seriesId} on {seriesType}, joka edustaa {seriesName}.', + withoutName: ' Sarja {seriesId} on {seriesType}.', + separator: { + middle: '', + end: '' + } + } + }, + data: { + allData: 'Tiedot ovat seuraavat: ', + partialData: 'Ensimmäiset {displayCnt} kohtaa ovat: ', + withName: 'tiedot nimelle {name} ovat {value}', + withoutName: '{value}', + separator: { + middle: ', ', + end: '. ' + } + } } }; diff --git a/src/i18n/langFR.ts b/src/i18n/langFR.ts index 2a501aff87..362226a8ef 100644 --- a/src/i18n/langFR.ts +++ b/src/i18n/langFR.ts @@ -104,7 +104,9 @@ export default { gauge: 'Jauge', pictorialBar: 'Barres à images', themeRiver: 'Stream Graph', - sunburst: 'Sunburst' + sunburst: 'Sunburst', + custom: 'Graphique personnalisé', + chart: 'Graphique' } }, aria: { diff --git a/src/i18n/langHU.ts b/src/i18n/langHU.ts index 3cdce9b837..e0aaae96e0 100644 --- a/src/i18n/langHU.ts +++ b/src/i18n/langHU.ts @@ -104,7 +104,9 @@ export default { gauge: 'Mérőeszköz', pictorialBar: 'Képes sávdiagram', themeRiver: 'Folyó témájú térkép', - sunburst: 'Napégés' + sunburst: 'Napégés', + custom: 'Egyedi diagram', + chart: 'Diagram' } }, aria: { diff --git a/src/i18n/langIT.ts b/src/i18n/langIT.ts index 75199920ce..1007db008f 100644 --- a/src/i18n/langIT.ts +++ b/src/i18n/langIT.ts @@ -104,7 +104,9 @@ export default { gauge: 'Gauge', pictorialBar: 'Pictorial bar', themeRiver: 'Theme River Map', - sunburst: 'Radiale' + sunburst: 'Radiale', + custom: 'Egyedi diagram', + chart: 'Grafico' } }, aria: { diff --git a/src/i18n/langJA.ts b/src/i18n/langJA.ts index cd431d5046..8c47c0c461 100644 --- a/src/i18n/langJA.ts +++ b/src/i18n/langJA.ts @@ -104,7 +104,9 @@ export default { gauge: 'ゲージ', pictorialBar: '絵入り棒グラフ', themeRiver: 'テーマリバー', - sunburst: 'サンバースト' + sunburst: 'サンバースト', + custom: 'カスタムチャート', + chart: 'チャート' } }, aria: { diff --git a/src/i18n/langKO.ts b/src/i18n/langKO.ts index 6901ac1b9f..d1bc78df7b 100644 --- a/src/i18n/langKO.ts +++ b/src/i18n/langKO.ts @@ -104,7 +104,9 @@ export default { gauge: '계기', pictorialBar: '픽토그램 차트', themeRiver: '스트림 그래프', - sunburst: '선버스트 차트' + sunburst: '선버스트 차트', + custom: '맞춤 차트', + chart: '차트' } }, aria: { diff --git a/src/i18n/langNL.ts b/src/i18n/langNL.ts new file mode 100644 index 0000000000..8a8abd02e9 --- /dev/null +++ b/src/i18n/langNL.ts @@ -0,0 +1,144 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/** + * Language: Dutch. + */ + +export default { + time: { + month: [ + 'januari', 'februari', 'maart', 'april', 'mei', 'juni', + 'juli', 'augustus', 'september', 'oktober', 'november', 'december' + ], + monthAbbr: [ + 'jan', 'feb', 'mrt', 'apr', 'mei', 'jun', + 'jul', 'aug', 'sep', 'okt', 'nov', 'dec' + ], + dayOfWeek: [ + 'zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag' + ], + dayOfWeekAbbr: [ + 'zo', 'ma', 'di', 'wo', 'do', 'vr', 'za' + ] + }, + legend: { + selector: { + all: 'Alle', + inverse: 'Omgekeerd' + } + }, + toolbox: { + brush: { + title: { + rect: 'Vakselectie', + polygon: 'Lasso selectie', + lineX: 'Horizontale selectie', + lineY: 'Verticale selectie', + keep: 'Selecties behouden', + clear: 'Selecties wissen' + } + }, + dataView: { + title: 'Gegevensweergave', + lang: ['Gegevensweergave', 'Sluiten', 'Vernieuwen'] + }, + dataZoom: { + title: { + zoom: 'Zoom', + back: 'Zoom herstellen' + } + }, + magicType: { + title: { + line: 'Omzetten naar lijndiagram', + bar: 'Omzetten naar staafdiagram', + stack: 'Omzetten naar stapeldiagram', + tiled: 'Omzetten naar tegeldiagram' + } + }, + restore: { + title: 'Herstellen' + }, + saveAsImage: { + title: 'Opslaan als afbeelding', + lang: ['Klik rechtermuisknop om de afbeelding op te slaan'] + } + }, + series: { + typeNames: { + pie: 'Cirkeldiagram', + bar: 'Staafdiagram', + line: 'Lijndiagram', + scatter: 'Spreidingsdiagram', + effectScatter: 'Spreidingsdiagram met rimpeleffect', + radar: 'Radardiagram', + tree: 'Boomdiagram', + treemap: 'Boomkaart', + boxplot: 'Boxplot', + candlestick: 'Kandelaardiagram', + k: 'K-lijndiagram', + heatmap: 'Hittekaart', + map: 'Kaart', + parallel: 'Parallele coördinatendiagram', + lines: 'Lijnendiagram', + graph: 'Relatiediagram', + sankey: 'Sankey-diagram', + funnel: 'Trechterdiagram', + gauge: 'Graadmeter', + pictorialBar: 'Staafdiagram met afbeeldingen', + themeRiver: 'Thematische rivierdiagram', + sunburst: 'Zonnestraaldiagram', + custom: 'Aangepast diagram', + chart: 'Diagram' + } + }, + aria: { + general: { + withTitle: 'Dit is een diagram over "{title}"', + withoutTitle: 'Dit is een diagram' + }, + series: { + single: { + prefix: '', + withName: ' van het type {seriesType} genaamd {seriesName}.', + withoutName: ' van het type {seriesType}.' + }, + multiple: { + prefix: '. Het bestaat uit {seriesCount} series.', + withName: ' De serie {seriesId} is een {seriesType} met de naam {seriesName}.', + withoutName: ' De serie {seriesId} is een {seriesType}.', + separator: { + middle: '', + end: '' + } + } + }, + data: { + allData: 'De gegevens zijn als volgt: ', + partialData: 'De eerste {displayCnt} items zijn: ', + withName: 'de gegevens voor {name} zijn {value}', + withoutName: '{value}', + separator: { + middle: ', ', + end: '. ' + } + } + } +}; diff --git a/src/i18n/langPL.ts b/src/i18n/langPL.ts index c84be2ebee..d5342eb7d1 100644 --- a/src/i18n/langPL.ts +++ b/src/i18n/langPL.ts @@ -104,7 +104,9 @@ gauge: 'Wykres zegarowy', pictorialBar: 'Wykres słupkowy obrazkowy', themeRiver: 'Wykres rzeki tematycznej', - sunburst: 'Wykres hierarchiczny słonecznikowy' + sunburst: 'Wykres hierarchiczny słonecznikowy', + custom: 'Wykres niestandardowy', + chart: 'Wykres' } }, aria: { diff --git a/src/i18n/langPT-br.ts b/src/i18n/langPT-br.ts index 47c098661b..6188a36953 100644 --- a/src/i18n/langPT-br.ts +++ b/src/i18n/langPT-br.ts @@ -105,7 +105,9 @@ export default { gauge: 'Gauge', pictorialBar: 'Pictorial bar', themeRiver: 'Theme River Map', - sunburst: 'Sunburst' + sunburst: 'Sunburst', + custom: 'Gráfico personalizado', + chart: 'Gráfico' } }, aria: { diff --git a/src/i18n/langRO.ts b/src/i18n/langRO.ts index 51ee51ef12..e872a4269b 100644 --- a/src/i18n/langRO.ts +++ b/src/i18n/langRO.ts @@ -104,7 +104,9 @@ gauge: 'Calibru', pictorialBar: 'Diagramă cu bare picturale', themeRiver: 'Streamgraph', - sunburst: 'Diagramă rază de soare' + sunburst: 'Diagramă rază de soare', + custom: 'Diagramă personalizată', + chart: 'Diagramă' } }, aria: { diff --git a/src/i18n/langRU.ts b/src/i18n/langRU.ts index ef24b7fefd..e778d76e16 100644 --- a/src/i18n/langRU.ts +++ b/src/i18n/langRU.ts @@ -104,7 +104,9 @@ export default { gauge: 'Шкала', pictorialBar: 'Столбец-картинка', themeRiver: 'Тематическая река', - sunburst: 'Солнечные лучи' + sunburst: 'Солнечные лучи', + custom: 'Пользовательская диаграмма', + chart: 'диаграмма' } }, aria: { diff --git a/src/i18n/langSI.ts b/src/i18n/langSI.ts index 6a1d287463..a54fd576e5 100644 --- a/src/i18n/langSI.ts +++ b/src/i18n/langSI.ts @@ -104,7 +104,9 @@ export default { gauge: 'Števec', pictorialBar: 'Stolpčni grafikon s podobo', themeRiver: 'Tematski rečni grafikon', - sunburst: 'Večnivojski tortni grafikon' + sunburst: 'Večnivojski tortni grafikon', + custom: 'Grafikon po meri', + chart: 'Grafikon' } }, aria: { diff --git a/src/i18n/langTH.ts b/src/i18n/langTH.ts index 540ea71d37..6283140af8 100644 --- a/src/i18n/langTH.ts +++ b/src/i18n/langTH.ts @@ -76,5 +76,65 @@ export default { title: 'บันทึกไปยังรูปภาพ', lang: ['คลิกขวาเพื่อบันทึกรูปภาพ'] } + }, + series: { + typeNames: { + pie: 'แผนภูมิวงกลม', + bar: 'แผนภูมิแท่ง', + line: 'แผนภูมิเส้น', + scatter: 'แผนภูมิกระจาย', + effectScatter: 'แผนภูมิกระจายคลื่น', + radar: 'แผนภูมิเรดาร์', + tree: 'ต้นไม้', + treemap: 'แผนที่ต้นไม้', + boxplot: 'แผนภูมิกล่อง', + candlestick: 'แผนภูมิเทียน', + k: 'แผนภูมิเส้น K', + heatmap: 'แผนที่ความร้อน', + map: 'แผนที่', + parallel: 'แผนที่พิกัดขนาน', + lines: 'กราฟเส้น', + graph: 'กราฟความสัมพันธ์', + sankey: 'แผนภูมิซันกีย์', + funnel: 'แผนภูมิกรวย', + gauge: 'เกจ', + pictorialBar: 'แผนภูมิแท่งภาพ', + themeRiver: 'แผนที่แม่น้ำธีม', + sunburst: 'Sunburst', + custom: 'แผนภูมิที่กำหนดเอง', + chart: 'แผนภูมิ' + } + }, + aria: { + general: { + withTitle: 'นี่คือแผนภูมิเกี่ยวกับ “{title}”', + withoutTitle: 'นี่คือแผนภูมิ' + }, + series: { + single: { + prefix: '', + withName: ' ด้วยประเภท {seriesType} ชื่อ {seriesName} ', + withoutName: ' ด้วยประเภท {seriesType} ' + }, + multiple: { + prefix: ' มีทั้งหมด {seriesCount} ชุดข้อมูล ', + withName: ' ชุดข้อมูลที่ {seriesId} เป็นประเภท {seriesType} แทน {seriesName} ', + withoutName: ' ชุดข้อมูลที่ {seriesId} เป็นประเภท {seriesType} ', + separator: { + middle: '', + end: '' + } + } + }, + data: { + allData: 'ข้อมูลดังต่อไปนี้: ', + partialData: 'ข้อมูล {displayCnt} รายการแรกคือ: ', + withName: 'ข้อมูลสำหรับ {name} คือ {value} ', + withoutName: '{value} ', + separator: { + middle: ', ', + end: '. ' + } + } } }; diff --git a/src/i18n/langTR.ts b/src/i18n/langTR.ts index f984abcd71..aa1ab103a8 100644 --- a/src/i18n/langTR.ts +++ b/src/i18n/langTR.ts @@ -104,7 +104,9 @@ export default { gauge: 'Gösterge', pictorialBar: 'Resimli Çubuk Grafiği', themeRiver: 'Akış Haritası', - sunburst: 'Güeş Patlaması Tablosu' + sunburst: 'Güeş Patlaması Tablosu', + custom: 'Özel grafik', + chart: 'Grafiği' } }, aria: { diff --git a/src/i18n/langUK.ts b/src/i18n/langUK.ts index 38b2e10498..4b48181cbd 100644 --- a/src/i18n/langUK.ts +++ b/src/i18n/langUK.ts @@ -104,7 +104,9 @@ export default { gauge: 'Шкала', pictorialBar: 'Стовпчик-картинка', themeRiver: 'Тематична ріка', - sunburst: 'Сонячне проміння' + sunburst: 'Сонячне проміння', + custom: 'Спеціальна діаграма', + chart: 'діаграма' } }, aria: { diff --git a/src/i18n/langVI.ts b/src/i18n/langVI.ts index 287e2e39c5..5d968c215d 100644 --- a/src/i18n/langVI.ts +++ b/src/i18n/langVI.ts @@ -128,7 +128,9 @@ export default { gauge: 'Biểu đồ cung tròn', pictorialBar: 'Biểu diễn hình ảnh', themeRiver: 'Bản đồ sông', - sunburst: 'Biểu đồ bậc' + sunburst: 'Biểu đồ bậc', + custom: 'Biểu đồ tùy chỉnh', + chart: 'Đồ thị' } }, aria: { diff --git a/src/i18n/langZH.ts b/src/i18n/langZH.ts index 3bd239cdec..d927fd71b3 100644 --- a/src/i18n/langZH.ts +++ b/src/i18n/langZH.ts @@ -100,7 +100,9 @@ export default { gauge: '仪表盘图', pictorialBar: '象形柱图', themeRiver: '主题河流图', - sunburst: '旭日图' + sunburst: '旭日图', + custom: '自定义图表', + chart: '图表' } }, aria: { diff --git a/src/label/labelGuideHelper.ts b/src/label/labelGuideHelper.ts index fdb70665e1..1177ceef09 100644 --- a/src/label/labelGuideHelper.ts +++ b/src/label/labelGuideHelper.ts @@ -547,7 +547,6 @@ function setLabelLineState( if (smooth > 0) { (stateObj.shape as Polyline['shape']).smooth = smooth as number; } - const styleObj = stateModel.getModel('lineStyle').getLineStyle(); isNormal ? labelLine.useStyle(styleObj) : stateObj.style = styleObj; } @@ -622,6 +621,9 @@ export function setLabelLineStyle( if (stateObj) { stateObj.ignore = true; } + if (!!labelLine) { + setLabelLineState(labelLine, true, stateName, stateModel); + } continue; } // Create labelLine if not exists diff --git a/src/model/mixin/dataFormat.ts b/src/model/mixin/dataFormat.ts index 2c39816235..99ca5607e7 100644 --- a/src/model/mixin/dataFormat.ts +++ b/src/model/mixin/dataFormat.ts @@ -67,6 +67,7 @@ export class DataFormatMixin { const itemOpt = data.getRawDataItem(dataIndex); const style = data.getItemVisual(dataIndex, 'style'); const color = style && style[data.getItemVisual(dataIndex, 'drawType') || 'fill'] as ZRColor; + const opacity = style && style.opacity; const borderColor = style && style.stroke as ColorString; const mainType = this.mainType; const isSeries = mainType === 'series'; @@ -87,6 +88,7 @@ export class DataFormatMixin { value: rawValue, color: color, borderColor: borderColor, + opacity: opacity, dimensionNames: userOutput ? userOutput.fullDimensions : null, encode: userOutput ? userOutput.encode : null, diff --git a/src/processor/dataSample.ts b/src/processor/dataSample.ts index 28579a652e..cbd370f2ba 100644 --- a/src/processor/dataSample.ts +++ b/src/processor/dataSample.ts @@ -61,6 +61,22 @@ const samplers: Dictionary = { // NaN will cause illegal axis extent. return isFinite(min) ? min : NaN; }, + minmax: function (frame) { + let turningPointAbsoluteValue = -Infinity; + let turningPointOriginalValue = -Infinity; + + for (let i = 0; i < frame.length; i++) { + const originalValue = frame[i]; + const absoluteValue = Math.abs(originalValue); + + if (absoluteValue > turningPointAbsoluteValue) { + turningPointAbsoluteValue = absoluteValue; + turningPointOriginalValue = originalValue; + } + } + + return isFinite(turningPointOriginalValue) ? turningPointOriginalValue : NaN; + }, // TODO // Median nearest: function (frame) { @@ -116,4 +132,4 @@ export default function dataSample(seriesType: string): StageHandler { } } }; -} \ No newline at end of file +} diff --git a/src/util/format.ts b/src/util/format.ts index afe9625b42..69f4be7a19 100644 --- a/src/util/format.ts +++ b/src/util/format.ts @@ -181,6 +181,7 @@ interface GetTooltipMarkerOpt { // id name for marker. If only one marker is in a rich text, this can be omitted. // By default: 'markerX' markerId?: string; + opacity?: number; } // Only support color string export function getTooltipMarker(color: ColorString, extraCssText?: string): TooltipMarker; @@ -191,6 +192,7 @@ export function getTooltipMarker(inOpt: ColorString | GetTooltipMarkerOpt, extra extraCssText: extraCssText } : (inOpt || {}) as GetTooltipMarkerOpt; const color = opt.color; + const opacity = String(opt.opacity || 1); const type = opt.type; extraCssText = opt.extraCssText; const renderMode = opt.renderMode || 'html'; @@ -204,10 +206,10 @@ export function getTooltipMarker(inOpt: ColorString | GetTooltipMarkerOpt, extra ? '' + + encodeHTML(color) + ';' + 'opacity:' + encodeHTML(opacity) + ';' + (extraCssText || '') + '">' : ''; + + encodeHTML(color) + ';' + 'opacity:' + encodeHTML(opacity) + ';' + (extraCssText || '') + '">'; } else { // Should better not to auto generate style name by auto-increment number here. @@ -223,12 +225,14 @@ export function getTooltipMarker(inOpt: ColorString | GetTooltipMarkerOpt, extra width: 4, height: 4, borderRadius: 2, + opacity: opacity, backgroundColor: color } : { width: 10, height: 10, borderRadius: 5, + opacity: opacity, backgroundColor: color } }; diff --git a/src/util/graphic.ts b/src/util/graphic.ts index 70ad6d8b83..a7e26e1d98 100644 --- a/src/util/graphic.ts +++ b/src/util/graphic.ts @@ -446,7 +446,7 @@ export function clipPointsByRect(points: vector.VectorArray[], rect: ZRRectLike) /** * Return a new clipped rect. If rect size are negative, return undefined. */ -export function clipRectByRect(targetRect: ZRRectLike, rect: ZRRectLike): ZRRectLike { +export function clipRectByRect(targetRect: ZRRectLike, rect: ZRRectLike): ZRRectLike | undefined { const x = mathMax(targetRect.x, rect.x); const x2 = mathMin(targetRect.x + targetRect.width, rect.x + rect.width); const y = mathMax(targetRect.y, rect.y); diff --git a/src/util/innerStore.ts b/src/util/innerStore.ts index dbaaecf040..cf9ede71a6 100644 --- a/src/util/innerStore.ts +++ b/src/util/innerStore.ts @@ -23,6 +23,9 @@ import { ComponentMainType, ComponentItemTooltipOption } from './types'; import { makeInner } from './model'; + +export type SSRItemType = 'chart' | 'legend'; + /** * ECData stored on graphic element */ @@ -34,6 +37,7 @@ export interface ECData { dataType?: SeriesDataType; focus?: InnerFocus; blurScope?: BlurScope; + ssrType?: SSRItemType; // Required by `tooltipConfig` and `focus`. componentMainType?: ComponentMainType; @@ -62,6 +66,7 @@ export const setCommonECData = (seriesIndex: number, dataType: SeriesDataType, d ecData.dataIndex = dataIdx; ecData.dataType = dataType; ecData.seriesIndex = seriesIndex; + ecData.ssrType = 'chart'; // TODO: not store dataIndex on children. if (el.type === 'group') { @@ -70,6 +75,7 @@ export const setCommonECData = (seriesIndex: number, dataType: SeriesDataType, d childECData.seriesIndex = seriesIndex; childECData.dataIndex = dataIdx; childECData.dataType = dataType; + childECData.ssrType = 'chart'; }); } } diff --git a/src/util/states.ts b/src/util/states.ts index 3a8ad4502f..3c8675dd4f 100644 --- a/src/util/states.ts +++ b/src/util/states.ts @@ -19,7 +19,6 @@ */ import { Dictionary } from 'zrender/src/core/types'; -import LRU from 'zrender/src/core/LRU'; import Displayable, { DisplayableState } from 'zrender/src/graphic/Displayable'; import { PatternObject } from 'zrender/src/graphic/Pattern'; import { GradientObject } from 'zrender/src/graphic/Gradient'; @@ -45,13 +44,10 @@ import { isObject, keys, isArray, - each, - isString, - isGradientObject, - map + each } from 'zrender/src/core/util'; import { getECData } from './innerStore'; -import * as colorTool from 'zrender/src/tool/color'; +import { liftColor } from 'zrender/src/tool/color'; import SeriesData from '../data/SeriesData'; import SeriesModel from '../model/Series'; import { CoordinateSystemMaster, CoordinateSystem } from '../coord/CoordinateSystem'; @@ -109,30 +105,6 @@ type ExtendedDisplayable = Displayable & ExtendedProps; function hasFillOrStroke(fillOrStroke: string | PatternObject | GradientObject) { return fillOrStroke != null && fillOrStroke !== 'none'; } -// Most lifted color are duplicated. -const liftedColorCache = new LRU(100); -function liftColor(color: GradientObject): GradientObject; -function liftColor(color: string): string; -function liftColor(color: string | GradientObject): string | GradientObject { - if (isString(color)) { - let liftedColor = liftedColorCache.get(color); - if (!liftedColor) { - liftedColor = colorTool.lift(color, -0.1); - liftedColorCache.put(color, liftedColor); - } - return liftedColor; - } - else if (isGradientObject(color)) { - const ret = extend({}, color) as GradientObject; - ret.colorStops = map(color.colorStops, stop => ({ - offset: stop.offset, - color: colorTool.lift(stop.color, -0.1) - })); - return ret; - } - // Change nothing. - return color; -} function doChangeHoverState(el: ECElement, stateName: DisplayState, hoverStateEnum: 0 | 1 | 2) { if (el.onHoverStateChange && (el.hoverState || 0) !== hoverStateEnum) { diff --git a/src/util/types.ts b/src/util/types.ts index c15e8c2639..b7c74abf58 100644 --- a/src/util/types.ts +++ b/src/util/types.ts @@ -432,7 +432,7 @@ export type DimensionLoose = DimensionName | DimensionIndexLoose; export type DimensionType = DataStoreDimensionType; export const VISUAL_DIMENSIONS = createHashMap([ - 'tooltip', 'label', 'itemName', 'itemId', 'itemGroupId', 'seriesName' + 'tooltip', 'label', 'itemName', 'itemId', 'itemGroupId', 'itemChildGroupId', 'seriesName' ]); // The key is VISUAL_DIMENSIONS export interface DataVisualDimensions { @@ -444,6 +444,7 @@ export interface DataVisualDimensions { itemName?: DimensionIndex; itemId?: DimensionIndex; itemGroupId?: DimensionIndex; + itemChildGroupId?: DimensionIndex; seriesName?: DimensionIndex; } @@ -618,6 +619,7 @@ export type OptionDataItemObject = { id?: OptionId; name?: OptionName; groupId?: OptionId; + childGroupId?: OptionId; value?: T[] | T; selected?: boolean; }; @@ -637,7 +639,7 @@ export interface GraphEdgeItemObject< */ target?: string | number } -export type OptionDataValue = string | number | Date; +export type OptionDataValue = string | number | Date | null | undefined; export type OptionDataValueNumeric = number | '-'; export type OptionDataValueCategory = string; @@ -667,6 +669,7 @@ export interface OptionEncodeVisualDimensions { // Which is useful in prepresenting the transition key of drilldown/up animation. // Or hover linking. itemGroupId?: OptionEncodeValue; + childGroupdId?: OptionEncodeValue; } export interface OptionEncode extends OptionEncodeVisualDimensions { [coordDim: string]: OptionEncodeValue | undefined @@ -693,6 +696,7 @@ export interface CallbackDataParams { dataType?: SeriesDataType; value: OptionDataItem | OptionDataValue; color?: ZRColor; + opacity?: number; borderColor?: string; dimensionNames?: DimensionName[]; encode?: DimensionUserOuputEncode; @@ -1264,7 +1268,7 @@ export interface CommonTooltipOption { * * Will be ignored if tooltip.formatter is specified. */ - valueFormatter?: (value: OptionDataValue | OptionDataValue[]) => string + valueFormatter?: (value: OptionDataValue | OptionDataValue[], dataIndex: number) => string /** * Absolution pixel [x, y] array. Or relative percent string [x, y] array. * If trigger is 'item'. position can be set to 'inside' / 'top' / 'left' / 'right' / 'bottom', @@ -1674,7 +1678,7 @@ export interface SeriesStackOptionMixin { type SamplingFunc = (frame: ArrayLike) => number; export interface SeriesSamplingOptionMixin { - sampling?: 'none' | 'average' | 'min' | 'max' | 'sum' | 'lttb' | SamplingFunc + sampling?: 'none' | 'average' | 'min' | 'max' | 'minmax' | 'sum' | 'lttb' | SamplingFunc } export interface SeriesEncodeOptionMixin { diff --git a/src/visual/aria.ts b/src/visual/aria.ts index 7237c36cdd..3f420588bc 100644 --- a/src/visual/aria.ts +++ b/src/visual/aria.ts @@ -264,6 +264,7 @@ export default function ariaVisual(ecModel: GlobalModel, api: ExtensionAPI) { } function getSeriesTypeName(type: SeriesTypes) { - return ecModel.getLocaleModel().get(['series', 'typeNames'])[type] || '自定义图'; + const typeNames = ecModel.getLocaleModel().get(['series', 'typeNames']); + return typeNames[type] || typeNames.chart; } } diff --git a/ssr/client/dist/index.js b/ssr/client/dist/index.js new file mode 100644 index 0000000000..14166beefc --- /dev/null +++ b/ssr/client/dist/index.js @@ -0,0 +1,106 @@ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['echarts-ssr-client'] = {})); +}(this, (function (exports) { 'use strict'; + + /** + * AUTO-GENERATED FILE. DO NOT MODIFY. + */ + + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + function hydrate(dom, options) { + var svgRoot = dom.querySelector('svg'); + if (!svgRoot) { + console.error('No SVG element found in the DOM.'); + return; + } + // const children = svgRoot.children; + function getIndex(child, attr) { + var index = child.getAttribute(attr); + if (index) { + return parseInt(index, 10); + } else { + return undefined; + } + } + var listeners = options.on || {}; + var _loop_1 = function (rawEvtName) { + var eventName = rawEvtName; + if (!listeners.hasOwnProperty(eventName)) { + return "continue"; + } + var listener = listeners[eventName]; + if (!isFunction(listener)) { + return "continue"; + } + svgRoot.addEventListener(eventName, function (event) { + var targetEl = event.target; + if (!targetEl || !isFunction(targetEl.getAttribute)) { + return; + } + var type = targetEl.getAttribute('ecmeta_ssr_type'); + var silent = targetEl.getAttribute('ecmeta_silent') === 'true'; + if (!type || silent) { + return; + } + listener({ + type: eventName, + ssrType: type, + seriesIndex: getIndex(targetEl, 'ecmeta_series_index'), + dataIndex: getIndex(targetEl, 'ecmeta_data_index'), + event: event + }); + }); + }; + for (var rawEvtName in listeners) { + _loop_1(rawEvtName); + } + } + function isFunction(value) { + return typeof value === 'function'; + } + + exports.hydrate = hydrate; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); +//# sourceMappingURL=index.js.map diff --git a/ssr/client/dist/index.js.map b/ssr/client/dist/index.js.map new file mode 100644 index 0000000000..6d39a9c583 --- /dev/null +++ b/ssr/client/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../lib/index.js"],"sourcesContent":["\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nexport function hydrate(dom, options) {\n var svgRoot = dom.querySelector('svg');\n if (!svgRoot) {\n console.error('No SVG element found in the DOM.');\n return;\n }\n // const children = svgRoot.children;\n function getIndex(child, attr) {\n var index = child.getAttribute(attr);\n if (index) {\n return parseInt(index, 10);\n } else {\n return undefined;\n }\n }\n var listeners = options.on || {};\n var _loop_1 = function (rawEvtName) {\n var eventName = rawEvtName;\n if (!listeners.hasOwnProperty(eventName)) {\n return \"continue\";\n }\n var listener = listeners[eventName];\n if (!isFunction(listener)) {\n return \"continue\";\n }\n svgRoot.addEventListener(eventName, function (event) {\n var targetEl = event.target;\n if (!targetEl || !isFunction(targetEl.getAttribute)) {\n return;\n }\n var type = targetEl.getAttribute('ecmeta_ssr_type');\n var silent = targetEl.getAttribute('ecmeta_silent') === 'true';\n if (!type || silent) {\n return;\n }\n listener({\n type: eventName,\n ssrType: type,\n seriesIndex: getIndex(targetEl, 'ecmeta_series_index'),\n dataIndex: getIndex(targetEl, 'ecmeta_data_index'),\n event: event\n });\n });\n };\n for (var rawEvtName in listeners) {\n _loop_1(rawEvtName);\n }\n}\nfunction isFunction(value) {\n return typeof value === 'function';\n}"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EACA;EACA;EACA;AACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACO,SAAS,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE;EACtC,EAAE,IAAI,OAAO,GAAG,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;EACzC,EAAE,IAAI,CAAC,OAAO,EAAE;EAChB,IAAI,OAAO,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;EACtD,IAAI,OAAO;EACX,GAAG;EACH;EACA,EAAE,SAAS,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE;EACjC,IAAI,IAAI,KAAK,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;EACzC,IAAI,IAAI,KAAK,EAAE;EACf,MAAM,OAAO,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;EACjC,KAAK,MAAM;EACX,MAAM,OAAO,SAAS,CAAC;EACvB,KAAK;EACL,GAAG;EACH,EAAE,IAAI,SAAS,GAAG,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC;EACnC,EAAE,IAAI,OAAO,GAAG,UAAU,UAAU,EAAE;EACtC,IAAI,IAAI,SAAS,GAAG,UAAU,CAAC;EAC/B,IAAI,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE;EAC9C,MAAM,OAAO,UAAU,CAAC;EACxB,KAAK;EACL,IAAI,IAAI,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;EACxC,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;EAC/B,MAAM,OAAO,UAAU,CAAC;EACxB,KAAK;EACL,IAAI,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,UAAU,KAAK,EAAE;EACzD,MAAM,IAAI,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC;EAClC,MAAM,IAAI,CAAC,QAAQ,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE;EAC3D,QAAQ,OAAO;EACf,OAAO;EACP,MAAM,IAAI,IAAI,GAAG,QAAQ,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;EAC1D,MAAM,IAAI,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,eAAe,CAAC,KAAK,MAAM,CAAC;EACrE,MAAM,IAAI,CAAC,IAAI,IAAI,MAAM,EAAE;EAC3B,QAAQ,OAAO;EACf,OAAO;EACP,MAAM,QAAQ,CAAC;EACf,QAAQ,IAAI,EAAE,SAAS;EACvB,QAAQ,OAAO,EAAE,IAAI;EACrB,QAAQ,WAAW,EAAE,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;EAC9D,QAAQ,SAAS,EAAE,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;EAC1D,QAAQ,KAAK,EAAE,KAAK;EACpB,OAAO,CAAC,CAAC;EACT,KAAK,CAAC,CAAC;EACP,GAAG,CAAC;EACJ,EAAE,KAAK,IAAI,UAAU,IAAI,SAAS,EAAE;EACpC,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;EACxB,GAAG;EACH,CAAC;EACD,SAAS,UAAU,CAAC,KAAK,EAAE;EAC3B,EAAE,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;EACrC;;;;;;"} \ No newline at end of file diff --git a/ssr/client/dist/package.json b/ssr/client/dist/package.json new file mode 100644 index 0000000000..6a0d2ef2aa --- /dev/null +++ b/ssr/client/dist/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} \ No newline at end of file diff --git a/ssr/client/src/.eslintrc.yaml b/ssr/client/src/.eslintrc.yaml new file mode 100644 index 0000000000..4f97f861fd --- /dev/null +++ b/ssr/client/src/.eslintrc.yaml @@ -0,0 +1,48 @@ + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Note: +# If eslint does not work in VSCode, please check: +# (1) Whether "@typescript-eslint/eslint-plugin" and "@typescript-eslint/parser" +# are npm installed locally. Should better in the same version. +# (2) Whether "VSCode ESlint extension" is installed. +# (3) If the project folder is not the root folder of your working space, please +# config the "VSCode ESlint extension" in "settings": +# ```json +# "eslint.workingDirectories": [{"mode": "auto"}] +# ``` +# Note that it should be "workingDirectories" rather than "WorkingDirectories". + +parser: "@typescript-eslint/parser" +parserOptions: + ecmaVersion: 6 + sourceType: module + ecmaFeatures: + modules: true + project: "tsconfig.json" +plugins: ["@typescript-eslint"] +env: + es6: false +globals: + jQuery: false + Promise: false + console: true + setTimeout: true + clearTimeout: true + __DEV__: true +extends: '../../../.eslintrc-common.yaml' diff --git a/ssr/client/src/index.ts b/ssr/client/src/index.ts new file mode 100644 index 0000000000..09c3d2af83 --- /dev/null +++ b/ssr/client/src/index.ts @@ -0,0 +1,94 @@ +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +// FIXME: use only one definition with +// {SSRItemType} from '../../../src/util/innerStore'; +type SSRItemType = 'legend' | 'chart'; + +export interface ECSSRClientEventParams { + type: ECSSREvent; + ssrType: SSRItemType; + seriesIndex?: number; + dataIndex?: number; + event: Event; +} + +export interface ECSSRClientOptions { + on?: { + mouseover?: (params: ECSSRClientEventParams) => void; + mouseout?: (params: ECSSRClientEventParams) => void; + click?: (params: ECSSRClientEventParams) => void; + } +} + +export type ECSSREvent = 'mouseover' | 'mouseout' | 'click'; + +export function hydrate(dom: HTMLElement, options: ECSSRClientOptions): void { + const svgRoot = dom.querySelector('svg'); + if (!svgRoot) { + console.error('No SVG element found in the DOM.'); + return; + } + + function getIndex(child: Element, attr: string): number | undefined { + const index = child.getAttribute(attr); + if (index) { + return parseInt(index, 10); + } + else { + return undefined; + } + } + + const listeners = options.on || {}; + for (const rawEvtName in listeners) { + if (!listeners.hasOwnProperty(rawEvtName)) { + continue; + } + const eventName = rawEvtName as ECSSREvent; + const listener = listeners[eventName as ECSSREvent]; + if (!isFunction(listener)) { + continue; + } + + svgRoot.addEventListener(eventName, event => { + const targetEl = event.target as Element; + if (!targetEl || !isFunction(targetEl.getAttribute)) { + return; + } + const type = targetEl.getAttribute('ecmeta_ssr_type'); + const silent = targetEl.getAttribute('ecmeta_silent') === 'true'; + if (!type || silent) { + return; + } + listener({ + type: eventName, + ssrType: type as SSRItemType, + seriesIndex: getIndex(targetEl, 'ecmeta_series_index'), + dataIndex: getIndex(targetEl, 'ecmeta_data_index'), + event + }); + }); + + } +} + +function isFunction(value: any): value is Function { + return typeof value === 'function'; +} diff --git a/test/axis-align-lastLabel.html b/test/axis-align-lastLabel.html new file mode 100644 index 0000000000..559f3b8365 --- /dev/null +++ b/test/axis-align-lastLabel.html @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + diff --git a/test/clip-line-cap.html b/test/clip-line-cap.html new file mode 100644 index 0000000000..c444e3af5c --- /dev/null +++ b/test/clip-line-cap.html @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + diff --git a/test/clip.html b/test/clip.html index 165e3f73f3..508375bfac 100644 --- a/test/clip.html +++ b/test/clip.html @@ -103,8 +103,6 @@ }) - -
+ + + + + + + + + + +
+ + +
+ + + diff --git a/test/dataset-source-two-typed-array.html b/test/dataset-source-two-typed-array.html new file mode 100644 index 0000000000..f2c1cc8f01 --- /dev/null +++ b/test/dataset-source-two-typed-array.html @@ -0,0 +1,271 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/graph-case.html b/test/graph-case.html index 7f199f5a4a..4523593c7b 100644 --- a/test/graph-case.html +++ b/test/graph-case.html @@ -39,7 +39,7 @@
- +
@@ -154,6 +154,61 @@ }); + diff --git a/test/lib/config.js b/test/lib/config.js index bc36037e79..462b31420a 100644 --- a/test/lib/config.js +++ b/test/lib/config.js @@ -82,6 +82,7 @@ 'map': 'data/map', 'i18n': '../i18n', 'extension': '../dist/extension', + 'ssrClient': '../ssr/client/dist/index.js' } }); } diff --git a/test/lib/testHelper.js b/test/lib/testHelper.js index 6df2c44a6e..c570529d39 100644 --- a/test/lib/testHelper.js +++ b/test/lib/testHelper.js @@ -76,6 +76,7 @@ * @param {Array.|Object} [opt.buttons] {text: ..., onClick: ...}, or an array of them. * @param {boolean} [opt.recordCanvas] 'test/lib/canteen.js' is required. * @param {boolean} [opt.recordVideo] + * @param {string} [opt.renderer] 'canvas' or 'svg' */ testHelper.create = function (echarts, domOrId, opt) { var dom = getDom(domOrId); @@ -267,6 +268,7 @@ * @param {number} opt.width * @param {number} opt.height * @param {boolean} opt.draggable + * @param {string} opt.renderer 'canvas' or 'svg' */ testHelper.createChart = function (echarts, domOrId, option, opt) { if (typeof opt === 'number') { @@ -287,6 +289,7 @@ } var chart = echarts.init(dom, null, { + renderer: opt.renderer, useCoarsePointer: opt.useCoarsePointer, pointerSize: opt.pointerSize }); diff --git a/test/line-sampling.html b/test/line-sampling.html index ea8382734a..c288d893d1 100644 --- a/test/line-sampling.html +++ b/test/line-sampling.html @@ -36,6 +36,7 @@
+
+ + diff --git a/test/manual-svg-color-bug-202311.html b/test/manual-svg-color-bug-202311.html new file mode 100644 index 0000000000..15d95b4e40 --- /dev/null +++ b/test/manual-svg-color-bug-202311.html @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + +

Test this case on Safari.

+ +
+ +
+
+ + + + + + + + + diff --git a/test/markArea.html b/test/markArea.html index d19744c8e7..0c26bccec7 100644 --- a/test/markArea.html +++ b/test/markArea.html @@ -28,6 +28,8 @@
+
+
+ + + + diff --git a/test/pie-endAngle.html b/test/pie-endAngle.html new file mode 100644 index 0000000000..0d5ed987b0 --- /dev/null +++ b/test/pie-endAngle.html @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + +
+ + + + + \ No newline at end of file diff --git a/test/pie-pad-angle.html b/test/pie-pad-angle.html new file mode 100644 index 0000000000..a458e6f6bc --- /dev/null +++ b/test/pie-pad-angle.html @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/polar-end-angle.html b/test/polar-end-angle.html new file mode 100644 index 0000000000..3f9849ac19 --- /dev/null +++ b/test/polar-end-angle.html @@ -0,0 +1,85 @@ + + + + + + + + + + + + +

polar with end angle

+
+ + + diff --git a/test/roseType-labeline.html b/test/roseType-labeline.html new file mode 100644 index 0000000000..a763dcc0e2 --- /dev/null +++ b/test/roseType-labeline.html @@ -0,0 +1,120 @@ + + + + + + + + + + + +
+ + + diff --git a/test/runTest/actions/__meta__.json b/test/runTest/actions/__meta__.json index 7c9a89b242..8592bb1bee 100644 --- a/test/runTest/actions/__meta__.json +++ b/test/runTest/actions/__meta__.json @@ -51,6 +51,7 @@ "candlestick-large2": 1, "candlestickConnect": 4, "clip": 12, + "clip2": 2, "coarse-pointer": 3, "color-mix-aqi": 2, "connect": 1, @@ -100,7 +101,7 @@ "geoScatter": 1, "getOption": 1, "graph": 2, - "graph-case": 1, + "graph-case": 2, "graph-grid": 1, "graph-simple": 2, "graphic-animation": 1, @@ -155,6 +156,7 @@ "pie-animation": 2, "pie-calculable": 1, "pie-cornerRadius": 1, + "pie-endAngle": 1, "pie-label": 2, "pie-label-extreme": 2, "pie-percent": 2, @@ -166,6 +168,7 @@ "radar3": 2, "radar4": 1, "resize-animation": 1, + "roseType-labeline": 1, "sankey-depth": 1, "sankey-emphasis-lineStyle": 1, "sankey-jump": 1, @@ -198,6 +201,7 @@ "tooltip-domnode": 1, "tooltip-event": 1, "tooltip-link": 2, + "tooltip-opacity": 1, "tooltip-rich": 1, "tooltip-setOption": 2, "tooltip-valueFormatter": 3, @@ -214,5 +218,6 @@ "universalTransition": 6, "universalTransition2": 3, "universalTransition3": 2, - "visualMap-categories": 1 + "visualMap-categories": 1, + "visualMap-multi-continuous": 1 } \ No newline at end of file diff --git a/test/runTest/actions/clip2.json b/test/runTest/actions/clip2.json new file mode 100644 index 0000000000..e563f40376 --- /dev/null +++ b/test/runTest/actions/clip2.json @@ -0,0 +1 @@ +[{"name":"Action 1","ops":[{"type":"mousedown","time":491,"x":266,"y":91},{"type":"mouseup","time":640,"x":266,"y":91},{"time":641,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":835,"x":265,"y":91},{"type":"mousemove","time":1035,"x":276,"y":97},{"type":"mousemove","time":1235,"x":360,"y":101},{"type":"mousemove","time":1435,"x":386,"y":99},{"type":"mousemove","time":1635,"x":399,"y":97},{"type":"mousemove","time":1839,"x":401,"y":95},{"type":"mousedown","time":1906,"x":401,"y":95},{"type":"mousemove","time":1968,"x":402,"y":95},{"type":"mouseup","time":2094,"x":402,"y":95},{"time":2095,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":2173,"x":402,"y":95}],"scrollY":0,"scrollX":0,"timestamp":1688898127640},{"name":"Action 2","ops":[{"type":"screenshot","time":1732}],"scrollY":434.3999938964844,"scrollX":0,"timestamp":1688897861656}] \ No newline at end of file diff --git a/test/runTest/actions/graph-case.json b/test/runTest/actions/graph-case.json index ace16dc419..a4f3458490 100644 --- a/test/runTest/actions/graph-case.json +++ b/test/runTest/actions/graph-case.json @@ -1 +1 @@ -[{"name":"Action 1","ops":[{"type":"mousemove","time":475,"x":416,"y":188},{"type":"mousemove","time":675,"x":406,"y":208},{"type":"mousedown","time":848,"x":406,"y":210},{"type":"mousemove","time":881,"x":406,"y":210},{"type":"mouseup","time":979,"x":406,"y":210},{"time":980,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":1837,"x":406,"y":210},{"type":"mouseup","time":1988,"x":406,"y":210},{"time":1989,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":2341,"x":406,"y":211},{"type":"mousemove","time":2541,"x":415,"y":180}],"scrollY":334,"scrollX":0,"timestamp":1684056156749}] \ No newline at end of file +[{"name":"Action 1","ops":[{"type":"mousemove","time":475,"x":416,"y":188},{"type":"mousemove","time":675,"x":406,"y":208},{"type":"mousedown","time":848,"x":406,"y":210},{"type":"mousemove","time":881,"x":406,"y":210},{"type":"mouseup","time":979,"x":406,"y":210},{"time":980,"delay":400,"type":"screenshot-auto"},{"type":"mousedown","time":1837,"x":406,"y":210},{"type":"mouseup","time":1988,"x":406,"y":210},{"time":1989,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":2341,"x":406,"y":211},{"type":"mousemove","time":2541,"x":415,"y":180}],"scrollY":334,"scrollX":0,"timestamp":1684056156749},{"name":"Action 2","ops":[{"type":"mousedown","time":677,"x":43,"y":180},{"type":"mousemove","time":683,"x":43,"y":180},{"type":"mouseup","time":853,"x":43,"y":180},{"time":854,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":886,"x":43,"y":180}],"scrollY":833,"scrollX":0,"timestamp":1705353513922}] \ No newline at end of file diff --git a/test/runTest/actions/pie-endAngle.json b/test/runTest/actions/pie-endAngle.json new file mode 100644 index 0000000000..8252f9f9e0 --- /dev/null +++ b/test/runTest/actions/pie-endAngle.json @@ -0,0 +1 @@ +[{"name":"Action 1","ops":[{"type":"mousemove","time":358,"x":603,"y":513},{"type":"mousemove","time":558,"x":610,"y":488},{"type":"screenshot","time":958},{"type":"mousemove","time":1083,"x":610,"y":488},{"type":"mousemove","time":1283,"x":724,"y":87},{"type":"mousemove","time":1485,"x":719,"y":79},{"type":"mousemove","time":1557,"x":719,"y":79},{"type":"mousemove","time":1759,"x":667,"y":46},{"type":"mousemove","time":1959,"x":671,"y":45},{"type":"mousemove","time":2161,"x":658,"y":58},{"type":"mousemove","time":2369,"x":634,"y":29},{"type":"mousemove","time":2574,"x":634,"y":22},{"type":"mousedown","time":2766,"x":638,"y":14},{"type":"mousemove","time":2775,"x":638,"y":14},{"type":"mouseup","time":2866,"x":638,"y":14},{"time":2867,"delay":400,"type":"screenshot-auto"},{"type":"screenshot","time":4014},{"type":"mousemove","time":4601,"x":639,"y":14},{"type":"mousemove","time":4802,"x":659,"y":25},{"type":"mousemove","time":5208,"x":659,"y":25},{"type":"mousemove","time":5408,"x":671,"y":56},{"type":"mousemove","time":5608,"x":669,"y":66},{"type":"mousemove","time":5819,"x":669,"y":67},{"type":"mousedown","time":6129,"x":669,"y":67},{"type":"mouseup","time":6287,"x":669,"y":67},{"time":6288,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":6816,"x":669,"y":67},{"type":"mousemove","time":7016,"x":669,"y":43},{"type":"mousemove","time":7216,"x":668,"y":56},{"type":"mousemove","time":7416,"x":670,"y":52},{"type":"mousemove","time":7617,"x":670,"y":44},{"type":"screenshot","time":7827},{"type":"mousemove","time":8092,"x":670,"y":44},{"type":"mousemove","time":8293,"x":636,"y":22},{"type":"mousedown","time":8494,"x":637,"y":13},{"type":"mousemove","time":8503,"x":637,"y":13},{"type":"mouseup","time":8602,"x":637,"y":13},{"time":8603,"delay":400,"type":"screenshot-auto"},{"type":"screenshot","time":9669},{"type":"mousemove","time":10116,"x":637,"y":14},{"type":"mousemove","time":10316,"x":666,"y":49},{"type":"mousemove","time":10516,"x":692,"y":42},{"type":"mousemove","time":10718,"x":692,"y":42},{"type":"mousemove","time":10935,"x":689,"y":43},{"type":"mousemove","time":11208,"x":689,"y":43},{"type":"mousedown","time":11328,"x":693,"y":41},{"type":"mousemove","time":11411,"x":693,"y":41},{"type":"mouseup","time":11420,"x":693,"y":41},{"time":11421,"delay":400,"type":"screenshot-auto"},{"type":"screenshot","time":13405},{"type":"mousemove","time":13541,"x":692,"y":41},{"type":"mousemove","time":13741,"x":657,"y":21},{"type":"mousemove","time":13947,"x":645,"y":17},{"type":"mousemove","time":14152,"x":640,"y":16},{"type":"mousedown","time":14161,"x":640,"y":16},{"type":"mouseup","time":14279,"x":640,"y":16},{"time":14280,"delay":400,"type":"screenshot-auto"},{"type":"screenshot","time":15711},{"type":"mousemove","time":16984,"x":640,"y":16},{"type":"mousemove","time":17317,"x":640,"y":16},{"type":"mousemove","time":17519,"x":640,"y":16},{"type":"mousemove","time":17701,"x":639,"y":16},{"type":"mousedown","time":19029,"x":639,"y":16},{"type":"mouseup","time":19161,"x":639,"y":16},{"time":19162,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":20342,"x":639,"y":16},{"type":"mousemove","time":20544,"x":672,"y":74},{"type":"mousemove","time":20753,"x":669,"y":75},{"type":"mousemove","time":20866,"x":668,"y":75},{"type":"mousemove","time":21068,"x":642,"y":77},{"type":"mousemove","time":21275,"x":641,"y":77},{"type":"mousemove","time":21478,"x":638,"y":77},{"type":"mousemove","time":21686,"x":633,"y":75},{"type":"mousemove","time":21808,"x":634,"y":75},{"type":"mousemove","time":22011,"x":638,"y":73},{"type":"mousemove","time":22275,"x":638,"y":73},{"type":"mousemove","time":22477,"x":632,"y":73},{"type":"mousemove","time":22686,"x":628,"y":73},{"type":"mousedown","time":22940,"x":628,"y":73},{"type":"mouseup","time":23079,"x":628,"y":73},{"time":23080,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":23475,"x":629,"y":72},{"type":"mousemove","time":23675,"x":719,"y":42},{"type":"mousemove","time":23877,"x":720,"y":42},{"type":"mousemove","time":23916,"x":720,"y":42},{"type":"mousemove","time":24118,"x":707,"y":46},{"type":"mousemove","time":24357,"x":709,"y":46},{"type":"mousedown","time":24398,"x":709,"y":46},{"type":"mousemove","time":24617,"x":709,"y":46},{"type":"mouseup","time":24756,"x":714,"y":46},{"time":24757,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":24820,"x":715,"y":46},{"type":"mousemove","time":25842,"x":712,"y":46},{"type":"screenshot","time":25847},{"type":"mousemove","time":26044,"x":666,"y":35},{"type":"mousemove","time":26252,"x":628,"y":24},{"type":"mousemove","time":26458,"x":637,"y":18},{"type":"mousedown","time":26527,"x":639,"y":15},{"type":"mouseup","time":26644,"x":639,"y":15},{"time":26645,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":26661,"x":639,"y":15},{"type":"screenshot","time":27811},{"type":"mousemove","time":28875,"x":639,"y":15},{"type":"mousemove","time":29749,"x":639,"y":15},{"type":"mousemove","time":29950,"x":642,"y":81},{"type":"mousemove","time":30152,"x":631,"y":82},{"type":"mousemove","time":30361,"x":625,"y":74},{"type":"mousedown","time":30554,"x":625,"y":74},{"type":"mousemove","time":30808,"x":625,"y":74},{"type":"mousemove","time":31011,"x":620,"y":74},{"type":"mousemove","time":31217,"x":618,"y":74},{"type":"mousemove","time":31417,"x":616,"y":74},{"type":"mouseup","time":31463,"x":615,"y":74},{"time":31464,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":31619,"x":615,"y":74},{"type":"mousemove","time":32657,"x":615,"y":74},{"type":"screenshot","time":32696},{"type":"mousemove","time":32858,"x":636,"y":24},{"type":"mousemove","time":33059,"x":637,"y":23},{"type":"mousemove","time":33259,"x":638,"y":14},{"type":"mousedown","time":33340,"x":638,"y":14},{"type":"mouseup","time":33466,"x":638,"y":14},{"time":33467,"delay":400,"type":"screenshot-auto"},{"type":"screenshot","time":34594},{"type":"mousemove","time":34766,"x":639,"y":14},{"type":"mousemove","time":34966,"x":707,"y":47},{"type":"mousemove","time":35166,"x":709,"y":47},{"type":"mousemove","time":35373,"x":711,"y":45},{"type":"mousemove","time":35499,"x":711,"y":45},{"type":"mousemove","time":35700,"x":706,"y":45},{"type":"mousemove","time":35903,"x":643,"y":46},{"type":"mousemove","time":36120,"x":624,"y":47},{"type":"mousemove","time":36333,"x":622,"y":47},{"type":"mousemove","time":36533,"x":621,"y":46},{"type":"mousemove","time":36736,"x":620,"y":46},{"type":"mousedown","time":36740,"x":620,"y":46},{"type":"mouseup","time":36889,"x":620,"y":46},{"time":36890,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":37109,"x":620,"y":46},{"type":"mousemove","time":37312,"x":620,"y":44},{"type":"mousemove","time":37418,"x":620,"y":44},{"type":"mousemove","time":37621,"x":622,"y":42},{"type":"mousedown","time":37717,"x":622,"y":42},{"type":"mouseup","time":37864,"x":622,"y":42},{"time":37865,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":38109,"x":622,"y":43},{"type":"mousemove","time":38309,"x":704,"y":85},{"type":"mousemove","time":38509,"x":710,"y":66},{"type":"mousemove","time":38711,"x":714,"y":63},{"type":"mousedown","time":38890,"x":714,"y":63},{"type":"mousemove","time":38928,"x":714,"y":63},{"type":"mouseup","time":38956,"x":714,"y":63},{"time":38957,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":39166,"x":714,"y":63},{"type":"mousemove","time":39369,"x":714,"y":67},{"type":"mousemove","time":39576,"x":712,"y":70},{"type":"mousedown","time":39830,"x":712,"y":70},{"type":"mouseup","time":39970,"x":712,"y":70},{"time":39971,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":40542,"x":712,"y":69},{"type":"mousemove","time":40744,"x":712,"y":68},{"type":"screenshot","time":40773},{"type":"mousemove","time":40791,"x":712,"y":68},{"type":"mousemove","time":40992,"x":712,"y":67},{"type":"mousemove","time":41192,"x":720,"y":81},{"type":"mousemove","time":41392,"x":719,"y":81},{"type":"mousemove","time":41593,"x":626,"y":40},{"type":"mousemove","time":41795,"x":626,"y":41},{"type":"mousedown","time":41921,"x":626,"y":41},{"type":"mousemove","time":42099,"x":626,"y":41},{"type":"mousemove","time":42300,"x":608,"y":41},{"type":"mouseup","time":42312,"x":608,"y":41},{"time":42313,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":42521,"x":608,"y":41},{"type":"mousemove","time":42618,"x":608,"y":41},{"type":"mousemove","time":42820,"x":640,"y":18},{"type":"mousemove","time":43029,"x":646,"y":14},{"type":"mousemove","time":43233,"x":709,"y":93},{"type":"mousemove","time":43437,"x":712,"y":85},{"type":"mousemove","time":43669,"x":712,"y":76},{"type":"mousemove","time":43886,"x":712,"y":75},{"type":"mousedown","time":43924,"x":712,"y":75},{"type":"mousemove","time":44067,"x":712,"y":75},{"type":"mouseup","time":44173,"x":747,"y":75},{"time":44174,"delay":400,"type":"screenshot-auto"},{"type":"mousemove","time":44270,"x":749,"y":75},{"type":"mousemove","time":44483,"x":749,"y":75},{"type":"mousemove","time":44683,"x":662,"y":27},{"type":"mousemove","time":44883,"x":638,"y":17},{"type":"mousemove","time":45083,"x":637,"y":16},{"type":"mousemove","time":45293,"x":636,"y":16},{"type":"screenshot","time":45316},{"type":"mousedown","time":45700,"x":636,"y":16},{"type":"mouseup","time":45808,"x":636,"y":16},{"time":45809,"delay":400,"type":"screenshot-auto"},{"type":"screenshot","time":46896}],"scrollY":0,"scrollX":0,"timestamp":1688051759455}] \ No newline at end of file diff --git a/test/runTest/actions/roseType-labeline.json b/test/runTest/actions/roseType-labeline.json new file mode 100644 index 0000000000..a15b1ced2c --- /dev/null +++ b/test/runTest/actions/roseType-labeline.json @@ -0,0 +1 @@ +[{"name":"Action 1","ops":[{"type":"mousemove","time":170,"x":251,"y":401},{"type":"mousemove","time":371,"x":256,"y":385},{"type":"mousemove","time":571,"x":257,"y":352},{"type":"mousemove","time":771,"x":362,"y":265},{"type":"mousemove","time":971,"x":428,"y":210},{"type":"mousemove","time":1172,"x":448,"y":203},{"type":"mousemove","time":1380,"x":494,"y":194},{"type":"mousemove","time":1580,"x":541,"y":268},{"type":"mousemove","time":1782,"x":542,"y":276},{"type":"mousemove","time":1895,"x":542,"y":276},{"type":"mousemove","time":2095,"x":516,"y":339},{"type":"mousemove","time":2296,"x":515,"y":341},{"type":"mousemove","time":2504,"x":452,"y":388},{"type":"mousemove","time":2704,"x":447,"y":388},{"type":"mousemove","time":2904,"x":415,"y":384},{"type":"mousemove","time":3105,"x":391,"y":340},{"type":"mousemove","time":3307,"x":389,"y":329},{"type":"mousemove","time":3512,"x":400,"y":291},{"type":"mousemove","time":3716,"x":400,"y":282},{"type":"mousemove","time":3929,"x":428,"y":269},{"type":"mousemove","time":4129,"x":429,"y":269},{"type":"mousemove","time":4204,"x":429,"y":269},{"type":"mousemove","time":4407,"x":429,"y":270},{"type":"mousemove","time":5029,"x":429,"y":270},{"type":"mousemove","time":5229,"x":424,"y":270},{"type":"mousemove","time":5429,"x":376,"y":276},{"type":"mousemove","time":5633,"x":350,"y":298},{"type":"mousemove","time":5838,"x":386,"y":293},{"type":"mousemove","time":6041,"x":410,"y":300},{"type":"mousemove","time":6562,"x":410,"y":299},{"type":"mousemove","time":6770,"x":410,"y":299},{"type":"mousemove","time":6970,"x":409,"y":299},{"type":"mousemove","time":8195,"x":409,"y":299},{"type":"screenshot","time":8577},{"type":"mousemove","time":9020,"x":409,"y":299},{"type":"mousemove","time":9221,"x":386,"y":302},{"type":"mousemove","time":9429,"x":377,"y":310},{"type":"mousemove","time":9629,"x":383,"y":332},{"type":"mousemove","time":9831,"x":386,"y":333},{"type":"mousemove","time":10036,"x":397,"y":343},{"type":"mousemove","time":10237,"x":420,"y":351},{"type":"mousemove","time":10437,"x":459,"y":366},{"type":"mousemove","time":10637,"x":459,"y":367},{"type":"mousemove","time":10846,"x":461,"y":366},{"type":"screenshot","time":11116},{"type":"mousemove","time":11138,"x":461,"y":366},{"type":"mousemove","time":11337,"x":520,"y":332},{"type":"mousemove","time":11537,"x":528,"y":309},{"type":"mousemove","time":11739,"x":532,"y":267},{"type":"screenshot","time":12240},{"type":"mousemove","time":12271,"x":532,"y":267},{"type":"mousemove","time":12471,"x":481,"y":197},{"type":"mousemove","time":12674,"x":480,"y":195},{"type":"mousemove","time":12787,"x":480,"y":196},{"type":"screenshot","time":13084},{"type":"mousemove","time":13112,"x":480,"y":196},{"type":"mousemove","time":13313,"x":480,"y":197},{"type":"mousemove","time":13513,"x":454,"y":222},{"type":"mousemove","time":13715,"x":440,"y":240},{"type":"mousemove","time":13924,"x":436,"y":247},{"type":"mousemove","time":14128,"x":437,"y":248},{"type":"mousemove","time":14329,"x":437,"y":249}],"scrollY":0,"scrollX":0,"timestamp":1687699940477}] \ No newline at end of file diff --git a/test/runTest/actions/tooltip-opacity.json b/test/runTest/actions/tooltip-opacity.json new file mode 100644 index 0000000000..c10d9722a5 --- /dev/null +++ b/test/runTest/actions/tooltip-opacity.json @@ -0,0 +1 @@ +[{"name":"Action 1","ops":[{"type":"mousemove","time":1108,"x":1,"y":273},{"type":"mousemove","time":1308,"x":282,"y":375},{"type":"mousemove","time":1519,"x":283,"y":376},{"type":"screenshot","time":2038},{"type":"mousemove","time":2925,"x":283,"y":375},{"type":"mousemove","time":3126,"x":440,"y":322},{"type":"mousemove","time":3333,"x":453,"y":324},{"type":"screenshot","time":3945},{"type":"mousemove","time":4393,"x":453,"y":324},{"type":"mousemove","time":4595,"x":493,"y":508},{"type":"mousemove","time":4804,"x":489,"y":515},{"type":"screenshot","time":5333},{"type":"mousemove","time":5476,"x":483,"y":503},{"type":"mousemove","time":5678,"x":412,"y":313},{"type":"screenshot","time":6173},{"type":"mousemove","time":6242,"x":411,"y":313},{"type":"mousemove","time":6442,"x":236,"y":399},{"type":"mousemove","time":6643,"x":233,"y":401},{"type":"screenshot","time":6816},{"type":"mousemove","time":6860,"x":233,"y":401},{"type":"mousemove","time":7062,"x":218,"y":303},{"type":"mousemove","time":7267,"x":213,"y":286},{"type":"mousemove","time":7467,"x":210,"y":279},{"type":"screenshot","time":7513},{"type":"mousemove","time":7750,"x":210,"y":279},{"type":"mousemove","time":7951,"x":101,"y":295},{"type":"mousemove","time":8152,"x":123,"y":310},{"type":"mousemove","time":8353,"x":123,"y":310},{"type":"screenshot","time":8432},{"type":"mousemove","time":8826,"x":123,"y":310},{"type":"mousemove","time":9029,"x":133,"y":310},{"type":"mousemove","time":9246,"x":133,"y":310}],"scrollY":0,"scrollX":0,"timestamp":1690094350338}] \ No newline at end of file diff --git a/test/runTest/actions/visualMap-multi-continuous.json b/test/runTest/actions/visualMap-multi-continuous.json new file mode 100644 index 0000000000..fa0bba0713 --- /dev/null +++ b/test/runTest/actions/visualMap-multi-continuous.json @@ -0,0 +1 @@ +[{"name":"Action 1","ops":[{"type":"mousemove","time":992,"x":584,"y":400},{"type":"mousemove","time":1194,"x":580,"y":373},{"type":"mousemove","time":1399,"x":566,"y":353},{"type":"mousemove","time":1604,"x":559,"y":345},{"type":"mousemove","time":1806,"x":541,"y":337},{"type":"mousemove","time":2009,"x":518,"y":342},{"type":"mousemove","time":2214,"x":482,"y":357},{"type":"mousemove","time":2417,"x":421,"y":364},{"type":"mousemove","time":2620,"x":376,"y":346},{"type":"mousemove","time":2821,"x":359,"y":324},{"type":"mousemove","time":3025,"x":365,"y":309},{"type":"mousemove","time":3226,"x":383,"y":310},{"type":"mousemove","time":3426,"x":408,"y":358},{"type":"mousemove","time":3632,"x":414,"y":380},{"type":"mousemove","time":3835,"x":488,"y":362},{"type":"mousemove","time":4037,"x":553,"y":326},{"type":"mousemove","time":4241,"x":593,"y":286},{"type":"mousemove","time":4447,"x":593,"y":262},{"type":"mousemove","time":4736,"x":593,"y":262},{"type":"mousemove","time":4939,"x":746,"y":234},{"type":"mousemove","time":5144,"x":758,"y":225},{"type":"mousemove","time":5347,"x":746,"y":218},{"type":"mousemove","time":5556,"x":743,"y":216},{"type":"mousemove","time":5978,"x":743,"y":216},{"type":"mousemove","time":6184,"x":758,"y":253},{"type":"mousemove","time":6385,"x":762,"y":348},{"type":"mousemove","time":6587,"x":758,"y":374},{"type":"mousemove","time":6791,"x":757,"y":377},{"type":"mousemove","time":6995,"x":757,"y":397},{"type":"mousemove","time":7197,"x":758,"y":416},{"type":"mousemove","time":7412,"x":758,"y":418},{"type":"mousemove","time":7628,"x":758,"y":418},{"type":"screenshot","time":8017},{"type":"mousemove","time":8137,"x":758,"y":418},{"type":"mousemove","time":8337,"x":758,"y":408},{"type":"mousemove","time":8542,"x":506,"y":344},{"type":"mousemove","time":8743,"x":488,"y":347},{"type":"mousemove","time":8944,"x":488,"y":349},{"type":"screenshot","time":9261},{"type":"mousemove","time":9370,"x":487,"y":349},{"type":"mousemove","time":9577,"x":409,"y":363},{"type":"mousemove","time":9783,"x":403,"y":363},{"type":"screenshot","time":9889},{"type":"mousemove","time":9995,"x":402,"y":363},{"type":"mousemove","time":10205,"x":344,"y":353},{"type":"mousemove","time":10413,"x":340,"y":352},{"type":"screenshot","time":10508},{"type":"mousemove","time":10620,"x":334,"y":351},{"type":"mousemove","time":10824,"x":317,"y":355},{"type":"mousemove","time":11027,"x":282,"y":352},{"type":"mousemove","time":11238,"x":277,"y":351},{"type":"mousemove","time":11444,"x":275,"y":351},{"type":"screenshot","time":11517},{"type":"mousemove","time":11653,"x":274,"y":351},{"type":"mousemove","time":11794,"x":273,"y":351},{"type":"mousemove","time":11994,"x":228,"y":351},{"type":"mousemove","time":12194,"x":227,"y":351},{"type":"screenshot","time":12377},{"type":"mousemove","time":12453,"x":227,"y":351},{"type":"mousemove","time":12660,"x":188,"y":348},{"type":"mousemove","time":12864,"x":183,"y":346},{"type":"mousemove","time":13117,"x":183,"y":346},{"type":"mousemove","time":13138,"x":184,"y":346},{"type":"mousemove","time":13341,"x":189,"y":351},{"type":"mousemove","time":13549,"x":190,"y":352},{"type":"screenshot","time":13666},{"type":"mousemove","time":13764,"x":189,"y":350},{"type":"mousemove","time":13967,"x":186,"y":323},{"type":"mousemove","time":14171,"x":186,"y":323},{"type":"mousemove","time":14372,"x":187,"y":324},{"type":"screenshot","time":14449},{"type":"mousemove","time":14487,"x":187,"y":324},{"type":"mousemove","time":14688,"x":204,"y":315},{"type":"mousemove","time":14888,"x":300,"y":254},{"type":"mousemove","time":15092,"x":270,"y":243},{"type":"mousemove","time":15300,"x":270,"y":246},{"type":"screenshot","time":15607},{"type":"mousemove","time":15662,"x":270,"y":246},{"type":"mousemove","time":15863,"x":273,"y":246},{"type":"mousemove","time":16067,"x":430,"y":211},{"type":"mousemove","time":16271,"x":596,"y":228},{"type":"mousemove","time":16475,"x":604,"y":233},{"type":"mousemove","time":16679,"x":605,"y":233},{"type":"mousemove","time":16879,"x":717,"y":200},{"type":"mousemove","time":17079,"x":737,"y":193},{"type":"mousemove","time":17283,"x":752,"y":196},{"type":"mousemove","time":17553,"x":752,"y":196},{"type":"screenshot","time":17783},{"type":"mousemove","time":17820,"x":752,"y":197},{"type":"mousemove","time":18020,"x":767,"y":500},{"type":"mousemove","time":18224,"x":756,"y":436},{"type":"mousemove","time":18429,"x":760,"y":412},{"type":"screenshot","time":19049}],"scrollY":0,"scrollX":0,"timestamp":1694167824332}] \ No newline at end of file diff --git a/test/ssr.html b/test/ssr.html new file mode 100644 index 0000000000..1ddc04974f --- /dev/null +++ b/test/ssr.html @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + +

+ 1. It should have initial animation
+ 2. It should use lighter color when hovering on the bars of a and b series
+ 3. It should toggle the series when clicking the legend
+ 4. It should update the series when clicking the bars
+ 5. The third series is silent so it cannot be lighter when hovering
+

+
+ +

Big data render time

+
+ + + + + + diff --git a/test/sunburst-label-align.html b/test/sunburst-label-align.html new file mode 100644 index 0000000000..4522c75ba8 --- /dev/null +++ b/test/sunburst-label-align.html @@ -0,0 +1,1197 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/sunburst-label.html b/test/sunburst-label.html index 51f2c14ef1..7895a98f84 100644 --- a/test/sunburst-label.html +++ b/test/sunburst-label.html @@ -197,7 +197,12 @@ radius: [0, '90%'], label: { rotate: 'radial' - } + }, + levels: [{}, { + label: { + rotate: 'tangential' + } + }] } }; var chart = testHelper.create(echarts, 'main1', { diff --git a/test/svg-ssr.html b/test/svg-ssr.html index af9a4dab77..c08e02fa7d 100644 --- a/test/svg-ssr.html +++ b/test/svg-ssr.html @@ -41,7 +41,6 @@ - + diff --git a/test/toolbox-textStyle.html b/test/toolbox-textStyle.html index d80a175e6b..1776f05c38 100644 --- a/test/toolbox-textStyle.html +++ b/test/toolbox-textStyle.html @@ -23,32 +23,19 @@ + + - -
+ + - \ No newline at end of file + diff --git a/test/tooltip-appendTo.html b/test/tooltip-appendTo.html new file mode 100644 index 0000000000..644697e17e --- /dev/null +++ b/test/tooltip-appendTo.html @@ -0,0 +1,550 @@ + + + + + + + + + + + + + + + + + + + +

correct position

+
+
+
+
+
+
+ +

3 way to config

+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/tooltip-opacity.html b/test/tooltip-opacity.html new file mode 100644 index 0000000000..03820d4fb4 --- /dev/null +++ b/test/tooltip-opacity.html @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + +

axisPointer link in one echarts instance | after data zoom, link should be normal

+
+ + + + + \ No newline at end of file diff --git a/test/tooltip-valueFormatter.html b/test/tooltip-valueFormatter.html index be4f2270b9..3d48e8e975 100644 --- a/test/tooltip-valueFormatter.html +++ b/test/tooltip-valueFormatter.html @@ -40,7 +40,7 @@
- +
@@ -268,6 +268,43 @@ }); }); + + + diff --git a/test/universalTransition-multiLevelDrillDown.html b/test/universalTransition-multiLevelDrillDown.html new file mode 100644 index 0000000000..7d40d1aafd --- /dev/null +++ b/test/universalTransition-multiLevelDrillDown.html @@ -0,0 +1,476 @@ + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + diff --git a/test/visualMap-multi-continuous.html b/test/visualMap-multi-continuous.html new file mode 100644 index 0000000000..b5945dcea0 --- /dev/null +++ b/test/visualMap-multi-continuous.html @@ -0,0 +1,319 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/theme/package.json b/theme/package.json new file mode 100644 index 0000000000..6a0d2ef2aa --- /dev/null +++ b/theme/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index e44ef3ac08..3d7d3c377b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,6 +23,7 @@ "include": [ "src/**/*.ts", "extension-src/**/*.ts", + "ssr/client/**/*.ts", "test/lib/myTransform/src/**/*.ts" ] } \ No newline at end of file