Compare commits

...

28 Commits

Author SHA1 Message Date
semantic-release-bot
4edb698dc0 chore(release): 1.0.1 [skip ci]
## [1.0.1](https://github.com/qlik-oss/network-vis-chart/compare/v1.0.0...v1.0.1) (2023-08-16)

### Bug Fixes

* trigger patch change ([e1152aa](e1152aa0d9))
2023-08-16 14:12:18 +00:00
caele
e1152aa0d9 fix: trigger patch change 2023-08-16 16:00:55 +02:00
Tobias Åström
8b827b0848 chore: go gh (#48)
* chore: go gh

* chore: remove circle
2023-08-16 13:02:33 +02:00
caele
4409709416 1.0.0 2023-08-15 11:18:56 +02:00
caele
bcaa6b5245 chore: prep legacy readme 2023-08-15 10:12:21 +02:00
caele
1b3d4b54f0 chore: prep readme 2023-08-15 10:11:02 +02:00
caele
be2f235a3b 1.0.0 2023-08-15 10:05:26 +02:00
caele
5378a0421c chore: spec for 1 2023-08-15 10:05:19 +02:00
Tobias Åström
6c7aa95d5b chore: new circleconfig (#43)
* chore: new circleconfig

* chore: clean

* chore: fix

* chore: fixes
2023-05-17 11:10:09 +02:00
Tobias Åström
af798708c4 chore: update dependencies (#42)
* chore: update nebula

* chore: all the deps

* chore: set node
2023-05-17 10:11:41 +02:00
dependabot[bot]
17979fbb5c chore(deps): bump minimist from 1.2.5 to 1.2.8 (#35)
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.8.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.8)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-17 13:03:32 +01:00
dependabot[bot]
42ab574e5f chore(deps): bump nth-check from 2.0.0 to 2.1.1 (#40)
Bumps [nth-check](https://github.com/fb55/nth-check) from 2.0.0 to 2.1.1.
- [Release notes](https://github.com/fb55/nth-check/releases)
- [Commits](https://github.com/fb55/nth-check/compare/v2.0.0...v2.1.1)

---
updated-dependencies:
- dependency-name: nth-check
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-17 11:35:18 +01:00
dependabot[bot]
8f7a4d3221 chore(deps): bump minimatch from 3.0.4 to 3.1.2 (#33)
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-17 11:33:30 +01:00
dependabot[bot]
bb1648d108 chore(deps): bump shelljs from 0.8.4 to 0.8.5 (#39)
Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/shelljs/shelljs/releases)
- [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/shelljs/shelljs/compare/v0.8.4...v0.8.5)

---
updated-dependencies:
- dependency-name: shelljs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-17 11:32:25 +01:00
dependabot[bot]
a217b09cc5 chore(deps): bump follow-redirects from 1.14.3 to 1.15.2 (#38)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.3 to 1.15.2.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.3...v1.15.2)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-17 11:32:00 +01:00
dependabot[bot]
3f86219f9e chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2 (#32)
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-17 11:31:46 +01:00
dependabot[bot]
c67815b42a chore(deps): bump terser from 5.7.2 to 5.16.3 (#36)
Bumps [terser](https://github.com/terser/terser) from 5.7.2 to 5.16.3.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.7.2...v5.16.3)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-17 11:29:57 +01:00
dependabot[bot]
30cfa93a30 chore(deps): bump loader-utils from 1.4.0 to 1.4.2 (#37)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-17 11:29:41 +01:00
Tobias Åström
dd9d75e597 chore: add dependabot 2023-02-17 10:58:40 +01:00
caele
2e7ba1fd41 0.3.0 2022-11-22 15:05:23 +01:00
Tobias Åström
cf47987595 chore: enable systemjs build (#31) 2022-11-22 14:38:42 +01:00
caele
97550cff60 0.2.0 2022-10-06 15:24:21 +02:00
Li Kang
164d6f4325 fix: eslint error (#30) 2022-07-29 20:04:18 +02:00
Ashish Yadav
f9153aaed9 Update tooltip.js (#29)
* Update tooltip.js

Qlik Cloud: Network charts showing tags when howering

* fix: unit test cases added

* Update package.json

Static version changed

* Update package.json

static version updated

* Update package.json

* Update package.json

Co-authored-by: “Ashishyadav13” <“Ivb@qlik.com”>
2022-07-29 11:11:47 +02:00
Tobias Åström
020290a1b7 chore: statement on legacy release 2021-10-21 13:26:23 +02:00
Tobias Åström
155eac826d Merge pull request #28 from qlik-oss/network-next
Network next
2021-10-18 13:10:43 +02:00
Tobias Åström
abc2f151aa Merge branch 'master' into network-next 2021-10-18 13:09:00 +02:00
Tobias Åström
58e89efbb0 chore: add network-next 2021-09-08 14:06:59 +02:00
19 changed files with 5401 additions and 3849 deletions

View File

@@ -1,45 +0,0 @@
version: 2
defaults: &defaults
working_directory: ~/qlik-network-chart
docker:
- image: circleci/node:stretch
environment:
GITHUB_ORG: "qlik-oss"
GITHUB_REPO: "network-vis-chart"
PACKAGE_NAME: "qlik-network-chart"
jobs:
build:
docker:
- image: circleci/node:stretch-browsers
steps:
- checkout
- run:
name: Install dependencies
command: yarn
- run:
name: Lint
command: yarn eslint
- run:
name: BlackDuck scan
command: curl -s https://detect.synopsys.com/detect.sh | bash -s -- \
--blackduck.url="https://qliktech.blackducksoftware.com" \
--blackduck.trust.cert=true \
--blackduck.username="svc-blackduck" \
--blackduck.password=${svc_blackduck} \
--detect.project.name="viz-bundle-qlik-network-chart"
- run:
name: Build
command: yarn build && yarn sense
environment:
NODE_ENV: production
- store_artifacts:
path: dist
destination: dist
workflows:
version: 2
master_flow:
jobs:
- build

19
.codeclimate.yml Normal file
View File

@@ -0,0 +1,19 @@
version: "2"
checks:
method-lines:
config:
threshold: 100
method-complexity:
config:
threshold: 10
similar-code:
config:
threshold: 65
identical-code:
config:
threshold: 65
exclude_patterns:
- "src/**/*.test.ts"
- "src/**/*.test.tsx"
- "*config*"
- "test/**/__fixtures__"

View File

@@ -3,15 +3,15 @@ module.exports = {
ecmaVersion: 6,
ecmaFeatures: {
jsx: true,
modules: true
modules: true,
},
sourceType: "module"
sourceType: "module",
},
parser: "babel-eslint",
parser: "@babel/eslint-parser",
env: {
browser: true,
es6: true,
node: true
node: true,
},
globals: {
$: false,
@@ -21,41 +21,48 @@ module.exports = {
document: false,
expect: false,
it: false,
require: false
require: false,
},
rules: {
"indent": ["error", 2, { "SwitchCase": 1 }],
indent: ["error", 2, { SwitchCase: 1 }],
"linebreak-style": ["error", "unix"],
"object-curly-spacing": ["error", "always"],
"max-lines": ["warn", 300],
"max-len": ["warn", 120],
"no-console": ["warn"],
"no-mixed-operators": ["warn", {
"groups": [
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
["&&", "||"],
["in", "instanceof"]
],
"allowSamePrecedence": true
}],
"no-mixed-operators": [
"warn",
{
groups: [
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
["&&", "||"],
["in", "instanceof"],
],
allowSamePrecedence: true,
},
],
"no-multi-spaces": ["error"],
"no-cond-assign": ["warn"],
"no-fallthrough": ["warn"],
"no-undef": ["warn"],
"no-unused-vars": ["error"],
"no-use-before-define": ["warn", { "functions": false, "classes": false, "variables": false }],
"no-use-before-define": [
"warn",
{ functions: false, classes: false, variables: false },
],
"no-useless-escape": ["warn"],
"no-useless-return": ["warn"],
"no-underscore-dangle": ["warn", { "allow": ["_id"] }],
"no-underscore-dangle": ["warn", { allow: ["_id"] }],
"no-redeclare": ["warn"],
"no-restricted-syntax": ["warn"],
"operator-linebreak": ["warn", "before"],
"prefer-promise-reject-errors": ["warn"],
"padded-blocks": ["warn", { "blocks": "never", "switches": "never", "classes": "never" }],
"semi": ["error", "always"],
"valid-typeof": ["warn"]
"padded-blocks": [
"warn",
{ blocks: "never", switches: "never", classes: "never" },
],
semi: ["error", "always"],
"valid-typeof": ["warn"],
},
extends: [
"eslint:recommended"
]
}
extends: ["eslint:recommended"],
};

11
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "yarn" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

22
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: Build
on:
workflow_dispatch:
inputs:
release:
type: boolean
required: true
default: false
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
uses: qlik-oss/sn-gh-workflows/.github/workflows/build.yaml@v1
secrets: inherit
with:
release: ${{ inputs.release || false}}
api_specification_path: api-specifications/properties.json

17
.github/workflows/semantic.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: "Semantic PR"
on:
pull_request_target:
types:
- opened
- edited
- synchronize
jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2
.gitignore vendored
View File

@@ -3,3 +3,5 @@ dist/
BUMPED_VERSION
sn-network-chart-ext/
core/esm
coverage
yarn-error.log

View File

@@ -1,136 +1,164 @@
{
"scriptappy": "1.0.0",
"scriptappy": "1.1.0",
"info": {
"name": "sn-network-chart:properties",
"name": "@nebula.js/sn-network-chart:properties",
"description": "Network chart generic object definition",
"version": "0.0.1",
"version": "1.0.1",
"license": "MIT",
"stability": "experimental",
"x-qlik-visibility": "public"
},
"entries": {},
"definitions": {
"module.exports.displayEdgeLabel": {
"optional": true,
"defaultValue": false,
"type": "boolean"
},
"module.exports.edgeType": {
"optional": true,
"defaultValue": "dynamic",
"kind": "union",
"items": [
{
"kind": "literal",
"value": "'dynamic'"
"entries": {
"properties": {
"kind": "function",
"params": [],
"entries": {
"version": {
"description": "Current version of this generic object definition",
"type": "string"
},
{
"kind": "literal",
"value": "'continuous'"
"qHyperCubeDef": {
"description": "Extends `HyperCubeDef`, see Engine API: `HyperCubeDef`.",
"extends": [
{
"type": "HyperCubeDef"
}
],
"kind": "object"
},
{
"kind": "literal",
"value": "'discrete'"
"showTitles": {
"optional": true,
"defaultValue": false,
"type": "boolean"
},
{
"kind": "literal",
"value": "'diagonalCross'"
"title": {
"optional": true,
"defaultValue": "",
"type": "string"
},
{
"kind": "literal",
"value": "'straightCross'"
"subtitle": {
"optional": true,
"defaultValue": "",
"type": "string"
},
{
"kind": "literal",
"value": "'horizontal'"
"footnote": {
"optional": true,
"defaultValue": "",
"type": "string"
},
{
"kind": "literal",
"value": "'vertical'"
"edgeType": {
"optional": true,
"defaultValue": "dynamic",
"kind": "union",
"items": [
{
"kind": "literal",
"value": "'dynamic'"
},
{
"kind": "literal",
"value": "'continuous'"
},
{
"kind": "literal",
"value": "'discrete'"
},
{
"kind": "literal",
"value": "'diagonalCross'"
},
{
"kind": "literal",
"value": "'straightCross'"
},
{
"kind": "literal",
"value": "'horizontal'"
},
{
"kind": "literal",
"value": "'vertical'"
},
{
"kind": "literal",
"value": "'curvedCW'"
},
{
"kind": "literal",
"value": "'curvedCCW'"
},
{
"kind": "literal",
"value": "'cubicBezier'"
}
]
},
{
"kind": "literal",
"value": "'curvedCW'"
"displayEdgeLabel": {
"optional": true,
"defaultValue": false,
"type": "boolean"
},
{
"kind": "literal",
"value": "'curvedCCW'"
"posEdgeLabel": {
"optional": true,
"defaultValue": "top",
"kind": "union",
"items": [
{
"kind": "literal",
"value": "'top'"
},
{
"kind": "literal",
"value": "'middle'"
},
{
"kind": "literal",
"value": "'bottom'"
},
{
"kind": "literal",
"value": "'horizontal'"
}
]
},
{
"kind": "literal",
"value": "'cubicBezier'"
"nodeShape": {
"optional": true,
"defaultValue": "dot",
"kind": "union",
"items": [
{
"kind": "literal",
"value": "'dot'"
},
{
"kind": "literal",
"value": "'square'"
},
{
"kind": "literal",
"value": "'star'"
},
{
"kind": "literal",
"value": "'triangle'"
},
{
"kind": "literal",
"value": "'triangleDown'"
},
{
"kind": "literal",
"value": "'diamond'"
}
]
},
"shadowMode": {
"optional": true,
"defaultValue": false,
"type": "boolean"
}
],
"type": "string"
},
"module.exports.nodeShape": {
"optional": true,
"defaultValue": "dot",
"kind": "union",
"items": [
{
"kind": "literal",
"value": "'dot'"
},
{
"kind": "literal",
"value": "'square'"
},
{
"kind": "literal",
"value": "'star'"
},
{
"kind": "literal",
"value": "'triangle'"
},
{
"kind": "literal",
"value": "'triangleDown'"
},
{
"kind": "literal",
"value": "'diamond'"
}
],
"type": "string"
},
"module.exports.posEdgeLabel": {
"optional": true,
"defaultValue": "top",
"kind": "union",
"items": [
{
"kind": "literal",
"value": "'top'"
},
{
"kind": "literal",
"value": "'middle'"
},
{
"kind": "literal",
"value": "'bottom'"
},
{
"kind": "literal",
"value": "'horizontal'"
}
],
"type": "string"
},
"module.exports.qHyperCubeDef": {
"kind": "object",
"entries": {}
},
"module.exports.shadowMode": {
"optional": true,
"defaultValue": false,
"type": "boolean"
},
"module.exports.version": {
"description": "Current version of this generic object definition",
"type": "string"
}
}
}
},
"definitions": {}
}

3
babel.config.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = {
presets: ['@babel/preset-env'],
};

196
jest.config.js Normal file
View File

@@ -0,0 +1,196 @@
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*/
module.exports = {
// All imported modules in your tests should be mocked automatically
// automock: false,
// Stop running tests after `n` failures
// bail: 0,
// The directory where Jest should store its cached dependency information
// cacheDirectory: "/private/var/folders/dc/j98t7yvj11n21psdq_xy0y8snk5538/T/jest_tq54ko",
// Automatically clear mock calls, instances and results before every test
// clearMocks: false,
// Indicates whether the coverage information should be collected while executing the test
collectCoverage: true,
// An array of glob patterns indicating a set of files for which coverage information should be collected
// collectCoverageFrom: undefined,
// The directory where Jest should output its coverage files
coverageDirectory: "coverage",
// An array of regexp pattern strings used to skip coverage collection
// coveragePathIgnorePatterns: [
// "/node_modules/"
// ],
// Indicates which provider should be used to instrument code for coverage
// coverageProvider: "babel",
// A list of reporter names that Jest uses when writing coverage reports
// coverageReporters: [
// "json",
// "text",
// "lcov",
// "clover"
// ],
// An object that configures minimum threshold enforcement for coverage results
// coverageThreshold: undefined,
// A path to a custom dependency extractor
// dependencyExtractor: undefined,
// Make calling deprecated APIs throw helpful error messages
// errorOnDeprecated: false,
// Force coverage collection from ignored files using an array of glob patterns
// forceCoverageMatch: [],
// A path to a module which exports an async function that is triggered once before all test suites
// globalSetup: undefined,
// A path to a module which exports an async function that is triggered once after all test suites
// globalTeardown: undefined,
// A set of global variables that need to be available in all test environments
// globals: {},
// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
// maxWorkers: "50%",
// An array of directory names to be searched recursively up from the requiring module's location
// moduleDirectories: [
// "node_modules"
// ],
// An array of file extensions your modules use
// moduleFileExtensions: [
// "js",
// "jsx",
// "ts",
// "tsx",
// "json",
// "node"
// ],
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
// moduleNameMapper: {},
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
// modulePathIgnorePatterns: [],
// Activates notifications for test results
// notify: false,
// An enum that specifies notification mode. Requires { notify: true }
// notifyMode: "failure-change",
// A preset that is used as a base for Jest's configuration
// preset: undefined,
// Run tests from one or more projects
// projects: undefined,
// Use this configuration option to add custom reporters to Jest
// reporters: undefined,
// Automatically reset mock state before every test
// resetMocks: false,
// Reset the module registry before running each individual test
// resetModules: false,
// A path to a custom resolver
// resolver: undefined,
// Automatically restore mock state and implementation before every test
// restoreMocks: false,
// The root directory that Jest should scan for tests and modules within
// rootDir: undefined,
// A list of paths to directories that Jest should use to search for files in
// roots: [
// "<rootDir>"
// ],
// Allows you to use a custom runner instead of Jest's default test runner
// runner: "jest-runner",
// The paths to modules that run some code to configure or set up the testing environment before each test
// setupFiles: [],
// A list of paths to modules that run some code to configure or set up the testing framework before each test
setupFilesAfterEnv: ["<rootDir>/jest/setup.js"],
// The number of seconds after which a test is considered as slow and reported as such in the results.
// slowTestThreshold: 5,
// A list of paths to snapshot serializer modules Jest should use for snapshot testing
// snapshotSerializers: [],
// The test environment that will be used for testing
testEnvironment: "jsdom",
// Options that will be passed to the testEnvironment
// testEnvironmentOptions: {},
// Adds a location field to test results
// testLocationInResults: false,
// The glob patterns Jest uses to detect test files
//"**/src/**/__tests__/*.test.ts?(x)",
testMatch: ["<rootDir>/src/_test/*.jest.test.js?(x)"],
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
// testPathIgnorePatterns: [
// "/node_modules/"
// ],
// The regexp pattern or array of patterns that Jest uses to detect test files
// testRegex: [],
// This option allows the use of a custom results processor
// testResultsProcessor: undefined,
// This option allows use of a custom test runner
// testRunner: "jest-circus/runner",
// This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
// testURL: "http://localhost",
// Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
// timers: "real",
// A map from regular expressions to paths to transformers
// transform: undefined,
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [
// "/node_modules/",
// "\\.pnp\\.[^\\/]+$"
// ],
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
// unmockedModulePathPatterns: undefined,
// Indicates whether each individual test should be reported during the run
// verbose: undefined,
// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
// watchPathIgnorePatterns: [],
// Whether to use watchman for file crawling
// watchman: true,
moduleNameMapper: {
"\\.(css|less)$": "<rootDir>/src/tests/jest/mocks/css-mock.js"
}
};

1
jest/setup.js Normal file
View File

@@ -0,0 +1 @@
import '@testing-library/jest-dom';

View File

@@ -1,6 +1,6 @@
{
"name": "@nebula.js/sn-network-chart",
"version": "0.1.0",
"version": "1.0.1",
"description": "Displays hierarchical or relational dimensions as nodes and edges´, with measures to show the significance of its links.",
"homepage": "",
"repository": "https://github.com/qlik-oss/network-vis-chart",
@@ -13,7 +13,8 @@
"build": "nebula build --core core",
"sense": "nebula sense --meta resources/meta.json && shx cp resources/network_chart_v1.png sn-network-chart-ext",
"eslint": "eslint src",
"spec": "scriptappy-from-jsdoc -c ./spec-configs/props.conf.js",
"spec": "sy from-jsdoc -c ./spec-configs/props.conf.js",
"test:unit": "jest",
"prepublishOnly": "shx rm -rf dist && shx rm -rf core/esm && shx rm -rf sn-network-chart-ext && yarn build && yarn sense"
},
"files": [
@@ -23,20 +24,26 @@
"sn-network-chart-ext"
],
"main": "dist/sn-network-chart.js",
"systemjs": "dist/sn-network-chart.systemjs.js",
"devDependencies": {
"@nebula.js/cli": "1.7.0",
"@nebula.js/cli-build": "1.7.0",
"@nebula.js/cli-sense": "1.7.0",
"@nebula.js/cli-serve": "1.7.0",
"@nebula.js/stardust": "1.7.0",
"babel-eslint": "10.1.0",
"scriptappy-from-jsdoc": "^0.7.0",
"eslint": "7.32.0",
"shx": "^0.3.3",
"vis-network": "9.1.0",
"vis-data": "^7.0.0"
"@nebula.js/cli": "4.0.3",
"@nebula.js/cli-build": "4.0.3",
"@nebula.js/cli-sense": "4.0.3",
"@nebula.js/cli-serve": "4.0.3",
"@nebula.js/stardust": "4.0.3",
"@testing-library/jest-dom": "5.16.5",
"@babel/eslint-parser": "7.21.8",
"eslint": "8.40.0",
"jest": "29.5.0",
"jest-environment-jsdom": "29.5.0",
"jest-junit": "^16.0.0",
"@scriptappy/cli": "0.8.0",
"@scriptappy/from-jsdoc": "0.17.0",
"shx": "0.3.4",
"vis-data": "7.1.6",
"vis-network": "9.1.6"
},
"peerDependencies": {
"@nebula.js/stardust": ">=1.0.0"
"@nebula.js/stardust": ">=1.7.0"
}
}

View File

@@ -1,6 +1,6 @@
# @nebula.js/sn-network-chart
# sn-network-chart
The network chart is built using [visjs network visualization](https://github.com/visjs/vis-network) to display networks of nodes and edges. It was originally forked from [miclae76/network-vis-chart](miclae76/network-vis-chart) and has since been converted to use Nebula.
A network chart to be used with nebula.js, built using [visjs network visualization](https://github.com/visjs/vis-network) to display networks of nodes and edges.
## Requirements

4
readme_legacy.md Normal file
View File

@@ -0,0 +1,4 @@
## Legacy build
The chart before Nebula conversion and dependency updates can be found on the *release/legacy* branch.
Originally forked from [miclae76/network-vis-chart](miclae76/network-vis-chart) and has since been converted to use Nebula.

View File

@@ -3,24 +3,25 @@ const path = require('path');
const pkg = require(path.resolve(__dirname, '../package.json')); // eslint-disable-line
module.exports = {
glob: ['./src/extension/properties.js'],
package: path.resolve(__dirname, '../package.json'),
glob: ["./src/extension/properties.js"],
package: path.resolve(__dirname, "../package.json"),
api: {
stability: 'experimental',
stability: "experimental",
properties: {
'x-qlik-visibility': 'public',
"x-qlik-visibility": "public",
},
visibility: 'public',
visibility: "public",
name: `${pkg.name}:properties`,
version: pkg.version,
description: 'Network chart generic object definition',
description: "Network chart generic object definition",
},
output: {
file: path.resolve(__dirname, '../api-specifications/properties.json'),
file: path.resolve(__dirname, "../api-specifications/properties.json"),
},
parse: {
types: {
NxMeasure: {},
HyperCubeDef: {},
},
},
};

View File

@@ -0,0 +1,11 @@
import { createTooltipHTML } from "../tooltip";
describe("createTooltipHTML", () => {
it("Testing createTooltipHtml function - Name- GroupNumber- nodeMeasure", () => {
expect(
createTooltipHTML({ name: "Venice", groupNumber: 1, nodeMeasure: 2 })
).toContainHTML(
"<div><div><span>Name: </span><b>Venice</b></div><div><span>Group number: </span><b>1</b></div><div><span>Node measure: </span><b>2</b></div></div>"
);
});
});

View File

@@ -1,36 +1,43 @@
export default {
/**
* @typedef {object}
* @entry
*/
const properties = {
/**
* Current version of this generic object definition
* @type {string}
*/
version: process.env.PACKAGE_VERSION,
/**
* @typedef
* Extends `HyperCubeDef`, see Engine API: `HyperCubeDef`.
* @extends {HyperCubeDef}
*/
qHyperCubeDef: {
qDimensions: [],
qMeasures: [],
qInitialDataFetch: [{
qWidth: 7,
qHeight: 1400
}]
qInitialDataFetch: [
{
qWidth: 7,
qHeight: 1400,
},
],
},
/**
* @type {boolean=}
*/
* @type {boolean=}
*/
showTitles: false,
/**
* @type {string=}
*/
title: '',
* @type {string=}
*/
title: "",
/**
* @type {string=}
*/
subtitle: '',
* @type {string=}
*/
subtitle: "",
/**
* @type {string=}
*/
footnote: '',
* @type {string=}
*/
footnote: "",
/**
* @type {('dynamic'|'continuous'|'discrete'|'diagonalCross'|'straightCross'|'horizontal'|'vertical'|'curvedCW'|'curvedCCW'|'cubicBezier')=}
*/
@@ -51,4 +58,6 @@ export default {
* @type {boolean=}
*/
shadowMode: false,
};
};
export default properties;

View File

@@ -24,5 +24,5 @@ export function createTooltipHTML({ name, groupNumber, nodeMeasure }) {
tooltip.appendChild(groupNumberEntry);
tooltip.appendChild(nodeMeasureEntry);
return tooltip.innerHTML;
return tooltip;
}

8503
yarn.lock

File diff suppressed because it is too large Load Diff