@hpcc-js/dgrid-shim 3.3.3 → 3.4.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.
package/LICENSE CHANGED
@@ -1,43 +1,43 @@
1
- HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems.
2
-
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
-
7
- http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
13
- limitations under the License.
14
-
15
-
16
- Intersection Algorithms Provided by Kevin Lindsey
17
- Copyright (c) 2000-2011, Kevin Lindsey
18
- All rights reserved.
19
-
20
- Redistribution and use in source and binary forms, with or without
21
- modification, are permitted provided that the following conditions are met:
22
-
23
- - Redistributions of source code must retain the above copyright notice,
24
- this list of conditions and the following disclaimer.
25
-
26
- - Redistributions in binary form must reproduce the above copyright
27
- notice, this list of conditions and the following disclaimer in the
28
- documentation and/or other materials provided with the distribution.
29
-
30
- - Neither the name of this software nor the names of its contributors
31
- may be used to endorse or promote products derived from this software
32
- without specific prior written permission.
33
-
34
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
35
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
36
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
37
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
38
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
39
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
40
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
41
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
42
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
43
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1
+ HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
14
+
15
+
16
+ Intersection Algorithms Provided by Kevin Lindsey
17
+ Copyright (c) 2000-2011, Kevin Lindsey
18
+ All rights reserved.
19
+
20
+ Redistribution and use in source and binary forms, with or without
21
+ modification, are permitted provided that the following conditions are met:
22
+
23
+ - Redistributions of source code must retain the above copyright notice,
24
+ this list of conditions and the following disclaimer.
25
+
26
+ - Redistributions in binary form must reproduce the above copyright
27
+ notice, this list of conditions and the following disclaimer in the
28
+ documentation and/or other materials provided with the distribution.
29
+
30
+ - Neither the name of this software nor the names of its contributors
31
+ may be used to endorse or promote products derived from this software
32
+ without specific prior written permission.
33
+
34
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
35
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
36
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
37
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
38
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
39
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
40
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
41
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
42
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
43
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md CHANGED
@@ -1,82 +1,82 @@
1
- # @hpcc-js/dgrid-shim
2
-
3
- This package is part of the mono repository "@hpcc-js" (aka Visualization Framework), for more information including quick start, demos and tutorials, please visit the main page on GitHub: [hpcc-systems/Visualization](https://github.com/hpcc-systems/Visualization).
4
-
5
- ## Details
6
- The **dgrid-shim** package "wraps" a subset of the [dojo grid](http://dgrid.io/) functionality in a WebPack bundle to simplify its inclusion in modern JavaScript libraries / Web Applications.
7
-
8
- Currently it exposes the following items:
9
- * Deferred
10
- * domConstruct
11
- * Memory
12
- * QueryResults
13
- * Grid = declare([OnDemandGrid, Keyboard, Selection, ColumnResizer, CompoundColumns, GridHelper]);
14
- * PagingGrid = declare([_Grid, Pagination, Keyboard, Selection, ColumnResizer, CompoundColumns, GridHelper]);
15
-
16
- ## Consuming with WebPack
17
- Should "just work"
18
-
19
- ## Consuming with iife
20
- Simply include the package in your html file as normal (it has a global ID of "@hpcc-js/dgrid-shim"):
21
- ```html
22
- <head>
23
- ...
24
- <script src="node_modules/@hpcc-js/dgrid-shim/dist/index.min.js"></script>
25
- <script>
26
- var dgridShim = window["@hpcc-js/dgrid-shim"];
27
- </script>
28
- </head>
29
- <body>
30
- ...
31
- <script>
32
- var myGrid = new dgridShim.PagingGrid();
33
- ...
34
- </script>
35
- ...
36
- </body>
37
- ```
38
-
39
- ## Consuming with Rollup.js
40
- Since Rollup.js has no native support for non es6 modules (the `rollup-plugin-commonjs` simply converts commonjs exports to es6 for example) and part of the es6 specifications dictates that modules should "use strict", which will cause issues with libraries that rely on non strict features.
41
- As dgrid-shim is dependent on DGrid and Dojo which uses non "strict" code, it is ultimately impossible to use Rollup.js to create bundles which include dgrid-shim (without forcing Rollup.JS to not include "use strict"). Here are two suggested **workarounds**:
42
-
43
- ### Exclude dgrid-shim from your bundle
44
- 1. Mark dgri-shim as external in your rollup.config.js file:
45
- ```javascript
46
- external: [
47
- "@hpcc-js/dgrid-shim"
48
- ],
49
- ```
50
- 2. Add the official exported global ID to your rollup.config.js:
51
- ```javascript
52
- output: {
53
- ...
54
- globals: {
55
- "@hpcc-js/dgrid-shim": "@hpcc-js/dgrid-shim"
56
- }
57
- },
58
- ```
59
- 3. Manually include dgrid-shim as an iife source file in your html page:
60
- ```html
61
- <head>
62
- ...
63
- <script src="node_modules/@hpcc-js/dgrid-shim/dist/index.min.js"></script>
64
- </head>
65
- ```
66
-
67
- ### Include dgrid-shim in your bundle
68
- 1. Disable "use strict" injection into your bundle:
69
- ```javascript
70
- output: {
71
- ...
72
- strict: false
73
- }
74
- ```
75
- 2. Add named exports for the dgrid-shim "commonjs" module:
76
- ```javascript
77
- plugins: [
78
- ...,
79
- commonjs({ }),
80
- ...
81
- ]
82
- ```
1
+ # @hpcc-js/dgrid-shim
2
+
3
+ This package is part of the mono repository "@hpcc-js" (aka Visualization Framework), for more information including quick start, demos and tutorials, please visit the main page on GitHub: [hpcc-systems/Visualization](https://github.com/hpcc-systems/Visualization).
4
+
5
+ ## Details
6
+ The **dgrid-shim** package "wraps" a subset of the [dojo grid](http://dgrid.io/) functionality in a WebPack bundle to simplify its inclusion in modern JavaScript libraries / Web Applications.
7
+
8
+ Currently it exposes the following items:
9
+ * Deferred
10
+ * domConstruct
11
+ * Memory
12
+ * QueryResults
13
+ * Grid = declare([OnDemandGrid, Keyboard, Selection, ColumnResizer, CompoundColumns, GridHelper]);
14
+ * PagingGrid = declare([_Grid, Pagination, Keyboard, Selection, ColumnResizer, CompoundColumns, GridHelper]);
15
+
16
+ ## Consuming with WebPack
17
+ Should "just work"
18
+
19
+ ## Consuming with iife
20
+ Simply include the package in your html file as normal (it has a global ID of "@hpcc-js/dgrid-shim"):
21
+ ```html
22
+ <head>
23
+ ...
24
+ <script src="node_modules/@hpcc-js/dgrid-shim/dist/index.min.js"></script>
25
+ <script>
26
+ var dgridShim = window["@hpcc-js/dgrid-shim"];
27
+ </script>
28
+ </head>
29
+ <body>
30
+ ...
31
+ <script>
32
+ var myGrid = new dgridShim.PagingGrid();
33
+ ...
34
+ </script>
35
+ ...
36
+ </body>
37
+ ```
38
+
39
+ ## Consuming with Rollup.js
40
+ Since Rollup.js has no native support for non es6 modules (the `rollup-plugin-commonjs` simply converts commonjs exports to es6 for example) and part of the es6 specifications dictates that modules should "use strict", which will cause issues with libraries that rely on non strict features.
41
+ As dgrid-shim is dependent on DGrid and Dojo which uses non "strict" code, it is ultimately impossible to use Rollup.js to create bundles which include dgrid-shim (without forcing Rollup.JS to not include "use strict"). Here are two suggested **workarounds**:
42
+
43
+ ### Exclude dgrid-shim from your bundle
44
+ 1. Mark dgri-shim as external in your rollup.config.js file:
45
+ ```javascript
46
+ external: [
47
+ "@hpcc-js/dgrid-shim"
48
+ ],
49
+ ```
50
+ 2. Add the official exported global ID to your rollup.config.js:
51
+ ```javascript
52
+ output: {
53
+ ...
54
+ globals: {
55
+ "@hpcc-js/dgrid-shim": "@hpcc-js/dgrid-shim"
56
+ }
57
+ },
58
+ ```
59
+ 3. Manually include dgrid-shim as an iife source file in your html page:
60
+ ```html
61
+ <head>
62
+ ...
63
+ <script src="node_modules/@hpcc-js/dgrid-shim/dist/index.min.js"></script>
64
+ </head>
65
+ ```
66
+
67
+ ### Include dgrid-shim in your bundle
68
+ 1. Disable "use strict" injection into your bundle:
69
+ ```javascript
70
+ output: {
71
+ ...
72
+ strict: false
73
+ }
74
+ ```
75
+ 2. Add named exports for the dgrid-shim "commonjs" module:
76
+ ```javascript
77
+ plugins: [
78
+ ...,
79
+ commonjs({ }),
80
+ ...
81
+ ]
82
+ ```