gd-bs 5.7.3 → 5.7.4

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 @@
1
+ /*! For license information please see tippy.js.LICENSE.txt */
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "gd-bs",
3
- "version": "5.7.3",
3
+ "version": "5.7.4",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
7
7
  "scripts": {
8
8
  "all": "npm run clean && npm run generate-icons && npm run build && npm run build-icons && npm run prod && npm run prod-icons && npm run typings && npm run docs",
9
- "build": "tsc && npm run build-bs && webpack --mode=development && npm run post-build",
9
+ "build": "tsc && npm run build-tippy && npm run build-bs && webpack --mode=development && npm run post-build",
10
10
  "build-bs": "webpack --mode=production --config webpack.sass.js",
11
11
  "build-icons": "webpack --mode=development --config webpack.icons.js",
12
+ "build-tippy": "node ./pre-build.js && webpack --mode=production --config webpack.tippy.js",
12
13
  "post-build": "node ./post-build",
13
14
  "clean": "node ./clean.js",
14
15
  "docs": "typedoc",
package/post-build.js CHANGED
@@ -1,6 +1,12 @@
1
1
  var fs = require('fs');
2
2
 
3
- // Copy the popper library
3
+ // Delete the txt file
4
+ fs.rmSync("./build/tippy.js.LICENSE.txt");
5
+
6
+ // Log
7
+ console.log("Successfully removed the webpack output txt file.");
8
+
9
+ // Copy the type definition file
4
10
  fs.copyFileSync("src/icons/svgs/index.d.ts", "build/icons/svgs/index.d.ts");
5
11
 
6
12
  // Log
package/pre-build.js ADDED
@@ -0,0 +1,30 @@
1
+ var fs = require('fs');
2
+
3
+ // Deletes a directory
4
+ function deleteDirectory(src) {
5
+ // Ensure the directory exists
6
+ if (fs.existsSync(src) && fs.lstatSync(src).isDirectory()) {
7
+ // Get each item in the directory
8
+ fs.readdirSync(src).forEach(function(item) {
9
+ var srcPath = src + "/" + item;
10
+
11
+ // See if this is a directory
12
+ if (fs.lstatSync(srcPath).isDirectory()) {
13
+ // Delete the folder recursively
14
+ deleteDirectory(srcPath);
15
+ } else {
16
+ // Delete the file
17
+ fs.unlinkSync(srcPath);
18
+ }
19
+ });
20
+
21
+ // Delete the directory
22
+ fs.rmdirSync(src);
23
+ }
24
+ };
25
+
26
+ // Log
27
+ console.log("Removing the tippy.js build directory");
28
+
29
+ // Delete the folders
30
+ deleteDirectory("./build/tippy.js");
@@ -1,4 +1,4 @@
1
- import tippy, { Instance, animateFill, followCursor, inlinePositioning, sticky } from "tippy.js";
1
+ import tippy, { animateFill, followCursor, inlinePositioning, sticky } from "../../tippy.js";
2
2
  import { ITippyProps } from "../types";
3
3
  import { IPopover, IPopoverProps } from "./types";
4
4
  import { Button } from "../button";
@@ -48,7 +48,7 @@ export enum PopoverPlacements {
48
48
  */
49
49
  class _Popover extends Base<IPopoverProps> implements IPopover {
50
50
  private _elContent: HTMLDivElement = null;
51
- private _tippy: Instance = null;
51
+ private _tippy = null;
52
52
 
53
53
  // Constructor
54
54
  constructor(props: IPopoverProps, template: string = "") {
@@ -243,7 +243,7 @@ class _Popover extends Base<IPopoverProps> implements IPopover {
243
243
  }
244
244
 
245
245
  // Create the tippy
246
- this._tippy = (tippy as any)(this.el, options);
246
+ this._tippy = tippy(this.el, options);
247
247
  }
248
248
 
249
249
  /**
@@ -1,4 +1,4 @@
1
- import tippy, { Instance, animateFill, followCursor, inlinePositioning, sticky } from "tippy.js";
1
+ import tippy, { animateFill, followCursor, inlinePositioning, sticky } from "../../tippy.js";
2
2
  import { ITippyProps } from "../types";
3
3
  import { ITooltip, ITooltipProps } from "./types";
4
4
  import { IButton } from "../button/types";
@@ -50,7 +50,7 @@ export enum TooltipPlacements {
50
50
  class _Tooltip extends Base<ITooltipProps> {
51
51
  private _btn: IButton = null;
52
52
  private _elContent: HTMLElement = null;
53
- private _tippy: Instance = null;
53
+ private _tippy = null;
54
54
 
55
55
  // Constructor
56
56
  constructor(props: ITooltipProps, template: string = "") {
@@ -294,7 +294,7 @@ class _Tooltip extends Base<ITooltipProps> {
294
294
  }
295
295
 
296
296
  // Create the tippy
297
- this._tippy = (tippy as any)(this.props.target || this.el, options);
297
+ this._tippy = tippy(this.props.target || this.el, options);
298
298
  }
299
299
 
300
300
  /**
@@ -9,7 +9,7 @@ import * as Components from "./components";
9
9
  export { Components }
10
10
 
11
11
  // TippyJS library
12
- import tippy from "tippy.js";
12
+ import tippy from "./tippy.js";
13
13
  export { tippy }
14
14
 
15
15
  // Icons
package/src/index.ts CHANGED
@@ -9,7 +9,7 @@ import * as Components from "./components";
9
9
  export { Components }
10
10
 
11
11
  // TippyJS library
12
- import tippy from "tippy.js";
12
+ import tippy from "./tippy.js";
13
13
  export { tippy }
14
14
 
15
15
  // Bootstrap Global library
@@ -0,0 +1,14 @@
1
+ const tippy = require("./tippy.js");
2
+
3
+ // Plugins
4
+ export const animateFill = tippy.animateFill;
5
+ export const createSingleton = tippy.createSingleton;
6
+ export const delegate = tippy.delegate;
7
+ export const followCursor = tippy.followCursor;
8
+ export const hideAll = tippy.hideAll;
9
+ export const inlinePositioning = tippy.inlinePositioning;
10
+ export const roundArrow = tippy.roundArrow;
11
+ export const sticky = tippy.sticky;
12
+
13
+ // Default
14
+ export default tippy;