ngx-vis 5.0.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(npm install:*)",
5
+ "Bash(npm view:*)",
6
+ "Bash(grep -E \"\\\\.\\(json|js|ts\\)$|browserslist\")",
7
+ "Bash(npm test:*)",
8
+ "Bash(node -e \"const p = require\\(''''puppeteer''''\\); console.log\\(typeof p.executablePath\\(\\), p.executablePath\\(\\)\\)\")",
9
+ "Bash(npm run:*)",
10
+ "Bash(gh issue:*)"
11
+ ]
12
+ }
13
+ }
@@ -0,0 +1,7 @@
1
+ module.exports = {
2
+ extends: ['@commitlint/config-conventional'],
3
+ rules: {
4
+ 'scope-case': () => [0, "never"],
5
+ 'subject-case': () => [0, "never"],
6
+ }
7
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @author: @AngularClass
3
+ */
4
+ 'use strict';
5
+ var path = require('path');
6
+
7
+ // Helper functions
8
+ var ROOT = process.cwd();
9
+
10
+ console.log('root directory:', root() + '\n');
11
+
12
+ function hasProcessFlag(flag) {
13
+ return process.argv.join('').indexOf(flag) > -1;
14
+ }
15
+
16
+ function root(args) {
17
+ /* eslint-disable */
18
+ args = Array.prototype.slice.call(arguments, 0);
19
+ return path.join.apply(path, [ROOT].concat(args));
20
+ }
21
+
22
+ function excludeIndexHtml(src, htmlIndexes) {
23
+ return htmlIndexes.map(function (str) {
24
+ return root(path.join(src, str));
25
+ });
26
+ }
27
+
28
+ exports.hasProcessFlag = hasProcessFlag;
29
+ exports.root = root;
30
+ exports.excludeIndexHtml = excludeIndexHtml;
@@ -0,0 +1,76 @@
1
+ var webpack = require('webpack');
2
+ var helpers = require('./helpers');
3
+ var HtmlWebpackPlugin = require('html-webpack-plugin');
4
+ var MiniCssExtractPlugin = require('mini-css-extract-plugin');
5
+ var CopyWebpackPlugin = require('copy-webpack-plugin');
6
+ const AngularCompilerPlugin = require('@ngtools/webpack').AngularWebpackPlugin;
7
+
8
+ module.exports = {
9
+ entry: {
10
+ polyfills: helpers.root('demo', 'polyfills.ts'),
11
+ vendor: helpers.root('demo', 'vendor.ts'),
12
+ app: helpers.root('demo', 'index.ts'),
13
+ },
14
+
15
+ resolve: {
16
+ extensions: ['.ts', '.js'],
17
+ },
18
+
19
+ module: {
20
+ rules: [
21
+ {
22
+ test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/,
23
+ loader: '@ngtools/webpack',
24
+ exclude: [/\.e2e\.ts$/],
25
+ },
26
+ {
27
+ test: /\.html$/,
28
+ loader: 'html-loader',
29
+ },
30
+ {
31
+ test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
32
+ loader: 'file-loader',
33
+ options: {
34
+ name: 'assets/[name].[fullhash].[ext]',
35
+ },
36
+ },
37
+ {
38
+ test: /\.css$/,
39
+ use: [
40
+ {
41
+ loader: MiniCssExtractPlugin.loader,
42
+ options: {
43
+ // you can specify a publicPath here
44
+ // by default it use publicPath in webpackOptions.output
45
+ publicPath: '../',
46
+ },
47
+ },
48
+ 'css-loader',
49
+ ],
50
+ },
51
+ ],
52
+ },
53
+
54
+ plugins: [
55
+ // Workaround for angular/angular#11580
56
+ new webpack.ContextReplacementPlugin(
57
+ // The (\\|\/) piece accounts for path separators in *nix and Windows
58
+ /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
59
+ helpers.root('./demo'), // location of your src
60
+ {} // a map of your routes
61
+ ),
62
+
63
+ new HtmlWebpackPlugin({
64
+ template: helpers.root('demo', 'index.html'),
65
+ }),
66
+
67
+ new CopyWebpackPlugin({ patterns: [
68
+ { from: helpers.root('demo', 'assets'), to: 'assets' }
69
+ ]}),
70
+
71
+ new AngularCompilerPlugin({
72
+ tsConfigPath: './tsconfig.json',
73
+ entryModule: './demo/demo.module.ts#AppModule',
74
+ }),
75
+ ],
76
+ };
@@ -0,0 +1,38 @@
1
+ var webpackMerge = require('webpack-merge');
2
+ var MiniCssExtractPlugin = require('mini-css-extract-plugin');
3
+ var commonConfig = require('./webpack.common.js');
4
+ var helpers = require('./helpers');
5
+
6
+ module.exports = webpackMerge(commonConfig, {
7
+ devtool: 'source-map',
8
+
9
+ output: {
10
+ path: helpers.root('dist'),
11
+ publicPath: 'http://localhost:8080/',
12
+ filename: '[name].js',
13
+ chunkFilename: '[id].chunk.js',
14
+ },
15
+
16
+ plugins: [
17
+ new MiniCssExtractPlugin({
18
+ // Options similar to the same options in webpackOptions.output
19
+ // both options are optional
20
+ filename: "[name].css",
21
+ chunkFilename: "[id].css"
22
+ })
23
+ ],
24
+
25
+ devServer: {
26
+ hot: true,
27
+ historyApiFallback: true,
28
+ stats: 'minimal',
29
+ watchContentBase: true,
30
+ },
31
+
32
+ /**
33
+ * Configure mode so that webpack can optimize the bundle accordingly
34
+ *
35
+ * See: https://webpack.js.org/configuration/mode/
36
+ */
37
+ mode: 'development'
38
+ });
@@ -0,0 +1,13 @@
1
+ const { merge } = require('webpack-merge');
2
+ const commonConfig = require('./webpack.prod.js');
3
+ const helpers = require('./helpers');
4
+
5
+ module.exports = merge(commonConfig, {
6
+ mode: 'production',
7
+ output: {
8
+ path: helpers.root('docs'),
9
+ publicPath: 'https://visjs.github.io/ngx-vis',
10
+ filename: '[name].[fullhash].js',
11
+ chunkFilename: '[id].[fullhash].chunk.js',
12
+ }
13
+ });
@@ -0,0 +1,197 @@
1
+ /**
2
+ * @author: @AngularClass
3
+ */
4
+
5
+ const path = require('path');
6
+ const helpers = require('./helpers');
7
+
8
+ /**
9
+ * Webpack Plugins
10
+ */
11
+ const DefinePlugin = require('webpack/lib/DefinePlugin');
12
+ const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin');
13
+ const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin');
14
+ const AngularCompilerPlugin = require('@ngtools/webpack').AngularWebpackPlugin;
15
+
16
+ /**
17
+ * Webpack Constants
18
+ */
19
+ const ENV = (process.env.ENV = process.env.NODE_ENV = 'test');
20
+
21
+ /**
22
+ * Webpack configuration
23
+ *
24
+ * See: http://webpack.github.io/docs/configuration.html#cli
25
+ */
26
+ module.exports = function (options) {
27
+ return {
28
+ entry: path.resolve(__dirname, '../dist'),
29
+ /**
30
+ * Source map for Karma from the help of karma-sourcemap-loader & karma-webpack
31
+ *
32
+ * Do not change, leave as is or it wont work.
33
+ * See: https://github.com/webpack/karma-webpack#source-maps
34
+ */
35
+ devtool: 'inline-source-map',
36
+
37
+ /**
38
+ * Options affecting the resolving of modules.
39
+ *
40
+ * See: http://webpack.github.io/docs/configuration.html#resolve
41
+ */
42
+ resolve: {
43
+ /**
44
+ * An array of extensions that should be used to resolve modules.
45
+ *
46
+ * See: http://webpack.github.io/docs/configuration.html#resolve-extensions
47
+ */
48
+ extensions: ['.ts', '.js'],
49
+
50
+ /**
51
+ * Make sure root is src
52
+ */
53
+ modules: ['node_modules'],
54
+ },
55
+
56
+ /**
57
+ * Options affecting the normal modules.
58
+ *
59
+ * See: http://webpack.github.io/docs/configuration.html#module
60
+ *
61
+ * 'use:' revered back to 'loader:' as a temp. workaround for #1188
62
+ * See: https://github.com/AngularClass/angular2-webpack-starter/issues/1188#issuecomment-262872034
63
+ */
64
+ module: {
65
+ rules: [
66
+ {
67
+ test: /(\.ts)$/,
68
+ loader: '@ngtools/webpack',
69
+ },
70
+ /**
71
+ * Source map loader support for *.js files
72
+ * Extracts SourceMaps for source files that as added as sourceMappingURL comment.
73
+ *
74
+ * See: https://github.com/webpack/source-map-loader
75
+ */
76
+ {
77
+ enforce: 'pre',
78
+ test: /\.js$/,
79
+ loader: 'source-map-loader',
80
+ exclude: [
81
+ // these packages have problems with their sourcemaps
82
+ helpers.root('node_modules/rxjs'),
83
+ helpers.root('node_modules/@angular'),
84
+ ],
85
+ },
86
+ /**
87
+ * Raw loader support for *.css files
88
+ * Returns file content as string
89
+ *
90
+ * See: https://github.com/webpack/raw-loader
91
+ */
92
+ {
93
+ test: /\.css$/,
94
+ use: ['to-string-loader', 'css-loader'],
95
+ exclude: [helpers.root('demo/index.html')],
96
+ },
97
+
98
+ /**
99
+ * Raw loader support for *.html
100
+ * Returns file content as string
101
+ *
102
+ * See: https://github.com/webpack/raw-loader
103
+ */
104
+ {
105
+ test: /\.html$/,
106
+ loader: 'raw-loader',
107
+ exclude: [helpers.root('demo/index.html')],
108
+ },
109
+ ],
110
+ },
111
+
112
+ /**
113
+ * Add additional plugins to the compiler.
114
+ *
115
+ * See: http://webpack.github.io/docs/configuration.html#plugins
116
+ */
117
+ plugins: [
118
+ /**
119
+ * Plugin: DefinePlugin
120
+ * Description: Define free variables.
121
+ * Useful for having development builds with debug logging or adding global constants.
122
+ *
123
+ * Environment helpers
124
+ *
125
+ * See: https://webpack.github.io/docs/list-of-plugins.html#defineplugin
126
+ */
127
+ // NOTE: when adding more properties make sure you include them in custom-typings.d.ts
128
+ new DefinePlugin({
129
+ ENV: JSON.stringify(ENV),
130
+ HMR: false,
131
+ 'process.env': {
132
+ ENV: JSON.stringify(ENV),
133
+ HMR: false,
134
+ },
135
+ }),
136
+
137
+ /**
138
+ * Plugin: ContextReplacementPlugin
139
+ * Description: Provides context to Angular's use of System.import
140
+ *
141
+ * See: https://webpack.github.io/docs/list-of-plugins.html#contextreplacementplugin
142
+ * See: https://github.com/angular/angular/issues/11580
143
+ */
144
+ new ContextReplacementPlugin(
145
+ // The (\\|\/) piece accounts for path separators in *nix and Windows
146
+ /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
147
+ helpers.root('demo'), // location of your src
148
+ {
149
+ // your Angular Async Route paths relative to this root directory
150
+ }
151
+ ),
152
+
153
+ /**
154
+ * Plugin LoaderOptionsPlugin (experimental)
155
+ *
156
+ * See: https://gist.github.com/sokra/27b24881210b56bbaff7
157
+ */
158
+ new LoaderOptionsPlugin({
159
+ debug: false,
160
+ options: {
161
+ // legacy options go here
162
+ },
163
+ }),
164
+
165
+ new AngularCompilerPlugin({
166
+ tsConfigPath: './tsconfig.json',
167
+ entryModule: './demo/demo.module.ts#AppModule',
168
+ }),
169
+ ],
170
+
171
+ /**
172
+ * Disable performance hints
173
+ *
174
+ * See: https://github.com/a-tarasyuk/rr-boilerplate/blob/master/webpack/dev.config.babel.js#L41
175
+ */
176
+ performance: {
177
+ hints: false,
178
+ },
179
+
180
+ /**
181
+ * Include polyfills or mocks for various node stuff
182
+ * Description: Node configuration
183
+ *
184
+ * See: https://webpack.github.io/docs/configuration.html#node
185
+ */
186
+ node: {
187
+ global: true,
188
+ },
189
+
190
+ /**
191
+ * Configure mode so that webpack can optimize the bundle accordingly
192
+ *
193
+ * See: https://webpack.js.org/configuration/mode/
194
+ */
195
+ mode: 'development',
196
+ };
197
+ };
package/.eslintrc.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "parserOptions": {
3
+ "ecmaVersion": 6,
4
+ "sourceType": "module"
5
+ },
6
+ "rules": {
7
+ "semi": 2
8
+ },
9
+ "env": {
10
+ "node": true
11
+ }
12
+ }
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+
5
+ ---
6
+
7
+ ## Prerequisites
8
+
9
+ Please answer the following questions for yourself before submitting an issue.
10
+
11
+ - [ ] I am running the latest version
12
+ - [ ] I checked the documentation and found no answer
13
+ - [ ] I checked to make sure that this issue has not already been filed
14
+ - [ ] I'm reporting the issue to the correct repository
15
+
16
+ ## Current Behavior
17
+
18
+ <!-- What is the current behavior? -->
19
+
20
+ ## Expected Behavior
21
+
22
+ <!-- Please describe the behavior you are expecting -->
23
+
24
+ ## Failure Information
25
+
26
+ <!-- Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template. -->
27
+
28
+ ### Steps to Reproduce
29
+
30
+ Please provide detailed steps for reproducing the issue.
31
+
32
+ 1. step 1
33
+ 2. step 2
34
+ 3. you get it...
35
+
36
+ ### Reproduce code snippet
37
+
38
+ ...
39
+
40
+ ### Context
41
+
42
+ Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
43
+
44
+ * Angular version:
45
+ * NodeJS version:
46
+ * Operating System:
47
+
48
+ ### Failure Logs
49
+ ```
50
+
51
+ ```
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+
5
+ ---
6
+
7
+ **Is your feature request related to a problem? Please describe.**
8
+ <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
9
+
10
+ **Describe the solution you'd like**
11
+ <!-- A clear and concise description of what you want to happen. -->
12
+
13
+ **Describe alternatives you've considered**
14
+ <!-- A clear and concise description of any alternative solutions or features you've considered. -->
15
+
16
+ **Additional context**
17
+ <!-- Add any other context or screenshots about the feature request here. -->
@@ -0,0 +1,35 @@
1
+ ## :memo: Description
2
+
3
+ <!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. -->
4
+
5
+ ### :dart: Relevant issues
6
+ <!-- Please add relevant opened issues -->
7
+
8
+ ### :gem: Type of change
9
+
10
+ <!-- Please delete options that are not relevant. -->
11
+
12
+ - [ ] Bug fix (non-breaking change which fixes an issue)
13
+ - [ ] New feature (non-breaking change which adds functionality)
14
+ - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
15
+ - [ ] This change requires a documentation update
16
+
17
+ ### :scroll: Example code
18
+ ```js
19
+
20
+ ```
21
+
22
+ ## :vertical_traffic_light: How Has This Been Tested?
23
+
24
+ Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
25
+
26
+ - [ ] Test A
27
+ - [ ] Test B
28
+
29
+ ## :checkered_flag: Checklist:
30
+
31
+ - [ ] My code follows the style guidelines of this project
32
+ - [ ] I have performed a self-review of my own code
33
+ - [ ] **I have added tests that prove my fix is effective or that my feature works**
34
+ - [ ] **New and existing unit tests pass locally with my changes**
35
+ - [ ] I have commented my code, particularly in hard-to-understand areas
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ 24