@slickgrid-universal/custom-tooltip-plugin 1.2.4 → 1.2.5
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 +20 -20
- package/README.md +62 -62
- package/dist/commonjs/index.js +5 -1
- package/dist/commonjs/index.js.map +1 -1
- package/package.json +4 -4
package/LICENSE
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
Copyright (c) 2020-2022, Ghislain B. - Slickgrid-Universal
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
-
a copy of this software and associated documentation files (the
|
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
-
the following conditions:
|
|
10
|
-
|
|
11
|
-
The above copyright notice and this permission notice shall be
|
|
12
|
-
included in all copies or substantial portions of the Software.
|
|
13
|
-
|
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
Copyright (c) 2020-2022, Ghislain B. - Slickgrid-Universal
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
[](https://opensource.org/licenses/MIT)
|
|
2
|
-
[](http://www.typescriptlang.org/)
|
|
3
|
-
[](https://github.com/ghiscoding/lerna-lite)
|
|
4
|
-
[](https://www.npmjs.com/package/@slickgrid-universal/custom-tooltip-plugin)
|
|
5
|
-
[](https://www.npmjs.com/package/@slickgrid-universal/custom-tooltip-plugin)
|
|
6
|
-
|
|
7
|
-
[](https://github.com/ghiscoding/slickgrid-universal/actions)
|
|
8
|
-
[](https://www.cypress.io/)
|
|
9
|
-
[](https://github.com/facebook/jest)
|
|
10
|
-
[](https://codecov.io/gh/ghiscoding/slickgrid-universal)
|
|
11
|
-
|
|
12
|
-
## Custom Tooltip (plugin)
|
|
13
|
-
#### @slickgrid-universal/custom-tooltip-plugin
|
|
14
|
-
|
|
15
|
-
A plugin to add Custom Tooltip when hovering a cell, it subscribes to the cell `onMouseEnter` and `onMouseLeave` events.
|
|
16
|
-
The `customTooltip` is defined in the Column Definition OR Grid Options (the first found will have priority over the second)
|
|
17
|
-
To specify a tooltip when hovering a cell, extend the column definition like so:
|
|
18
|
-
|
|
19
|
-
Available plugin options (same options are available in both column definition and/or grid options)
|
|
20
|
-
|
|
21
|
-
#### Register the plugin
|
|
22
|
-
In order to use the Service, you will need to register it in your grid options via the `registerExternalResources` as shown in the Example 2 below.
|
|
23
|
-
|
|
24
|
-
##### Example 1 - via Column Definition
|
|
25
|
-
```ts
|
|
26
|
-
this.columnDefinitions = [
|
|
27
|
-
{
|
|
28
|
-
id: "action", name: "Action", field: "action", formatter: fakeButtonFormatter,
|
|
29
|
-
customTooltip: {
|
|
30
|
-
formatter: tooltipTaskFormatter,
|
|
31
|
-
// ...
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
];
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
##### OR Example 2 - via Grid Options (for all columns), NOTE: the column definition tooltip options will win over the options defined in the grid options
|
|
38
|
-
|
|
39
|
-
```ts
|
|
40
|
-
import { SlickCustomTooltip } from '@slickgrid-universal/custom-tooltip-plugin';
|
|
41
|
-
|
|
42
|
-
export class MyExample {
|
|
43
|
-
initializeGrid {
|
|
44
|
-
this.gridOptions = {
|
|
45
|
-
customTooltip: {
|
|
46
|
-
formatter: tooltipTaskFormatter,
|
|
47
|
-
// ...
|
|
48
|
-
},
|
|
49
|
-
registerExternalResources: [new SlickCustomTooltip(), this.excelExportService],
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Internal Dependencies
|
|
56
|
-
- [@slickgrid-universal/common](https://github.com/ghiscoding/slickgrid-universal/tree/master/packages/common)
|
|
57
|
-
|
|
58
|
-
### External Dependencies
|
|
59
|
-
- [DOM Purify](https://github.com/cure53/DOMPurify) to sanitize HTML text
|
|
60
|
-
|
|
61
|
-
### Installation
|
|
62
|
-
Follow the instruction provided in the main [README](https://github.com/ghiscoding/slickgrid-universal#installation)
|
|
1
|
+
[](https://opensource.org/licenses/MIT)
|
|
2
|
+
[](http://www.typescriptlang.org/)
|
|
3
|
+
[](https://github.com/ghiscoding/lerna-lite)
|
|
4
|
+
[](https://www.npmjs.com/package/@slickgrid-universal/custom-tooltip-plugin)
|
|
5
|
+
[](https://www.npmjs.com/package/@slickgrid-universal/custom-tooltip-plugin)
|
|
6
|
+
|
|
7
|
+
[](https://github.com/ghiscoding/slickgrid-universal/actions)
|
|
8
|
+
[](https://www.cypress.io/)
|
|
9
|
+
[](https://github.com/facebook/jest)
|
|
10
|
+
[](https://codecov.io/gh/ghiscoding/slickgrid-universal)
|
|
11
|
+
|
|
12
|
+
## Custom Tooltip (plugin)
|
|
13
|
+
#### @slickgrid-universal/custom-tooltip-plugin
|
|
14
|
+
|
|
15
|
+
A plugin to add Custom Tooltip when hovering a cell, it subscribes to the cell `onMouseEnter` and `onMouseLeave` events.
|
|
16
|
+
The `customTooltip` is defined in the Column Definition OR Grid Options (the first found will have priority over the second)
|
|
17
|
+
To specify a tooltip when hovering a cell, extend the column definition like so:
|
|
18
|
+
|
|
19
|
+
Available plugin options (same options are available in both column definition and/or grid options)
|
|
20
|
+
|
|
21
|
+
#### Register the plugin
|
|
22
|
+
In order to use the Service, you will need to register it in your grid options via the `registerExternalResources` as shown in the Example 2 below.
|
|
23
|
+
|
|
24
|
+
##### Example 1 - via Column Definition
|
|
25
|
+
```ts
|
|
26
|
+
this.columnDefinitions = [
|
|
27
|
+
{
|
|
28
|
+
id: "action", name: "Action", field: "action", formatter: fakeButtonFormatter,
|
|
29
|
+
customTooltip: {
|
|
30
|
+
formatter: tooltipTaskFormatter,
|
|
31
|
+
// ...
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
##### OR Example 2 - via Grid Options (for all columns), NOTE: the column definition tooltip options will win over the options defined in the grid options
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import { SlickCustomTooltip } from '@slickgrid-universal/custom-tooltip-plugin';
|
|
41
|
+
|
|
42
|
+
export class MyExample {
|
|
43
|
+
initializeGrid {
|
|
44
|
+
this.gridOptions = {
|
|
45
|
+
customTooltip: {
|
|
46
|
+
formatter: tooltipTaskFormatter,
|
|
47
|
+
// ...
|
|
48
|
+
},
|
|
49
|
+
registerExternalResources: [new SlickCustomTooltip(), this.excelExportService],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Internal Dependencies
|
|
56
|
+
- [@slickgrid-universal/common](https://github.com/ghiscoding/slickgrid-universal/tree/master/packages/common)
|
|
57
|
+
|
|
58
|
+
### External Dependencies
|
|
59
|
+
- [DOM Purify](https://github.com/cure53/DOMPurify) to sanitize HTML text
|
|
60
|
+
|
|
61
|
+
### Installation
|
|
62
|
+
Follow the instruction provided in the main [README](https://github.com/ghiscoding/slickgrid-universal#installation)
|
package/dist/commonjs/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slickgrid-universal/custom-tooltip-plugin",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "A plugin to add Custom Tooltip when hovering a cell, it subscribes to the cell",
|
|
5
5
|
"main": "dist/commonjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"not dead"
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@slickgrid-universal/common": "^1.2.
|
|
51
|
-
"dompurify": "^2.3.
|
|
50
|
+
"@slickgrid-universal/common": "^1.2.5",
|
|
51
|
+
"dompurify": "^2.3.6"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"cross-env": "^7.0.3",
|
|
55
55
|
"npm-run-all": "^4.1.5",
|
|
56
56
|
"rimraf": "^3.0.2"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "3e31b6633e5fa2dc9cd64ce73c5fb8dc25cbc485"
|
|
59
59
|
}
|